考虑一个命名的个体“牛”。它的类也是“牛”,而牛又是哺乳动物的子类,哺乳动物是生物的子类,依此类推。如果我可以访问 OWLNamedIndividual 如下:-
for (OWLNamedIndividual i : localUni.getIndividualsInSignature())
{
Code that should give me ...
i = Cow (NamedIndividual)
Class = Cow
One Level up class = Mammal
}
我尝试了以下但无济于事
System.out.println(i.getEntityType().getName() );
System.out.println(i.getEntityType().toString() );
System.out.println(i.getTypes(myontology) ); // this would give me error NoSuchMethodError
谢谢。