1 / 14

Sheet 9 RDF

Sheet 9 RDF. Organization. Exam will be on Tue. 17.07.2007 from 10-12 Room A9 Please register via email Old exams are posted Exams have English and German version. @prefix r: < http://ismll.de/rdf/uni# >. r: uniHI r:locatedat r: uniHI_location.

aden
Download Presentation

Sheet 9 RDF

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. Sheet 9RDF

  2. Organization • Exam will be on Tue. 17.07.2007 from 10-12 • Room A9 • Please register via email • Old exams are posted • Exams have English and German version

  3. @prefix r: <http://ismll.de/rdf/uni#>. r: uniHI r:locatedat r: uniHI_location. r: uniHI_location r:street “Marienburger Platz 22”; r:ZIP “31134”; r:city “Hildesheim”; r:country “Germany”.

  4. Marienburger…. r:street 31134 r:uniHI r:ZIP r:locatedat r:locatedat r:city Hildesheim r:country Germany @prefix r: <http://ismll.de/rdf/uni#>. r: uniHI r:locatedat _:abc. _:abc r:street “Marienburger Platz 22”; r:ZIP “31134”; r:city “Hildesheim”; r:country “Germany”.

  5. What’s wrong? @prefix r: <http://ismll.de/rdf/uni#>. r: uniHI _:locatedat r: uniHI_location. r: uniHI_location r:street “Marienburger Platz 22”; r:ZIP “31134”; r:city “Hildesheim”; r:country “Germany”. @prefix r: <http://ismll.de/rdf/uni#>. “Uni HI” r:locatedat r: uniHI_location. r: uniHI_location r:street “Marienburger Platz 22”; r:ZIP “31134”; r:city “Hildesheim”; r:country “Germany”.

  6. @prefix xs: <http.//www.w3.org/2001/XMLSchema#>. @prefix p: <http://www.cgnm.de/rdf/products#>. @prefix : <#>. :Products rdf:type rdfs:Class. :title rdf:type rdf:Property; rdf:domain :Products; rdf:range xs:string. :price rdf:type rdfs:Property; rdf:domain :Products; rdf:range xs:decimal. :Book rdf:type rdfs:subClassOf:Products. :author rdf:type rdf:Property; rdf:domain :Book; rdf:range xs:string. :CD rdf:type rdfs:subClassOf:Products. :interpret rdf:type rdf:Property; rdf:domain :CD; rdf:range xs:string. :DVD rdf:type rdfs:subClassOf:Products. :director rdf:type rdf:Property; rdf:domain :DVD; rdf:range xs:string. :title rdf:type rdf:Property; rdf:domain :book; rdf:domain :cd; rdf:domain :dvd; rdf:range xs:string. :price rdf:type rdf:Property; rdf:domain :book; rdf:domain :cd; rdf:domain :dvd; rdf:range xs:decimal. :book :title „Learning XML“ . :book :author „EricRay“ . :book :price „30.00“ . :cd :title „for you“ . :cd :interpret „Frank Chastenier“ . :cd :price „15.00“ . :dvd :title „Goldrush“ . :dvd :director „Charly Chaplin“ . :dvd :price „19.00“ .

  7. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE rdf:RDF [ <!ENTITY xs "http://www.w3.org/2001/XMLSchema#"> <!ENTITY v "http://www.cgnm.de/rdf/vehicles#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY p "http://www.cgnm.de/rdf/person#"> ]> <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:v="http://www.cgnm.de/rdf/vehicles#" xml:base="http://www.cgnm.de/rdf/vehicles#" xmlns:p="http://www.cgnm.de/rdf/vehicles#"> <rdfs:Class rdf:about="#Vehicle"/> <rdfs:Class rdf:about="#Truck"> <rdfs:subClassOf rdf:resource="#Vehicle"/> </rdfs:Class> <rdfs:Class rdf:about="#Van"> <rdfs:subClassOf rdf:resource="#Vehicle"/> </rdfs:Class> <rdfs:Class rdf:about="#FamilyVehicle"> <rdfs:subClassOf rdf:resource="#Vehicle"/> </rdfs:Class> <rdfs:Class rdf:about="SUV"> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#FamilyVehicle"/> </rdfs:Class>

  8. <rdf:Description rdf:about="belongsTo"> <rdf:type rdf:resource="&rdf;Property"/> <rdfs:domain rdf:resource="#Vehicle"/> <rdfs:range rdf:resource="&p;person"/> </rdf:Description> <rdf:Property rdf:about="numberOfDoors"> <rdfs:domain rdf:resource="#FamilyVehicle"/> <rdfs:range rdf:resource="&xs;integer"/> </rdf:Property> <rdf:Description rdf:type="#FamilyVechicle"> <v:belongsTo rdf:resource="&p;Karen"/> <v:numberOfDoors rdf:datatype="&xs;integer"> 5</v:numberOfDoors> </rdf:Description> </rdf:RDF> <v:FamilyVechicle rdf:ID="myCar"> <v:belongsTo rdf:resource="&p;Karen"/> <v:numberOfDoors rdf:datatype="&xs;integer"> 5</v:numberOfDoors> </v:FamilyVechicle>

  9. rdf:ID vs. rdf:about • The rdf:ID (node element) can be used instead of rdf:about • E.g. rdf:ID="name", the same as rdf:about="#name". • rdf:ID provides an additional check • name can only appear once

  10. Redland Raptor RDF Parser Demonstration • http://librdf.org/parse

More Related