Skip to content

Instantly share code, notes, and snippets.

@mmowbray
Last active November 18, 2015 20:33
Show Gist options
  • Save mmowbray/73a811bb7da67fc8ed1b to your computer and use it in GitHub Desktop.
Save mmowbray/73a811bb7da67fc8ed1b to your computer and use it in GitHub Desktop.
<rdf:RDF
xmlns = "http://www.example.com/university#"
xml:base = "http://www.example.com/university#"
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema#"
>
<!-- RDF Schema (Domain Model) -->
<rdf:Description rdf:about="#Person">
<rdfs:label xml:lang="en">Person</rdfs:label>
<rdf:type rdf:resource="rdf:Class"/>
</rdf:Description>
<rdf:Description rdf:about="#Professor">
<rdfs:label xml:lang="en">Professor</rdfs:label>
<rdf:type rdf:resource="rdf:Class"/>
<rdfs:subClassOf rdf:resource="#Person"/>
</rdf:Description>
<rdf:Description rdf:about="#Student">
<rdfs:label xml:lang="en">Student</rdfs:label>
<rdf:type rdf:resource="rdf:Class"/>
<rdfs:subClassOf rdf:resource="#Person"/>
</rdf:Description>
<rdf:Property rdf:about="#teaches">
<rdfs:label xml:lang="en">teaches</rdfs:label>
<rdfs:comment>Profs teach students</rdfs:comment>
<rdfs:domain rdf:resource="#Professor"/>
<rdfs:range rdf:resource="#Student"/>
</rdf:Property>
<rdf:Property rdf:about="#firstname">
<rdfs:label xml:lang="en">firstname</rdfs:label>
<rdfs:comment>This relationship represents a person's first name</rdfs:comment>
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="xsd:string"/>
</rdf:Property>
<rdf:Property rdf:about="#lastname">
<rdfs:label xml:lang="en">lastname</rdfs:label>
<rdfs:comment>This relationship represents a person's last name</rdfs:comment>
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="xsd:string"/>
</rdf:Property>
<!-- Data Instances -->
<rdf:Description rdf:about="#mowbray">
<rdf:type rdf:resource="#Student"/>
<firstname>Maxwell</firstname>
<lastname>Mowbray</lastname>
</rdf:Description>
<rdf:Description rdf:about="#witte">
<rdf:type rdf:resource="#Professor"/>
<firstname>Rene</firstname>
<lastname>Witte</lastname>
<teaches rdf:resource="#mowbray"/>
</rdf:Description>
</rdf:RDF>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment