return hasPropertyValue( getProfile().SUB_CLASS_OF(), "SUB_CLASS_OF", cls );
}
else {
// we want the direct, not general relationship
// first try to find an inf graph that can do the work for us
InfGraph ig = null;
if (getGraph() instanceof InfGraph) {
ig = (InfGraph) getGraph();
}
else if (getGraph() instanceof OntModel) {
OntModel m = (OntModel) getGraph();
if (m.getGraph() instanceof InfGraph) {
ig = (InfGraph) m.getGraph();
}
}
if (ig != null && ig.getReasoner().supportsProperty( ReasonerVocabulary.directSubClassOf )) {
// we can look this up directly
return hasPropertyValue( ReasonerVocabulary.directSubClassOf, "direct sub-class", cls );
}
else {
// otherwise, not an inf-graph or the given inf-graph does not support direct directly (:-)