Hi,

On 19/07/12 11:18, Olivier Rossel wrote:
Hello all.

I have a small ontology:

<?xml version="1.0"?>
<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:owl="http://www.w3.org/2002/07/owl#"; >
<owl:Class rdf:about="http://dbpedia.org/class/yago/Album106591815"/>
<owl:Class 
rdf:about="http://dbpedia.org/class/yago/HostCitiesOfTheCommonwealthGames"/>
<owl:ObjectProperty rdf:about="http://dbpedia.org/property/after";>              
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="http://dbpedia.org/class/yago/Album106591815"/>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
</owl:ObjectProperty>
</rdf:RDF>

that I load in a Jena OntModel with OntSpec set to OWL_MEM_MICRO_RULE_INF .

When I ask Jena to listHierarchyRootClasses(), I get only
HostCitiesOfTheCommonwealthGames.

If I change my ontology so the unionOf contains
HostCitiesOfTheCommonwealthGames instead of Album106591815,
and I ask Jena to listHierarchyRootClasses(), then I get only Album106591815.

Is there something wrong in my modeling? Or is OWL_MEM_MICRO_RULE_INF
too limited to manage my ontology?

Neither, it's a combination of how you are printing things and Jena's RDF-centric view of the world.

From an RDF point of view the anonymous union class you are creating is a perfectly valid class and so counts as a hiearchyRoot. So your above example has the class structure:

   > HostCitiesOfTheCommonwealthGames
   > _:1  > Album106591815

where _:1 is meant to represent the anonymous class.

When I run listHierarchyRootClasses (with OWL_MEM_MICRO_RULE_INF) on your data then in fact I see two classes listed, one bNode and HostCitiesOfTheCommonwealthGames.

Dave


Reply via email to