Skip to content

RDF‐star examples of profiles

Niklas Lindström edited this page May 16, 2024 · 26 revisions

RDF-star examples of profiles

In a concrete syntax (Turtle, in this document) there is the need to specify whether a reifier is in the transparent profile or in the functional opaque profile. Here, we write a triple term within quotes to specify a reifier in the functional opaque profile, and a triple term without quotes to denote a reifier in the transparent profile.

Example of functional opaque profile to encode a Neo4j LPG

PREFIX schema: <https://schema.org/>
PREFIX fraud: <http://example.org/ns/fraud/>
PREFIX : <http://example.org/ns/>

# Model
fraud:Account rdfs:subClassOf schema:StructuredValue .
fraud:transfer rdfs:domain fraud:Account ; rdfs:range fraud:Account .
fraud:amount rdfs:domain fraud:Transaction ; rdfs:range xsd:integer .
fraud:registered-at rdfs:domain fraud:Transaction ; rdfs:range schema:Dataset .
fraud:owner rdfs:domain fraud:Account ; rdfs:range schema:Person .

# Data
<< :e1 | ':account-123 fraud:transfer :account-456' >> a fraud:Transaction ;
    fraud:amount 10000 ;
    schema:datePosted "2002-09-24Z"^^xsd:date ;
    fraud:registered-at <http://wikileaks.org/banking:panama-database> .

<< :e2 | ':account-123 fraud:transfer :account-456' >> a fraud:Transaction ;
    rdfs:comment "Transaction not reliable due to contradictory data" ;
    schema:datePosted "2002-10-11Z"^^xsd:date .

:account-123 fraud:owner :john .

:account-456 fraud:owner :mary ;
    fraud:isBlocked true .

Example of transparent profile

<< _:w1 | :liz :married _:h >> a :Marriage ; :starts 1964 .
<< _:w2 | :liz :married _:h >> a :Marriage ; :starts 1975 .

_:h owl:sameAs :richard .

<< _:w1 | :liz :married :richard >> a :Marriage ; :starts 1964 .
<< _:w1 | :richard :married :liz >> a :Marriage ; :ends 1974 .

Example of functional opaque profile

_:x owl:sameAs _:y , :richard .

<< _:t2 | ':liz :married _:x' >> a :TripleToken ;
    :in-graph <http://example.com/weddings> ;
    :stored-by :mary ;
    :on-date "2020-03-12Z"^^xsd:date ;
    rdfs:seeAlso <https://lasvegasnevada.gov/resource/t1> .

<< _:t3 | ':liz :married _:y' >> a :TripleToken ;
    :in-graph <http://example.com/weddings> ;
    :stored-by :paul ;
    :on-date "2020-03-13Z"^^xsd:date .

Example of transparent profile for data integration

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

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

Example of transparent profile

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

Example of mixed functional opaque and transparent profiles

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 .

Examples of transparent profile for 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