1 / 6

590SW Stanley Kok

N3. 590SW Stanley Kok. RDF. express in. RDF/XML. N3. What is N3?. Notation 3 3 - <subject> <predicate> <object> triple? “Human-writable” vs RDF/XML – machine-processable expresses the same things as RDF/XML. Easy to Scribble. N3. RDF/XML.

saul
Télécharger la présentation

590SW Stanley Kok

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. N3 590SW Stanley Kok

  2. RDF express in RDF/XML N3 What is N3? • Notation 3 • 3 - <subject> <predicate> <object> triple? • “Human-writable” • vs RDF/XML – machine-processable • expresses the same things as RDF/XML

  3. Easy to Scribble N3 RDF/XML <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:m="http://www.example.org/meeting_organization#" xmlns="http://www.example.org/people#" xmlns:p="http://www.example.org/personal_details#"> <rdf:Description about="http://www.example.org/people#fred">   <p:GivenName>Fred</p:GivenName>   <p:hasEmail resource="mailto:fred@example.com" />   <m:attending resource="http://meetings.example.com/cal#m1" />   </rdf:Description>   </rdf:RDF> @prefix p: <http://www.example.org/personal_details#>. @prefix m: <http://www.example.org/meeting_organization#> . http://www.example.org/people#fred p:GivenName "Fred"; p:hasEmail <mailto:fred@example.com>; m:attending <http://meetings.example.com/cal#m1> .

  4. Syntax • Triple: <subject> <predicate> <object> • URI • Object ~ string • e.g. <#John> <#child> <#Pete>. • <#John> is <#child> a <#Pete>. • [ <#name> “Pete”, <#age> “25” ].

  5. Syntactic Sugar • @prefix dc: <http://sw.org/schema/> • dc:doc dc:title “What is N3?” • prefix : <#> • ‘,’ – another object with same subject and predicate • ‘;’ – another property of same subject • e.g. :john :child :pete, :al; :age “25”.

  6. More Syntax • Class • @prefix rdfs: <http://www.w3.org/rdf-schema#> • :Person a rdfs:Class. :John a :Person • :Man a rdfs:Class; rdfs:subClassOf :Person • Property • @prefix rdfs: <http://www.w3.org/rdf-syntax-ns#> • :brother a rdf:Property • :brother rdfs:domain :Person; rdfs:range :Man • Equivalence • :Man = foo:MaleAdult • Rule • { :per1 :brother [ :father :per2] } log:implies { :per1 :uncle :per 2 }

More Related