On Mon, Apr 1, 2013 at 1:47 PM, David Jordan <[email protected]> wrote: > I added the call to prepare(). > I changed the ontology to the following, it did not really make much > difference in performance, still very slow. > > :numWheels > a owl:FunctionalProperty ; > a owl:DatatypeProperty ; > rdfs:domain :Vehicle ; > rdfs:range xsd:integer . > > :Motorcycle > a owl:Class ; > rdfs:subClassOf :Vehicle ; > a [ a owl:Restriction ; > owl:hasValue "2"^^xsd:nonNegativeInteger ; > owl:onProperty :numWheels > ] .
The definition of Motorcyle isn't right. Motorcycle (the class) isn't something that has numWheels 2. The class, being a class, and not a vehicle, shouldn't have any value for numWheels at all. The model shouldn't "Motorcycle a [ a owl:Restriction ... ]", but rather "Motorcycle rdfs:subClassOf [a owl:Restriction ...]". The Jena reasoners will operate on OWL full where you can say just about anything, but the model above isn't OWL DL, which is what most users typically want to stay within. Using some of the ontology profile checking tools might be a good test to include somewhere along the line. (E.g., Pellet comes with some command line tools for this, and there are online validators too, e.g., http://www.mygrid.org.uk/OWL/Validator ). //JT -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
