150 likes | 305 Views
Resource Description Framework. Gopal Gupta Department of Computer Science University of Texas at Dallas. Resource Description Framework. RDF is a language for Representing resources on the world wide web Representing meta-data about web resources; E.g.:
E N D
Resource Description Framework Gopal Gupta Department of Computer Science University of Texas at Dallas
Resource Description Framework • RDF is a language for • Representing resources on the world wide web • Representing meta-data about web resources; E.g.: • title/author/etc of a webpage (a resource) • availability schedule of a resource • RDF can represent information about things that can be identified on the web, even though they cannot be retrieved: • person, physical book, building
Resource Description Framework • RDF meant for automatic processing (not just for humans) • RDF provides a common framework that: • Eases communication • Allows leveraging of common tools • Allows information to be used by applications other than the original one for which the RDF document was created. (Hence the notion of a resource important)
Resource Description Framework • RDF is based on the idea of: • identifying things using web identifiers (URIs) • describing resources via properties and property values • The thing identified, its property, as well its property values can all be URIs • Uniform Resource Identifiers: More general than URLs; • URIs Can identify: • Network accessible things (documents and databases) • Any physical object (book, human) • Abstract concepts (creator)
Resource Description Framework • RDF uses URI references (or URIref): • a URI, together with an optional fragment identifier. • E.g.: http://www.example.org/index.html#section2 • Don’t have to write full URIs; abbreviate via name-spaces • All information in RDF coded in the form: • X has a property P whose value is Y - X is the subject - P is the property - Y is the object • All of X, P, and Y can be URIs or literal atoms
Resource Description Framework • Two issues to allow machine processable KR • Need to uniquely identify subject, prop, object -- use URIs • Need to put in machine processable format -- use XML (RDF Schema) • RDF represents information as graphs: -- subject & object become nodes -- property becomes the arc -- URIrefs put in ellipses; literals (typed) in boxes
Resource Description Format http://www.example.org/index.html has a creator whose value is John Smith
Resource Description Framework http://www.example.org/index.html has a creation-date whose value is August 16, 1999http://www.example.org/index.html has a language whose value is English
RDF Triples [<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/creator> <http://www.example.org/staffid/85740>] [<http://www.example.org/index.html> <http://www.example.org/terms/creation-date> "August 16, 1999" ] [<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/language> "en" ]
Namespaces in RDF prefix rdf:, namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#prefix rdfs:, namespace URI: http://www.w3.org/2000/01/rdf-schema#prefix dc:, namespace URI: http://purl.org/dc/elements/1.1/prefix owl:, namespace URI: http://www.w3.org/2002/07/owl#prefix ex:, namespace URI: http://www.example.org/ prefix xsd:, namespace URI: http://www.w3.org/2001/XMLSchema# Other namespaces:prefix exterms:, namespace URI: http://www.example.org/terms/ -- (for terms used by an example organization),prefix exstaff:, namespace URI: http://www.example.org/staffid/ -- (for the example organization's staff identifiers),prefix ex2:, namespace URI: http://www.domain2.example.org/ -- (for a second example organization), and so on.
Resource Description Framework • With the namespace, the triples written as: ex:index.html dc:creator exstaff:85740ex:index.html exterms:creation-date “8/16/99” ex:index.html dc:language "en" • RDF only recognizes full URIs • Namespace/qualified names just conveniences • Namespace structure should not be utilized • URIs define standard vocabularies (ontologies) • Same resource may have multiple URIs
RDF and Ontologies • For RDF to be useful resources should use common terminology (ontology) • Someone could search the web for book reviews and create an avg rating for each book, then post it as a resource. • This resource could be used to create another resource, namely, “top 10 books” • Possible only if people using this resource can agree on a common terminology (or ontology); thus common ontologies need to be developed
RDF and Ontologies • RDF defines its own tags (RDF schemas) • RDF does not give meaning to tags, these are defined in other name spaces (e.g., creator) • The meaning of these tags are interpreted by applications • RDF provides means for knowledge representation, much like a logical formalism, e.g., assertions in formal logic,
RDF in XML Syntax • 1. <?xml version="1.0"?> • 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" • 3. xmlns:exterms="http://www.example.org/terms/"> • 4. <rdf:Description rdf:about="http://www.example.org/index.html"> • 5. <exterms:creation-date>August 16,1999</exterms:creation-date> • 6. </rdf:Description> • 7. </rdf:RDF>