extending rdf: naming graphs

45
Extending RDF: Naming graphs Report on ’Named Graphs’ by Caroll et al. Jonas Weber Universität Freiburg 23 rd January 2015 Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23 rd January 2015 1 / 28

Upload: jonas-weber

Post on 19-Feb-2017

131 views

Category:

Internet


0 download

TRANSCRIPT

Extending RDF: Naming graphsReport on ’Named Graphs’ by Caroll et al.

Jonas Weber

Universität Freiburg

23rd January 2015

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 1 / 28

Agenda

1 Motivation

2 Problem

3 The Extension

4 Serialization

5 Applications

6 Related Work

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 2 / 28

Motivation

Motivation

Socialize the semantic webEstablish trust in informationPublish data

We have to:quote graphsrecord authorship andprovenancesign graphs cryptographicallyattach trust levels to graphsdecide which graphs tobelieve

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 3 / 28

Motivation

Motivation

Socialize the semantic webEstablish trust in informationPublish data

We have to:quote graphsrecord authorship andprovenancesign graphs cryptographicallyattach trust levels to graphsdecide which graphs tobelieve

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 3 / 28

Problem

Problem

Graphs are not resources.

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 4 / 28

The Extension

Agenda

1 Motivation

2 Problem

3 The ExtensionAbstract SyntaxSemantics

4 Serialization

5 Applications

6 Related Work

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 5 / 28

The Extension Abstract Syntax

The Extension - Abstract Syntax

U: set of IRI referencesB : set of RDF blank nodesL: set of literals

V = U ∪ B ∪ L: set of all nodes

T = V × U × V : set of all triplesG = P(T ): the powerset of T, i.e. set of all subsets of triples

a named graph is a pair 〈n, g〉, n ∈ U ∧ g ∈ G .

rdfgraph(ng) := gname(ng) := n

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 6 / 28

The Extension Abstract Syntax

The Extension - Abstract Syntax

U: set of IRI referencesB : set of RDF blank nodesL: set of literalsV = U ∪ B ∪ L: set of all nodes

T = V × U × V : set of all triplesG = P(T ): the powerset of T, i.e. set of all subsets of triples

a named graph is a pair 〈n, g〉, n ∈ U ∧ g ∈ G .

rdfgraph(ng) := gname(ng) := n

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 6 / 28

The Extension Abstract Syntax

The Extension - Abstract Syntax

U: set of IRI referencesB : set of RDF blank nodesL: set of literalsV = U ∪ B ∪ L: set of all nodes

T = V × U × V : set of all triplesG = P(T ): the powerset of T, i.e. set of all subsets of triples

a named graph is a pair 〈n, g〉, n ∈ U ∧ g ∈ G .

rdfgraph(ng) := gname(ng) := n

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 6 / 28

The Extension Abstract Syntax

The Extension - Abstract Syntax

U: set of IRI referencesB : set of RDF blank nodesL: set of literalsV = U ∪ B ∪ L: set of all nodes

T = V × U × V : set of all triplesG = P(T ): the powerset of T, i.e. set of all subsets of triples

a named graph is a pair 〈n, g〉, n ∈ U ∧ g ∈ G .

rdfgraph(ng) := gname(ng) := n

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 6 / 28

The Extension Semantics

The Extension - Semantics

properties refer to associated graph:

ng1, ng2: named graphsng1 is subgraphOf ng2 ⇔ rdfgraph(ng1) is subgraphOfrdfgraph(ng2)

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 7 / 28

The Extension Semantics

The Extension - Semantics

two different named graphs:

can talk about the same resourcecan contain have overlapping sets of triplescan not have the same name

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 8 / 28

Serialization

Agenda

1 Motivation

2 Problem

3 The Extension

4 SerializationTriGTriXRDF/XMLN-Quads

5 Applications

6 Related WorkJonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 9 / 28

Serialization TriG

Serialization with TriG

:G1 {

:a :likes "Semantic Web";:name "John Doe".

}

:G2 {:a :likes "Facebook" .

}

default graph: empty name

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 10 / 28

Serialization TriG

Serialization with TriG

:G1 {

:a :likes "Semantic Web";:name "John Doe".

}

:G2 {:a :likes "Facebook" .

}

default graph: empty name

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 10 / 28

Serialization TriG

Serialization with TriG

:G1 {

:a :likes "Semantic Web";:name "John Doe".

}

:G2 {:a :likes "Facebook" .

}

default graph: empty name

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 10 / 28

Serialization TriX

Serialization with TriX

<trix xmlns="http://www.w3.org/2004/03/trix/trix-1/"><graph>

<uri>http://example.com/G1</uri><triple>

<uri>http://example.com/me</uri><uri>http://example.com/wrote</uri><plainLiteral>this</plainLiteral>

</triple></graph>

</trix>

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 11 / 28

Serialization RDF/XML

Serialization with RDF/XML

not possible

simulated by making serializations accessible at their IRIs:

<rdf:Description rdf:about="http://example.com/G1"><ex:writtenBy rdf:resource="http://example.com/me" />

</rdf:Description>

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 12 / 28

Serialization RDF/XML

Serialization with RDF/XML

not possible

simulated by making serializations accessible at their IRIs:

<rdf:Description rdf:about="http://example.com/G1"><ex:writtenBy rdf:resource="http://example.com/me" />

</rdf:Description>

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 12 / 28

Serialization TriX vs RDF/XML

TriX vs RDF/XML

TriX is

easily parseable and validatablereflects triple-structure of RDF directlynamed graphs-ready

RDF/XML iswidely deployedsupport for named graphs is simulatable

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 13 / 28

Serialization N-Quads

Serialization with N-Quads

<subject> <predicate> <object> .

tf:linked_data dc:title "Linked Data" .

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 14 / 28

Serialization N-Quads

Serialization with N-Quads

<subject> <predicate> <object> <context> .

tf:linked_data dc:title "Linked Data" tf:seminars .

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 14 / 28

Applications

Agenda

1 Motivation

2 Problem

3 The Extension

4 Serialization

5 ApplicationsSigning GraphsAccepting GraphsSPARQL

6 Related WorkJonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 15 / 28

Applications Signing Graphs

Signing Graphs

Prove Authorship

:me :likes "Semantic Web".

Quote specific revision

:me :likes "Semantic Web".

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 16 / 28

Applications Signing Graphs

Signing Graphs

Prove Authorship

:me :likes "Semantic Web".

Quote specific revision

:me :likes "Semantic Web".

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 16 / 28

Applications Signing Graphs

Signing Graphs

Open World AssumptionTo facilitate operation at Internet scale, RDF is an open-worldframework that allows anyone to make statements about anyresourcea.

aResource Description Framework (RDF): Concepts and Abstract Syntax,W3C, 2004

⇒ impossible to sign resources

Named Graphs: named set of triples.⇒ Named Graphs can be signed!

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 17 / 28

Applications Signing Graphs

Signing Graphs

Open World AssumptionTo facilitate operation at Internet scale, RDF is an open-worldframework that allows anyone to make statements about anyresourcea.

aResource Description Framework (RDF): Concepts and Abstract Syntax,W3C, 2004

⇒ impossible to sign resources

Named Graphs: named set of triples.⇒ Named Graphs can be signed!

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 17 / 28

Applications Signing Graphs

Signing Graphs

Open World AssumptionTo facilitate operation at Internet scale, RDF is an open-worldframework that allows anyone to make statements about anyresourcea.

aResource Description Framework (RDF): Concepts and Abstract Syntax,W3C, 2004

⇒ impossible to sign resources

Named Graphs: named set of triples.⇒ Named Graphs can be signed!

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 17 / 28

Applications Signing Graphs

Signing Graphs - Authority

a resource representing a legal entity capable of signing documents

e.g. adults, companies, government agencies

Example:a a swp:Authority;

foaf:mbox <mailto:[email protected]>.

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 18 / 28

Applications Signing Graphs

Signing Graphs - Warrant

issued by an authority stating for example:assurance of truthquotation

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 19 / 28

Applications Signing Graphs

Signing Graphs - Example

Triples encoding the ’Like’: http://jonasw.de/ex/like:me :likes "Semantic Web".

My warrant: http://jonasw.de/ex/wg

<http://jonasw.de/ex/like>swp:digestMethod ex:sha1;swp:digest "6d72badab920e505b3fedf507ebd8d6605e5b69f";swp:assertedBy <http://jonasw.de/ex/wg>.

<http://jonasw.de/ex/wg>swp:authority <http://jonasw.de#me>;swp:signatureMethod ex:gpg;swp:signature "PGh0dHA6Ly9qb25hc3cuZGUvZX...".

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 20 / 28

Applications Signing Graphs

Signing Graphs - Example

Triples encoding the ’Like’: http://jonasw.de/ex/like:me :likes "Semantic Web".

My warrant: http://jonasw.de/ex/wg

<http://jonasw.de/ex/like>swp:digestMethod ex:sha1;swp:digest "6d72badab920e505b3fedf507ebd8d6605e5b69f";swp:assertedBy <http://jonasw.de/ex/wg>.

<http://jonasw.de/ex/wg>swp:authority <http://jonasw.de#me>;swp:signatureMethod ex:gpg;swp:signature "PGh0dHA6Ly9qb25hc3cuZGUvZX...".

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 20 / 28

Applications Accepting Graphs

Accepting Graphs

acceptance means believing the triples in the graphmay be based on different criteria, for example:

source of the information (first-hand information, bycompetitor...)external signatures by third parties (ratings etc.)contents of the graph (duplication of information by multiplesources, ...)information gained during retrieval (URL, date, signatures,HTTPS...)

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 21 / 28

Applications SPARQL

Querying with SPARQL

Data:G1 { :jod foaf:name "John Doe".

:jad foaf:name "Jane Doe". }:G2 { :x foaf:name "Mr X". }

QueryPREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?graph ?nameWHERE { GRAPH ?graph { ?x foaf:name ?name. } }

Resulthttp://example.com/G1 "John Doe"http://example.com/G1 "Jane Doe"http://example.com/G2 "Mr X"

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 22 / 28

Applications SPARQL

Querying with SPARQL

Data:G1 { :jod foaf:name "John Doe".

:jad foaf:name "Jane Doe". }:G2 { :x foaf:name "Mr X". }

QueryPREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?graph ?nameWHERE { GRAPH ?graph { ?x foaf:name ?name. } }

Resulthttp://example.com/G1 "John Doe"http://example.com/G1 "Jane Doe"http://example.com/G2 "Mr X"

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 22 / 28

Applications SPARQL

Querying with SPARQL

Data:G1 { :jod foaf:name "John Doe".

:jad foaf:name "Jane Doe". }:G2 { :x foaf:name "Mr X". }

QueryPREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?graph ?nameWHERE { GRAPH ?graph { ?x foaf:name ?name. } }

Resulthttp://example.com/G1 "John Doe"http://example.com/G1 "Jane Doe"http://example.com/G2 "Mr X"

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 22 / 28

Applications SPARQL

Querying with SPARQL

QueryPREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?rFROM NAMED <http://example.com/G1>WHERE { ?r foaf:name ?x . }

Resulthttp://example.com/jodhttp://example.com/jad

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 23 / 28

Related Work

Agenda

1 Motivation

2 Problem

3 The Extension

4 Serialization

5 Applications

6 Related Work

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 24 / 28

Related Work

Related Work: RDF Datasets

adopted as part of RDF1.11

1RDF 1.1 Concepts and Abstract Syntax, W3C, 2014Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 25 / 28

Related Work

Related Work: TRIPLE

rule language for the Semantic Web based on Horn logicdesigned to query and transform graphs

@tf : Docs{tf : d1[

dc:title → "Linked Data Seminar";dc:subject → RDF;dc:subject → LinkedData

]

∀S ,Dsearch(S ,D)← D[dc : subject → S ].

}

not a small addition, but a complex framework

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 26 / 28

Related Work

Related Work: TRIPLE

rule language for the Semantic Web based on Horn logicdesigned to query and transform graphs

@tf : Docs{tf : d1[

dc:title → "Linked Data Seminar";dc:subject → RDF;dc:subject → LinkedData

]

∀S ,Dsearch(S ,D)← D[dc : subject → S ].

}

not a small addition, but a complex framework

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 26 / 28

Related Work

Related Work: TRIPLE

rule language for the Semantic Web based on Horn logicdesigned to query and transform graphs

@tf : Docs{tf : d1[

dc:title → "Linked Data Seminar";dc:subject → RDF;dc:subject → LinkedData

]

∀S ,Dsearch(S ,D)← D[dc : subject → S ].

}not a small addition, but a complex framework

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 26 / 28

Related Work

Related Work: Contexts for the Semantic Web

designed for aggregation in a specific use case

not a general approach

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 27 / 28

Related Work

Related Work: Contexts for the Semantic Web

designed for aggregation in a specific use case

not a general approach

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 27 / 28

Conclusion

Conclusion

Named graphs:

small addition to RDFpowerful approach to store metadatasignatures important and easy to implementadvantages compared to other approachesready for use - today

Jonas Weber (Universität Freiburg) Extending RDF: Naming graphs 23rd January 2015 28 / 28