[Pellet-users] A simple OWL-DL query
João Paulo Sousa
jpaulo at ipb.pt
Tue Feb 12 18:34:40 UTC 2008
Hi,
I have the above ontology, basically it's define a person and a
location, and the person can have a location.
In this sample steve is in the bar and bill is in theater, and the bar
isPartOf (Transitive property) theater.
It's possible to make a query to know if steve is in the theater? But
using the Transitive property, of course ;-) . How to make this
query? :-)
Cheers,
João Paulo.
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<rdf:RDF xmlns="http://example.org#"
xml:base="http://example.org"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about=""/>
<Room rdf:ID="bar">
<isPartOf rdf:resource="#theater"/>
</Room>
<Person rdf:ID="bill">
<hasLocation rdf:resource="#theater"/>
</Person>
<owl:Class rdf:ID="Building">
<rdfs:subClassOf rdf:resource="#Spac"/>
</owl:Class>
<owl:ObjectProperty rdf:ID="contains">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
<rdfs:domain rdf:resource="#Spac"/>
<rdfs:range rdf:resource="#Spac"/>
<owl:inverseOf rdf:resource="#isPartOf"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="hasLocation">
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="#Spac"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="isPartOf">
<rdfs:domain rdf:resource="#Spac"/>
<rdfs:range rdf:resource="#Spac"/>
<owl:inverseOf rdf:resource="#contains"/>
</owl:ObjectProperty>
<owl:Class rdf:ID="Person"/>
<owl:Class rdf:ID="Room">
<rdfs:subClassOf rdf:resource="#Spac"/>
</owl:Class>
<owl:Class rdf:ID="Spac"/>
<Person rdf:ID="steve">
<hasLocation rdf:resource="#bar"/>
</Person>
<Building rdf:ID="theater">
<contains rdf:resource="#bar"/>
</Building>
</rdf:RDF>
More information about the Pellet-users
mailing list