On 19/07/12 12:19, Dave Reynolds wrote:
Hi,

On 19/07/12 11:18, Olivier Rossel wrote:
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.

In theory, you should be able to use OntTools.namedHierarchyRoots() to list the non-anonymous root classes of a class hierarchy. However, Olivier's example, using a reasoner attached to the model has revealed a bug in the namedHierarchyRoots code. I'll log an issue to fix that bug, but in the meantime you can work around it as follows:

https://gist.github.com/3143188

Ian

Reply via email to