rdf syntax
play

RDF Syntax RDF (Resource Description Framework) S ubj ect, - PDF document

RDF Syntax RDF (Resource Description Framework) S ubj ect, Predicate and Obj ect Triplets (Tuples) 1. RDF provides a way of describing resources via met adat a (dat a about dat a) It restricts the description of resources to triplets (subj


  1. RDF Syntax RDF (Resource Description Framework) S ubj ect, Predicate and Obj ect Triplets (Tuples) 1. RDF provides a way of describing resources via met adat a (dat a about dat a) It restricts the description of resources to triplets (subj ect,predicat e,obj ect) • S ubj ect: The resource being described. 1. It provides int eroperabilit y bet ween applicat ions that exchange machine • Predicate: A property of the resource underst andable information on t he Web. • Obj ect: The value of t he property 3. The broad goal of RDF is to define a mechanism for describing resources that makes no assumptions about a particular application domain, A combination of them is said to be a S tatement (or a rule) nor defines (a priori) t he semantics of any application domain. • Uses XML as t he int erchange synt ax. John Doe http://foo.bar.org/index.html Author • Provides a lightweight ont ology syst em. A property of the A web page The value of the predicate The formal specification of RDF is available at: web page (author) being described (here the author) ht tp:/ / www.w3.org/ TR/ REC-rdf-synt ax/ [Predicate] [Subject] [Object] Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 1 2 RDF Example RDF Schema • A schema defines the terms that will be used in the RDF <? xml version="1.0"? > Namespace for the RDF spec <rdf:RDF statements and gives specific meanings to them. xmlns:rdf="ht t p:/ / www.w3.org/ TR/ WD-rdf-synt ax#" Namespace ‘s’, a custom http://www.w3.org/TR/rdf-schema/ xmlns:s="ht t p:/ / descript ion.org/ schema/ "> namespace Subject Example: <rdf:Description about="http:/ / foo.bar.org/ index.ht ml"> <s:Author>John Doe</ s:Author> Author (property of the subject) <rdf:RDF xml:lang="en" </ rdf:Descript ion> (Also a resource) xmlns:rdf="ht tp:/ / www.w3.org/ 1999/ 02/ 22-rdf-syntax-ns#" RDF Schema Namespace </ rdf:RDF> Object. Can also point to a resource xmlns:rdfs="ht tp:/ / www.w3.org/ 2000/ 01/ rdf-schema#"> An “ID” attribute actually <rdf:Description ID="Mot orVehicle"> The above stat ement says : defines a new resource <rdf:type resource="htt p:/ / www.w3.org/ 2000/ 01/ rdf-schema#Class"/ > <rdfs:subClassOf The Aut hor of ht tp:/ / foo.bar.org/ index.html is “ John Doe” rdf:resource="http:/ / www.w3.org/ 2000/ 01/ rdf-schema#Resource"/ > “Resource” is the </ rdf:Description> top level class In this way, we can have different obj ects (resources) pointing to other obj ects <rdf:Description ID="PassengerVehicle"> <rdf:type resource="htt p:/ / www.w3.org/ 2000/ 01/ rdf-schema#Class"/ > (resources) , thus forming a DLG (Directed Line Graph) PassengerVehicle is a <rdfs:subClassOf rdf:resource="#MotorVehicle"/ > </ rdf:Description> subclass of MotorVehicle You can also make st at ements about stat ements – reification <rdf:Description ID="Truck"> Ex: ‘ xyz’ says that ‘ The Author of http:/ / foo.bar.org/ index.html is John Doe’ <rdf:type resource="htt p:/ / www.w3.org/ 2000/ 01/ rdf-schema#Class"/ > <rdfs:subClassOf rdf:resource="#MotorVehicle"/ > </ rdf:Description> Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 3 Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 4 Example (cont..) RDF: Tools/Resources <rdf:Description ID="Van"> SirPAC <rdf:type resource="htt p:/ / www.w3.org/ 2000/ 01/ rdf-schema#Class"/ > <rdfs:subClassOf rdf:resource="#MotorVehicle"/ > A Simple RDF Parser & Compiler. It parses the RDF, and validates it. It also </ rdf:Description> generates the tuples and even draws a graph of the data model. <rdf:Description ID="MiniVan"> <rdf:type resource="htt p:/ / www.w3.org/ 2000/ 01/ rdf-schema#Class"/ > www.w3.org/RDF/Implementations/SiRPAC/ <rdfs:subClassOf rdf:resource="#Van"/ > Multiple Inheritance <rdfs:subClassOf rdf:resource="#PassengerVehicle"/ > </ rdf:Description> Reggie <rdf:Description ID="registeredTo"> A Nice Metadata Editor. Java based simple user interface to describe a web resource. <rdf:type resource="htt p:/ / www.w3.org/ 1999/ 02/ 22-rdf-syntax-ns#Property"/ > Domain of a property Can mail the metadata file to yourself after finished editing. <rdfs:domain rdf:resource="#Mot orVehicle"/ > <rdfs:range rdf:resource="#Person"/ > http://metadata.net/dstc/ </ rdf:Description> <rdf:Description ID="rearS eat LegRoom"> Protégé <rdf:type resource="htt p:/ / www.w3.org/ 1999/ 02/ 22-rdf-syntax-ns#Property"/ > <rdfs:domain rdf:resource="#PassengerVehicle"/ > Editor of ontologies in practically any language you care about. Open source. <rdfs:domain rdf:resource="#Minivan"/ > Range of a http://www.smi.stanford.edu/projects/protege/ <rdfs:range rdf:resource="ht tp:/ / www.w3.org/ 2000/ 03/ example/ classes#Number"/ > </ rdf:Description> property </ rdf:RDF> Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 5 6

  2. Summary: RDF & RDF Schema layer The Layer Cake [TBL,XML2000] � Minimalist model - (thing), Class, Property � Subproperty, Subclass � Domain & Range � Still not a W3C recommendation � Continues to change � Other languages are being built on XML substrate: XQUERY, XTM Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 7 8 Limitations of RDF DAML+OIL’s History • W3C ’ s S emantic Web Activity: - Cannot define propert ies of properties (unique, transit ive) - RDF and met adata markup efforts to represent data in a machine understandable form. - No equivalence, disj oint ness, etc. - No mechanism of specifying necessary and sufficient conditions • DARPA started t he DARPA Agent Markup Language ( DAML ) for class membership. program. Example: If it is given that ‘ XYZ’ has a ‘ car’ which is ‘ 7ft high’ , has • possibly with “ ARPANET -> Internet” in mind ‘ wide wheels’ and ‘ loading space is 4 cub.m’ , then we should be able t o reason t hat ‘ XYZ’ has an ‘ S UV’ , as given by • EC (European Commission) funding programs the necessary and sufficient conditions for being an ‘ S UV’ : - Ontology Int erchange Language ( OIL ) height > 4ft & wide wheels & loading space > 2 cub.m - logic based language. - brings logic and inference to the Semantic Web www.daml.org DAML+OIL: http://www.daml.org/2001/03/daml+oil-index.html Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 9 Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 10 An Example (from www.daml.org) DAML+OIL (www.daml.org) <rdf:RDF xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:daml="http://www.daml.org/2000/12/daml+oil#" xmlns ="http://www.daml.org/2000/12/daml+oil-ex#" � It builds on earlier W3C standards such as RDF and > RDF Schema. Start of an ontology (about = “” implies ‘this’ document) <daml:Ontology about=“”> <daml:versionInfo>An example ontology</daml:versionInfo> � DAML extends RDF and RDFS with richer modelling <rdfs:Class rdf:ID="Animal"> <rdfs:label>Animal</rdfs:label> The label is not used for logical interpretation primitives. <rdfs:comment> This class of animals is illustrative of a number of ontological idioms. </rdfs:comment> � disjointWith, intersectionOf, oneOf, cardinality </rdfs:Class> <rdfs:Class rdf:ID="Male"> <rdfs:subClassOf rdf:resource="#Animal"/> � Able to provide properties of properties </rdfs:Class> � uniqueness, transitivity, etc. <rdfs:Class rdf:ID="Female"> <rdfs:subClassOf rdf:resource="#Animal"/> Can explicitly specify the set of Females to <daml:disjointWith rdf:resource="#Male"/> </rdfs:Class> be disjoint with the set of Males � Current version DAML+OIL provides a semantic The Person class is defined later <rdfs:Class rdf:ID="Man"> interpretation (model-theoretic semantics) <rdfs:subClassOf rdf:resource="#Person"/> To be read conjunctively. A man is a sub-class of <rdfs:subClassOf rdf:resource="#Male"/> </rdfs:Class> ‘Person’ and a ‘Male’ http://www.daml.org/2001/03/daml+oil-index.html Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt Adapted from slides by Yolanda Gil / ISI - www.isi.edu/~gil/slides/SeWebClass-Feb02.ppt 11 12

Recommend


More recommend