• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introduction to RDF
 

Introduction to RDF

on

  • 869 views

A simple introduction to RDF

A simple introduction to RDF

Statistics

Views

Total Views
869
Views on SlideShare
534
Embed Views
335

Actions

Likes
0
Downloads
6
Comments
0

14 Embeds 335

http://pedroszekely.blogspot.com 285
http://pedroszekely.blogspot.in 17
http://pedroszekely.blogspot.fr 8
http://pedroszekely.blogspot.com.au 5
http://pedroszekely.blogspot.de 5
http://widget.feed.mikle.com 5
http://pedroszekely.blogspot.tw 2
http://pedroszekely.blogspot.it 2
http://pedroszekely.blogspot.ru 1
http://pedroszekely.blogspot.co.at 1
http://pedroszekely.blogspot.com.es 1
http://pedroszekely.blogspot.no 1
http://pedroszekely.blogspot.ca 1
http://pedroszekely.blogspot.mx 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Introduction to RDF Introduction to RDF Presentation Transcript

    • RDFPedro SzekelyUniversity of Southern California/ISI
    • Semantic Web Layer Cakeslide by Pedro Szekely
    • Unicodeslide by Pedro Szekely
    • Why Unicode?http://site.com/Μία_Σελίδαhttp://site.com/Македонски.htmlhttp://www.中国政府.政务.cnslide by Pedro Szekely
    • Unicode is a computing industry standard forthe consistent encoding, representation andhandling of text expressed in most of theworlds writing systems.… the latest version of Unicode consists of arepertoire of more than 110,000 characterscovering 100 scriptsUnicodeWikipediaslide by Pedro Szekely
    • URIslide by Pedro Szekely
    • URL: Uniform Resource LocatorA reference to an Internet resourceWeb ServerURLDocument(Resource)slide by Pedro Szekely
    • URL vs URIURIURL URNnameslocatorslike a persons namelike persons street addressitems identitymethod for finding itslide by Pedro Szekely
    • Can USC Have a URI?slide by Pedro Szekely
    • Can USC Have a URI?http://dbpedia.org/page/University_of_Southern_Californiaslide by Pedro Szekely
    • Things can have URIs
    • Can the Pythagoras TheoremHave a URI?slide by Pedro Szekely
    • Can the Pythagoras TheoremHave a URI?http://www.freebase.com/view/en/pythagorean_theoremslide by Pedro Szekely
    • Ideas can have URIs
    • My Dog: Can He Have a URI?slide by Pedro Szekely
    • My Dog: Can He Have a URI?http://szekelys.com/diegoslide by Pedro Szekely
    • It does not have to be “important” to have a URI
    • Namespacesslide by Pedro Szekely
    • Are These the Same?<http://amazon.com/store/Bookstore><http://amazon.com/store/Book><http://amazon.com/store/Author>John Doe</http://amazon.com/store/Author><http://amazon.com/store/Title>Introduction to XML</http://amazon.com/store/Title><http://amazon.com/store/Publisher>XYZ</http://amazon.com/store/Publisher></http://amazon.com/store/Book></http://amazon.com/store/Bookstore><http://barnesandnoble.com/store/Bookstore><http://barnesandnoble.com/store/Book><http://barnesandnoble.com/store/Author>John Doe</http://barnesandnoble.com/store/Author><http://barnesandnoble.com/store/Title>Introduction to XML</http://barnesandnoble.com/store/Title><http://barnesandnoble.com/store/Publisher>XYZ</http://barnesandnoble.com/store/Publisher></http://barnesandnoble.com/store/Book></http://barnesandnoble.com/store/Bookstore><Bookstore><Book><Author>John Doe</Author><Title>Introduction to XML</Title><Publisher>XYZ</Publisher></Book></Bookstore>slide by Pedro Szekely
    • NamespacesXML namespaces are used forproviding uniquely named elementsand attributes in an XML documentxmlns="http://amazon.com/store"Wikipediaslide by Pedro Szekely
    • Using a Namespace Declaration<http://amazon.com/store/Bookstore><http://amazon.com/store/Book><http://amazon.com/store/Author>John Doe</http://amazon.com/store/Author><http://amazon.com/store/Title>Introduction to XML</http://amazon.com/store/Title><http://amazon.com/store/Publisher>XYZ</http://amazon.com/store/Publisher></http://amazon.com/store/Book></http://amazon.com/store/Bookstore><Bookstore xmlns=“http://amazon.com/store”><Book><Author>John Doe</Author><http://amazon.com/store/Title>Introduction to XML</Title><http://amazon.com/store/Publisher>XYZ</Publisher></Book></Bookstore>=slide by Pedro Szekely
    • Default and Prefix Namespaces<http://amazon.com/store/Bookstore><http://amazon.com/store/Book><http://amazon.com/store/Author>John Doe</http://amazon.com/store/Author><http://amazon.com/store/Title>Introduction to XML</http://amazon.com/store/Title><http://amazon.com/store/Publisher>XYZ</http://amazon.com/store/Publisher></http://amazon.com/store/Book></http://amazon.com/store/Bookstore><Bookstore xmlns=“http://amazon.com/store”><Book><Author>John Doe</Author><Title>Introduction to XML</Title><Publisher>XYZ</Publisher></Book></Bookstore>=<am:Bookstore xmlns:am=“http://amazon.com/store”><am:Book><am:Author>John Doe</am:Author><am:Title>Introduction to XML</am:Title><am:Publisher>XYZ</am:Publisher></am:Book></am:Bookstore>=slide by Pedro Szekely
    • Default and Prefix Namespaces<am:Bookstorexmlns:am=“http://amazon.com/store”xmlns:bn=http://barnesandnoble.com/store><am:Book><am:Author>John Doe</am:Author><bn:Author>Jane Doe</bn:Author><am:Title>Introduction to XML</am:Title><am:Publisher>XYZ</am:Publisher></am:Book></am:Bookstore>If elements were defined within a global scope,it would be a problem tocombine elements from multiple documentsslide by Pedro Szekely
    • XMLslide by Pedro Szekely
    • eXtensible Markup Language<h2>Nonmonotonic Reasoning</h2><i>by <b>V. Marek</b> and <b>M. Truszczynski</b></i><br>Springer 1993<br>ISBN 0387976892<book><title>Nonmonotonic Reasoning</title><author>V. Marek</author><author>M. Truszczynski</author><publisher>Springer</publisher><year>1993</year><ISBN>0387976892</ISBN></book>HTML specifies how to display dataXML specifies dataextensibleset of tagsfixedset of tagsslide by Pedro Szekely
    • Merging Problem in XML<Bookstore xmlns=“http://amazon.com”><Book id=“1”><Author>John</Author><Title>Introduction to XML</Title><Publisher>ACM</Publisher></Book><Book id=“2”><Author>Susan</Author><Title>Advanced</Title><Publisher>Springer</Publisher></Book></Bookstore><Bookstore xmlns=“http://amazon.com”><Book id=“1”><Author>John</Author><Title>Introduction to XML</Title></Book><Book id=“2”><Author>Susan</Author><Title>Advanced</Title></Book></Bookstore><Bookstore xmlns=“http://amazon.com”><Book id=“2”><Publisher>Springer</Publisher></Book><Book id=“1”><Publisher>ACM</Publisher></Book></Bookstore>… is difficultDocument 1Document 2Merged Documentslide by Pedro Szekely
    • Does XML Represent Meaning?<course name=“CS101”><instructor> John </instructor><course><instructor name=“John”><teaches>CS 101</teaches><instructor>John is an instructor for CS101Opposite nesting, same information!based on slide from Jose Luis Ambite
    • Does XML Represent Meaning?<course name=“CS101”><instructor> John </instructor><course><instructor name=“John”><teaches>CS 101</teaches><instructor>John is an instructor for CS101hasInstructor inverseOf teachesC,I hasInstructor(C,I) teaches(I,C)range(hasInstructor) = PersonC,I hasInstructor(C,I) Peson(I)based on slide from Jose Luis Ambite
    • Meaning of Data in XML?…<Book><Author>John</Author><Title>Introduction to XML</Title><Publisher>ACM</Publisher><Country>USA</Country></Book>…What is the meaning of Country?… where the book is sold?… where it is published?… where the author lives?… ???slide by Pedro Szekely
    • XML SchemaThe purpose of a schema is todefine a class of XML documents, and so the term"instance document" is often used todescribe an XML documentthat conforms to a particular schemahttp://www.w3.org/TR/xmlschema-0/a syntax checkerslide by Pedro Szekely
    • Example<xsd:complexType name="USAddress" ><xsd:sequence><xsd:element name="name" type="xsd:string"/><xsd:element name="street" type="xsd:string"/><xsd:element name="city" type="xsd:string"/><xsd:element name="state" type="xsd:string"/><xsd:element name="zip" type="xsd:decimal"/></xsd:sequence><xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/></xsd:complexType>Defining the USAddress Type… must have specific elements… in a specific order… filled with specific types of dataslide by Pedro Szekely
    • XML Schema Primitive TypesstringbooleandecimalfloatdoubledurationdateTimetimedategYearMonthgYeargMonthDaygDaygMonthhexBinarybase64BinaryanyURIQnameNOTATIONuseful in RDFslide by Pedro Szekely
    • ResourceDescriptionFrameworkslide by Pedro Szekely
    • The Resource Description Framework (RDF)is a language forrepresenting information about resourcesin the World Wide Webhttp://www.w3.org/TR/rdf-primer/slide by Pedro Szekely
    • Intended for representing metadata about Webresources, such as the title, author, and modification dateof a Web document… also be used to represent information aboutthings that can be identified on the Web,even when they cannot be directly retrieved on the Webexamples include information about items available from on-lineshopping facilities (e.g., prices and availability)Resource Description Frameworkslide by Pedro Szekely
    • Represent Resources Using URIshttp://szekelys.com/family#pedro“Pedro”http://xmlns.com/foaf/0.1/firstNameThat guy has first name “Pedro”slide by Pedro Szekely
    • Represent Information as Tripleshttp://szekelys.com/family#pedro “Pedro”http://xmlns.com/foaf/0.1/firstNameSubjectPredicateObjectThe resource being describedA property of the resourceThe value of the propertyslide by Pedro Szekely
    • Use Namespaceshttp://szekelys.com/family#pedro“Pedro”foaf:firstNamehttp://szekelys.com/family#pedro“Pedro”http://xmlns.com/foaf/0.1/firstNameslide by Pedro Szekely
    • RDF Graphshttp://szekelys.com/family#pedro“Pedro”foaf:firstNamefoaf:Personrdf:typehttp://isi.edu/~szekelyfoaf:homepageslide by Pedro Szekely
    • RDF Graphshttp://szekelys.com/family#pedro“Pedro”foaf:firstNamefoaf:Personrdf:typehttp://isi.edu/~szekelyfoaf:homepageslide by Pedro Szekely
    • Mix Vocabularieshttp://szekelys.com/family#pedro“Pedro”foaf:firstNamefoaf:Personrdf:typehttp://isi.edu/~szekelyfoaf:homepageschema:Personrdf:typehttp://szekelys.com/family#claudiaschema:spouseslide by Pedro Szekely
    • Why Use URIs? URIs look coolslide by Pedro Szekely
    • Why Use URIs? URIs look cool Precisely identify resources Avoid confusion among different “Jose Lopez” Precisely identify properties E.g., name of a company or name of a person Provide information about properties Look them up on the webslide by Pedro Szekely
    • XML vs RDF<course name=“CS101”><instructor> John </instructor><course><instructor name=“John”><teaches>CS 101</teaches><instructor>John is an instructor for CS101usc-people:prof-01“John”ex:isTeacherOfusc-course:cs-101ex:hasInstructorfoaf:name“CSC-101”ex:nameXMLRDFslide by Pedro Szekely
    • RDF SyntaxesLeverages XML toolsHard for humans to readXMLN3, TurtleN-TriplesTerse RDF Triple LanguageHuman readable formatWorks with software tooSubset of turtle, supports streamingStandard for large RDF dumpsRDFaAllows embedding RDF in HTML pagesslide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>Pedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>It’s an XML documentPedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>Here comes some RDFPedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>Namespace declarationsPedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>SubjectPedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>PredicatePedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>ValuePedro’s homepage is "http://isi.edu/~szekely"slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>ValuePedro’s homepage is "http://isi.edu/~szekely"Subject Predicateslide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><rdf:Description rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></rdf:Description></rdf:RDF>http://szekelys.com/family#pedro foaf:firstName“Pedro”slide by Pedro Szekely
    • XML Syntax<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf="http://xmlns.com/foaf/0.1/"><foaf:Person rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></foaf:Person></rdf:RDF>http://szekelys.com/family#pedrofoaf:Personfoaf:firstName“Pedro”rdf:typeslide by Pedro Szekely
    • <?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:foaf=http://xmlns.com/foaf/0.1/><foaf:Person rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></foaf:Person></rdf:RDF><?xml version="1.0"?><rdf:RDF xmlns:rdf=…xmlns:foaf=…<foaf:Person rdf:about="http://szekelys.com/family#pedro"><foaf:firstName>Pedro</foaf:firstName></foaf:Person></rdf:RDF><?xml version="1.0"?><rdf:RDF xmlns:rdf=…xmlns:foaf=…<foaf:Person rdf:about="http://szekelys.com/family#pedro"><foaf:homepage rdf:resource="http://isi.edu/~szekely"/></foaf:Person></rdf:RDF>+slide by Pedro Szekely
    • RDF SyntaxesLeverages XML toolsHard for humans to readXMLN3, TurtleN-TriplesTerse RDF Triple LanguageHuman readable formatWorks with software tooSubset of turtle, supports streamingStandard for large RDF dumpsRDFaAllows embedding RDF in HTML pagesslide by Pedro Szekely
    • N3 and Turtle Syntaxes@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix foaf: <http://xmlns.com/foaf/0.1/> .<http://szekelys.com/family#pedro> foaf:firstName “Pedro” .<http://szekelys.com/family#pedro> rdf:type foafPerson .http://szekelys.com/family#pedrofoaf:Personfoaf:firstName“Pedro”rdf:typeEach triple ends with a dotslide by Pedro Szekely
    • More Complex Structures
    • “USC/ISI’s address is4676 Admiralty Way, Marina del Rey, CA 90292”usc:isischema:address“4676 Admiralty Way, Marina del Rey, CA 90292”.EnglishRDFIn what city is USC/ISI located?Find all universities in Californiaslide by Pedro Szekely
    • “USC/ISI’s address is4676 Admiralty Way, Marina del Rey, CA 90292”usc:isischema:address“4676 Admiralty Way, Marina del Rey, CA 90292”.EnglishRDFHow to represent nested structures?slide by Pedro Szekely
    • “USA”usc:isischema:addressCountryschema:address“CA”“Marina del Rey”“90292”“4676 Admiralty Way” schema:addressLocalityschema:postalCodeschema:addressRegionschema:streetAddressRepresents theaddress of USC/ISIslide by Pedro Szekely
    • “USC/ISI’s address is4676 Admiralty Way, Marina del Rey, CA 90292”usc:isi schema:address usc:isi-address .usc:isi-addressschema:addressCountry “USA” ;schema:addressRegion “CA”schema:addressLocality “Marina del Rey” ;schema:postalCode “90292” ;schema:streetAddress “4676 Admiralty Way” .EnglishRDFslide by Pedro Szekely
    • usc:isi schema:address usc:isi-address .usc:isi-addressschema:addressCountry “USA” ;schema:addressRegion “CA”schema:addressLocality “Marina del Rey” ;schema:postalCode “90292” ;schema:streetAddress “4676 Admiralty Way” .We minted a URI for USC/ISI’s address… but sometimes we don’t want to mint URIsslide by Pedro Szekely
    • usc:isi schema:address _:isi-address ._:isi-addressschema:addressCountry “USA” ;schema:addressRegion “CA”schema:addressLocality “Marina del Rey” ;schema:postalCode “90292” ;schema:streetAddress “4676 Admiralty Way” .Blank nodeBlank Nodesprefix is “_”… can be improved …slide by Pedro Szekely
    • What If I Don’t Know the URI?“Pedro Szekely lives in Los Angeles”English_:pedrofoaf:firstName “Pedro” ;foaf:lastName “Szekely” ;foaf:mbox “szekely1401@gmail.com” ;schema:addressLocality “Los Angeles” .RDFBlank node… is this useful? … maybeslide by Pedro Szekely
    • Typed Literalsgn:bogota weather:event [weather:temperature “10” ;weather:date ”18 June 2012”] .… what is the meaning of the strings?… how do I specify numbers?… how about dates?… how do I specify 10 degrees centigrade?Compact blanknode syntaxslide by Pedro Szekely
    • Typed Literalsgn:bogota weather:event [weather:temperature “10”^^<http://www.w3.org/2001/XMLSchema#integer> ;weather:date ”18 June 2012” ;] .URI specifies the typeslide by Pedro Szekely
    • Typed Literalsgn:bogota weather:event [weather:temperature “10”^^<http://www.w3.org/2001/XMLSchema#integer> ;weather:date ”18 June 2012” ;weather:date ”2012-06-18” ^^xsd:date ;] .… No set of predefined types defined in RDF… Software that consumes RDF must process types… XSD types commonly usedURI from the XML Schemanamespace are popularslide by Pedro Szekely
    • Containers and Collections
    • Bag, Sequence, Alternative<…> “…”rdf:Bag<…><…>rdf:_1rdf:_2rdf:_nrdf:Seq rdf:Altrdf:typeElements, can be URIor literalContainer, often a blank nodeKinds of containersProperties for storingelements in containersslide by Pedro Szekely
    • Bag Exampleexstaff:Sue exterms:publication _:z ._:z rdf:type rdf:Bag ._:z rdf:_1 ex:AnthologyOfTime ._:z rdf:_2 ex:ZoologicalReasoning ._:z rdf:_3 ex:GravitationalReflections .“Three papers that Sue published”slide by Pedro Szekely
    • What’s the Difference?exstaff:Sue exterms:publication _:z ._:z rdf:type rdf:Bag ._:z rdf:_1 ex:AnthologyOfTime ._:z rdf:_2 ex:ZoologicalReasoning ._:z rdf:_3 ex:GravitationalReflections .exstaff:Sue exterms:publication ex:AnthologyOfTime .exstaff:Sue exterms:publication ex:ZoologicalReasoning .exstaff:Sue exterms:publication ex:GravitationalReflections .slide by Pedro Szekely
    • Containers vs CollectionsOpen World Closed WorldIncomplete information Complete InformationThere are things I don’t know If I don’t know it, it does not existScales to the whole Web Does not scaleRDF philosophyContainers Collectionsopen world sets closed world setsslide by Pedro Szekely
    • Reification
    • Why Do We Need Reification?“On June 19 2012, Claudia said thatPedro’s email address is szekely1401@gmail.com”English<http://szekelys.com/family#pedro> foaf:mbox <szekely1401@gmail.com>RDFCorrect? …………………..… No!We need to make a statement about a statementslide by Pedro Szekely
    • Reification“On June 19 2012, Claudia said thatPedro’s email address is szekely1401@gmail.com”English_:s rdf:subject <http://szekelys.com/family#pedro> ._:s rdf:predicate foaf:mbox ._:s rdf:object <szekely1401@gmail.com> ._:s dcterms:date “2012-06-19”^^xsd:date ._:s dcterms:creator <http://uniandes.edu.co/faculty#claudiaj> .RDFslide by Pedro Szekely
    • Problems With Reification_:s rdf:subject <http://szekelys.com/family#pedro> ._:s rdf:predicate foaf:mbox ._:s rdf:object <szekely1401@gmail.com> ._:s dcterms:date “2012-06-19”^^xsd:date ._:s dcterms:creator <http://uniandes.edu.co/faculty#claudiaj> .<http://szekelys.com/family#pedro> foaf:mbox <szekely1401@gmail.com>RDF 1 implies RDF 2?RDF 1RDF 2…..… No!slide by Pedro Szekely
    • Problems With Reification• Needs 3 times more triples• Most software cannot reason with it• Nice idea that does not work well!• Don’t use it, there is a better way_:s rdf:subject <http://szekelys.com/family#pedro> ._:s rdf:predicate foaf:mbox ._:s rdf:object <szekely1401@gmail.com> ._:s dcterms:date “2012-06-19”^^xsd:date ._:s dcterms:creator <http://uniandes.edu.co/faculty#claudiaj> .slide by Pedro Szekely
    • RDF Syntax
    • RDF SyntaxesLeverages XML toolsHard for humans to readXMLN3, TurtleN-TriplesTerse RDF Triple LanguageHuman readable formatWorks with software tooSubset of turtle, supports streamingStandard for large RDF dumpsRDFaAllows embedding RDF in HTML pagesOriginal, stillused, but othersbecoming morepopularslide by Pedro Szekely
    • Turtle Syntaxhttp://www.w3.org/TR/2011/WD-turtle-20110809/
    • Turtle URIs aka IRI<http://example.org/path/><http://example.org/path/#fragment></path><#fragment><>URIs are in <>AbsoluteRelativeto thebasedocumentslide by Pedro Szekely
    • Turtle Prefixes (Namespaces)@prefix foo: <http://example.org/ns#> .@prefix : <http://other.example.org/ns#> .foo:bar foo: : .:bar : foo:bar .Expands toEmptyprefixhttp://example.org/ns#bar http://example.org/ns http://other.example.org/ns .slide by Pedro Szekely
    • Turtle Literals"a string”"""a string""”"""a stringwith newlines"""Strings in “”or write them in “””… so you can breakthem in multiple linesslide by Pedro Szekely
    • Turtle Literals"That Seventies Show""That Seventies Show"@en"Cette Série des Années Soixante-dix"@fr"Cette Série des Années Septante"@fr-be"mylexicaldata"^^<http://example.org/my/datatype>"""10"""^^xsd:decimal- untyped (“London” equivalent to “London”^^xsd:string)language tagdata type- language tag- data type (with a URI)Kinds of literals:slide by Pedro Szekely
    • Turtle Blank Nodes_:me_:a1234[]two blank nodesBlank nodes_:me foaf:firstName “Pedro” ._:me foaf:lastName “Szekely” .[] foaf:firstName “Pedro” .[] foaf:lastName “Szekely” .[ foaf:firstName “Pedro” ;foaf:lastName “Szekely” ;]Examplesslide by Pedro Szekely
    • Turtle Base URI</path><#fragment><>RDF document stored at http://isi.edu/szekely/example.rdf</path><#fragment><><http://isi.edu/szekely/example/path><http://isi.edu/szekely/example/#fragment><http://isi.edu/szekely/example>slide by Pedro Szekely
    • Turtle Base URI# this is a complete turtle document# In-scope base URI is the document URI at this point<a1> <b1> <c1> .@base <http://example.org/ns/> .# In-scope base URI is http://example.org/ns/ at this point<a2> <http://example.org/ns/b2> <c2> .@base <foo/> .# In-scope base URI is http://example.org/ns/foo/ at this point<a3> <b3> <c3> .@prefix : <bar#> .:a4 :b4 :c4 .@prefix : <http://example.org/ns2#> .:a5 :b5 :c5 .<a2> is <http://example.org/ns/a2><a3> is <http://example.org/ns/foo/a3>:a4 is <http://example.org/ns/foo/bar#a4>:a5 is <http://example.org/ns2#a5>slide by Pedro Szekely
    • Turtle “Type” Shortcuthttp://szekelys.com/family#pedro <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> foaf:Person .You can write:http://szekelys.com/family#pedro rdf:type foaf:Person .You can abbreviate it to:http://szekelys.com/family#pedro a foaf:Person .Or even better:slide by Pedro Szekely
    • Turtle Literals Revisited-50110+1Integers:"-5"^^xsd:integer"10"^^<http://www.w3.org/2001/XMLSchema#integer>Integers the hard way:0.01.01.234567890123456789-5.01.3e210e0-12.5e10Floating Point:"1.3e2"^^xsd:double"-5.0"^^<http://www.w3.org/2001/XMLSchema#decimal>Floating point the hard way:truefalseBooleans:"true"^^xsd:booleanBooleans the hard way:slide by Pedro Szekely
    • Turtle Triple Abbreviations:subject :predicate :object-1 .:subject :predicate :object-2 .:subject :predicate :object-1, :object-2 .:subject :predicate-1 :object-1 .:subject :predicate-2 :object-2 .:subject:predicate-1 :object-1 ;:predicate-2 :object-2 .slide by Pedro Szekely
    • XML to N3 Converterhttp://www.mindswap.org/2002/rdfconvert/ slide by Pedro Szekely