|
Hello, I am using owlready to only read an ontology and store classes' names, object properties, data properties, and individuals.
I've been looking at the documentation and there are simple things I cannot find.
First of all do you have an API documentation for owlready?
Here ware what I am trying to do but with no success.
- How do we retrieve the object properties and data properties for an individual?
What I have so far is this:
onto = get_ontology("file://ariac-rdf-xml.owl").load()
class_list = list(onto.classes())
for c in class_list:
print("C: {0}".format(c))
individual_list = onto.search(type=c) # Get all the individual from each class
for i in individual_list:
# todo: get all the object properties along with range for each individual
# part_1 has_pose pose_1: I would like to grab has_pose and pose_1
# todo: get all the data properties for each individual along with the value:
# pose_1 has_x 2: I would like to grab has_x and 2
It would be very helpful if you could help me. To summarize:
- How to retrieve object properties and data properties for an individual.
- Also, from an individual, how to get its class?
Thank you very much.
|