java - Jena; How to check A subClassOf B without iterating A super classes nor B sub classes -
let's have ontology manipulated jena , 2 ontology classes (ontclass
), , b. there method check
a subclassof b
without iterating through super classes , checking if b among them. without iterating b sub classes , checking if among them. mean
a.issubclassof(b)
the best place check documentation. (actually, using ide has support autocompletion make easy find, too.) in case, documentation ontclass has 2 methods you're asking for. it's not issubclass, rather hassubclass(resource). there's hassuperclass(resource). instance, check whether subclass of b, do:
ontclass = ...; ontclass b = ...; a.hassuperclass(b); // have b superclass? b.hassubclass(a); // b have subclass?
Comments
Post a Comment