Administrator
|
Annotation on relations can be obtained using the "annotation[subject, relation, object]" syntax. The relation can either be a Property or one of the special values from the owlready2 module, corresponding to RDFS and OWL relations. Annotation on equivalent class axioms are considered as annotation on the relation "equivalentclass".
For example, if your ontology is named "onto", you obtain your annotations using:
from owlready2 import *
print( onto.likelihood[onto.classA, owl_equivalentclass, onto.classA.equivalent_to[0]] )
where onto.classA.equivalent_to[0] is the first "equivalent class" axiom on class A (you can loop on onto.classA.equivalent_to if there are several).
There is no glossary yet, but it would be a good idea! For attribute, it is more complex, because Properties are translated to new attributes, so it is not possible to list all of them.
|