RDF-WG GraphContainers

From Provenance WG Wiki
Revision as of 20:41, 13 October 2011 by Tlebo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

RDF-WG,

How do you use RDF to model the "Dataset" created in an empty SPARQL endpoint that receives the following requests?


INSERT into first third party

How do you use RDF to model the "Dataset" created in an empty SPARQL endpoint that receives the following request?

# (Telling http://logd.tw.rpi.edu/sparql)

PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
INSERT { 
  GRAPH <http://www.w3.org/People/Berners-Lee/card> { 
     tblcard:i rdfs:label "Tim Berners-Lee" 
  }
}

How it is treated by currently deployed SPARQL endpoint implementations

@PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#> .
@PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@PREFIX sd:      <http://www.w3.org/ns/sparql-service-description#> .
@PREFIX :        <http://logd.tw.rpi.edu/sparql/our_namespace_for_our_datasets#> .

:logd_dataset
   a r:Dataset;
   sd:namedGraph tblcard:i;
.

tblcard:i   # <-- The problem here is that the SPARQL endpoint is using 
            #     someone else's URI to describe its own partition of triples.
   a sparql:NamedGraph;
   rdf:containsTriples ( [ rdf:subject   tblcard:i;
                           rdf:predicate  rdfs:label;
                           rdf:object    "Tim Berners-Lee" ] );
   rdf:hasGraphSerialization [ 
      rdf:value """@PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#> . 
                   @PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
                   <http://www.w3.org/People/Berners-Lee/card> {
                   tblcard:i rdfs:label "Tim Berners-Lee       }"""^^rdf:trig 
   ];
.

How it should be reinterpreted

@PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#> .
@PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@PREFIX sd:      <http://www.w3.org/ns/sparql-service-description#> .
@PREFIX :        <http://logd.tw.rpi.edu/sparql/our_namespace_for_our_datasets#> .

:logd_dataset
   a r:Dataset;
   sd:namedGraph :card;
.

:card 
   a r:GraphContainer; # aka g-box
   sd:name            tblcard:i;
   dcterms:identifier tblcard:i; r:inDataset :logd_dataset; # r:inDataset provides the "given context" that Dublin Core 
                                                            # mentions in the definition for dcterms:identifier.
   r:contains                :card_snapshot;
.

:card_snapshot
   a rdf:Graph; # aka g-snap
   rdf:containsTriples ( [ rdf:subject   tblcard:i;
                           rdf:predicate  rdfs:label;
                           rdf:object    "Tim Berners-Lee" ] );
   rdf:hasGraphSerialization [ 
      rdf:value """@PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#> . 
                   @PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
                   <http://www.w3.org/People/Berners-Lee/card> {
                   tblcard:i rdfs:label "Tim Berners-Lee       }"""^^rdf:trig 
   ];
.

INSERT into second first party

How do you use RDF to model the "Dataset" created in an empty SPARQL endpoint that receives the following request?

# (Telling http://dbpedia.org/sparql)
 
PREFIX tblcard: <http://www.w3.org/People/Berners-Lee/card#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
INSERT { 
  GRAPH <http://www.w3.org/People/Berners-Lee/card> { 
     tblcard:i rdfs:label "Tim Berners-Lee" 
  }
}