{small lecturenumber - hepage :} RDF{small lecturenumber - hepage :} Uses of RDF{small lecturenumber - hepage :} RDF's data model{small lecturenumber - hepage :} Representation in XML{small lecturenumber - hepage :} RDF's data model{small lecturenumber - hepage :} RDF's data model{small lecturenumber - hepage :} Resources{small lecturenumber - hepage :} Literals{small lecturenumber - hepage :} Properties and statements{small lecturenumber - hepage :} Reification{small lecturenumber - hepage :} FOAFDistributed Software DevelopmentRDFChris BrooksDepartment of Computer ScienceUniversity of San FranciscoDepartment of Computer Science — University of San Francisco – p. 1/??17-2: RDF•RDF stands for Resource Description Framework•Provides a way to describe properties that belong to objects.•Much like a relational database.•Can be serialized as XML, but it’s easiest not to get hung up onthe XML syntax initially.◦Built to be created and consumed by machines.Department of Computer Science — University of San Francisco – p. 2/??17-3: Uses of RDF•RDF is a very popular framework for describing resources onthe Web.◦RSS◦Mozilla◦Creative Commons◦FOAF◦Adobe’ XMP project◦Open Drectory Project•All of these applications need a more powerful way ofrepresenting information than XML provides by itself.Department of Computer Science — University of San Francisco – p. 3/??17-4: RDF’s data model•Recall that XML produces a tree-structured data model.•This can make it hard to represent some sorts of knowledge.•How to denote that two elements share a sub-element?Department of Computer Science — University of San Francisco – p. 4/??17-5: Representation in XML•For example:<song><artist>Doors</artist><title>Break On Through</title><album>Greatest Hits</album></song><song><artist>Doors</artist><title>Light My Fire</title><album>Greatest Hits</album></song><song><artist>Devo</artist><title>Through Being Cool</title><album>Greatest Hits</album>Department of Computer Science — University of San Francisco – p. 5/??17-6: RDF’s data model•RDF represents data in terms of triples•Subject, property, value•“http://www.cs.usfca.edu/ brooks/S05classes/cs682/slides/rdf.pdf”,title, “RDF Lab”•Properties allow us to express relations between objects.◦In AI, we called these things predicatesDepartment of Computer Science — University of San Francisco – p. 6/??17-7: RDF’s data model•From a set of RDF triples, we can construct an RDF graph.•Subject and value are nodes◦Nodes can be•URIs - a generalized form of a URL•blank nodes - mostly useful as placeholders•literals - strings, values, etc.◦◦Properties are edges.Department of Computer Science — University of San Francisco – p. 7/??17-8: Resources•An RDF document is a set of statements about resources◦Documents, video clips, services•A resource is something that has a location.◦Referred to with a URI•The subject of an RDF statement is a resource.Department of Computer Science — University of San Francisco – p. 8/??17-9: Literals•The object of an RDF statement can be a resource or a literal.•Literals are typically strings.•For example:<rdf:Description rdf:about’http://www.cs.usfca.edu/˜brooks’><dc:creator> Brooks </dc:creator></rdf:description>Department of Computer Science — University of San Francisco – p. 9/??17-10: Properties and statements•A property is a relation between a subject and an object.•A statement is a subject, a property, and an object.•This allows RDF statements to be placed in a graph model.•We called this a semantic network in AI.Department of Computer Science — University of San Francisco – p. 10/??17-11: Reification•It’s also possible in RDF to make statements about statements.•This process is called reification<rdf:Description rdf:ID=’’item10245’’><exterms:weight rdf:datatype=’’&xsd;decimal’’>2.4</exterms:weight></rdf:Description><rdf:Statement rdf:about=’’#triple12345’’><rdf:subject rdf:resource=’’http://www.example.com/2002/04/product<rdf:predicate rdf:resource=’’http://www.example.com/terms/weight’<rdf:object rdf:datatype=’’&xsd;decimal’’>2.4</rdf:object><dc:creator rdf:resource=’’http://www.example.com/staffid/85740’’/</rdf:Statement>•This lets you say things about who wrote a statement, when itwas added, the validity, and so on.Department of Computer Science — University of San Francisco – p. 11/??17-12: FOAF•We’ll be using a simple RDF language called FOAF(friend-of-a-friend)•It’s a way to indicate other people that you know.•Consists of Person nodes, which have properties◦Name, title, etc.•One of the interesting properties is ’knows’.•the object of this is also a Person.Department of Computer Science — University of San Francisco – p.
View Full Document