OwlReady2: How to obtain the data properties of an individual?

Viewed 24

I am using owlready2 library in Python. I load my ontology and I tried to consult the data properties of an individual called 'Prod1' without success (I obtained the properties of the whole ontology but not for the specific individual I want). How can I consult the properties of the object I need (see the code below)?

import owlready2
from owlready2 import *

onto = get_ontology("Atributos_complete.owl")
onto.load()
y = "Prod1"
for x in onto.individuals():
    if x.name == y:
        print (list(onto.data_properties()))
0 Answers
Related