Skip to content

RDF‐star baseline examples

Enrico Franconi edited this page Aug 6, 2024 · 5 revisions

RDF-star baseline examples (DRAFT 2024.08.06)

Refer to the RDF-star "working baseline" document to understand the syntax and the semantics of the examples below.

1. Labelled Property Graphs

See the RDF-star and LPGs document.

2. Example of multi-edge

PREFIX lvn: <https://lasvegasnevada.gov/resource/>

<< lvn:w1 | :liz :married :richard >> 
   a :marriage ; 
   :hasInterval [:start 1964 ; :end 1974] .
   
<< lvn:w2 | :liz :married :richard >> 
   a :marriage ; 
   :hasInterval [:start 1975 ; :end 1976] .

<< lvn:w1 | :richard :married :liz >> a :Marriage .
<< lvn:w2 | :richard :married :liz >> a :Marriage .

3. Example of provenance

PREFIX lvn: <https://lasvegasnevada.gov/resource/>

<< lvn:t1 | :liz :married :richard >> a rdf:TripleToken ;
    :in-graph <http://lasvegasnevada.gov/weddings> ;
    :stored-by :mary ;
    :on-date "1964-03-12Z"^^xsd:date ;
    rdfs:seeAlso lvn:w1 .

<< lvn:t2 | :liz :married :richard >> a rdf:TripleToken ;
    :in-graph <http://lasvegasnevada.gov/weddings> ;
    :stored-by :paul ;
    :on-date "1975-03-13Z"^^xsd:date ;
    rdfs:seeAlso lvn:w2 .

4. Example of data integration

PREFIX lvn: <https://lasvegasnevada.gov/resource/>

# graph 1
<< lvn:w1 | :liz :married _:h >> a :Marriage ; :starts 1964.
<< lvn:w2 | :liz :married _:h >> a :Marriage ; :starts 1975.
_:h owl:sameAs :richard .
<< lvn:w1 | :richard :married :liz >> a :Marriage ; :ends 1974 .

# graph 2
<< lvn:w2 | :richard :married-in :las-vegas >> :best-man :jim-benton .
<< lvn:w2 | :liz :married-on 1975 >> :location :las-vegas .
lvn:w2 :groom :richard .
lvn:w2 :bride :liz .

5. Example of multiple support

<< _:w3 | :bill-clinton :related-to :hillary-rodham >> :starts 1975 .
<< _:w3 | :42nd-potus :husband :1st-female-NY-senator >> :starts 1975 .

6. Example of distinct reifiers

PREFIX lvn: <https://lasvegasnevada.gov/resource/>

<< lvn:t1 | :liz :married :richard >> a :TripleToken .
lvn:t1 :added-in lvn:rdf-registry ; :stored-by :john .
lvn:t1 :on-date "2006-03-12Z"^^xsd:date .
lvn:t1 :provenance lvn:database-1975-123973q2 .

<< lvn:c1 | :liz :married :richard >> a lvn:WeddingCertificate .
lvn:c1 lvn:wedding-starts 1975 .

<< lvn:c2 | :liz :married :richard >> a lvn:WeddingCertificate .
lvn:c2 lvn:wedding-starts 1964 .

<< lvn:c3 | :liz :married :richard >> a lvn:WeddingCertificate .
lvn:c3 lvn:wedding-starts 1971 .

lvn:c1 :printed-on "2020-10-11Z"^^xsd:date .
lvn:c2 :printed-on "2021-03-12Z"^^xsd:date .
lvn:c3 :printed-on "2021-03-12Z"^^xsd:date .

7. Examples of statements about statements

<< _:s1 | :paul :loves :mary >> a :Fact ; :uttered-by :john .
<< _:s2 | :paul :loves :mary >> a :Fact ; :confuted-by :paul .

:john :believes
  << _:s1 | 
    << [] | :liz :spouse :richard >>
      :starts 1964 >> .
:s1 :certified-by :us-census .

:paul :believes
  << _:s2 | 
    << [] | :liz :spouse :richard >>
      :starts 1955 >> .
Clone this wiki locally