In my code I attempt to do OWL subclass inference by creating a Jena OntModel
using the code:
- OntModel hModel =
ModelFactory.creatOntologyModel(OntModelSpec.OWL_DL_MEM_TRANS_INF);
And checking for subclass existence using the code:
- Boolean pd =
propDomain.asClass().hasSubClass(domainTypeStatement.getObject().asResource());
OWL_DL_MEM_TRANS_INF - is a specification for OWL DL models that are stored in
memory and use the transitive inference for additional entailments. This is
sufficient for subclass inference of simple classes
(Entity<-AbstractEntity<-Account<-FinancialAccount<-BankAccount), but is not
sufficient for subclass inference of more complex classes:
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="#Device"/>
<rdf:Description rdf:about="#FacilityRegion"/>
</owl:unionOf>
</owl:Class>
and CommunicationDevice. I've tried to use different OntModelSpecs to get the
subclass inference that I am looking for but I haven't been able to identify
the correct one. I've tried:
- OntModel hModel =
ModelFactory.creatOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
but it seems to have the opposite effect where it can capture the subclass
inference involving more complex classes but not the simple class subclass
inference. Any advice on the correct Jena OntModelSpec to use to capture
relatively easy subclass inference would be appreciated.
- Wayne