Re: How to import instances and its corresponding property values from database to an ontology

Posted by jui guram on
URL: http://owlready.306.s1.nabble.com/How-to-import-instances-and-its-corresponding-property-values-from-database-to-an-ontology-tp387p396.html

Hi,

Thank you everyone for your response.I realized the mistake.So what is happening when I dynamically create my properties,I create the primary keys as Inverse Functional Property like below.

with onto:
                ontology_object_property = types.new_class(tuple[0]+"Pkey",(InverseFunctionalProperty,))
                                        ontology_object_property.range = [datatype]
                                        ontology_object_property.domain = [domain]
                                        domain.is_a.append(ontology_object_property.min(1,str))

tuple[0] is the name of the property.
IT creates customerNumberPkey as a object property and also an data property since in OWL full datatype property is a subclass of object property.Since they are two types pf propertys with the same name it gets confused when I am creating the instance.

The solution for this is I guess to use OWL DL where datatype property and Object property are disjoint.

How to write in OWL DL with Owlready2 ? or is there any way to make the object property and data property base classes disjoint?

Regards,
Jui