Skip to content

Instantly share code, notes, and snippets.

@tansengming
Created February 19, 2010 13:20
Show Gist options
  • Select an option

  • Save tansengming/308689 to your computer and use it in GitHub Desktop.

Select an option

Save tansengming/308689 to your computer and use it in GitHub Desktop.
Owl By Example
<!-- Class / Concept -->
<owl:Class rdf:ID="a_subclass">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Subsclass of a class</rdfs:label>
<rdfs:subClassOf>
<owl:Class rdf:ID="a_class"/>
</rdfs:subClassOf>
</owl:Class>
<!-- Simple Instance -->
<Route rdf:ID="Route_1">
</Route>
<!-- Instance with a Reference to Another Instance -->
<Country rdf:ID="Thailand">
<isRoutetStartingCountry rdf:resource="#Route_1"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Thailand</rdfs:label>
</Country>
<!-- Instance in an Instance -->
<Route rdf:ID="Route_1">
<hasRouteStartingCountry>
<Country rdf:ID="Thailand">
<isRoutetStartingCountry rdf:resource="#Route_1"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Thailand</rdfs:label>
</Country>
</hasRouteStartingCountry>
</Route>
<!--
Reference: http://www.w3schools.com/rdf/rdf_reference.asp
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment