Saving Ontology with Added Individuals and Data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving Ontology with Added Individuals and Data

Avraheem
I have loaded an owl ontology first in Protege where I defined all relations, then I loaded it with owlready to populate it with data in realtime, but when I want to save the new added data and individuals to ontology with onto.save() in Owlready2, it save it to rdf/xml format, but this does not work in Protege? Is there any solution for that or I should do reasoning in Owlready2 itself with SWRL rather than loading it back to Protege?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Saving Ontology with Added Individuals and Data

Jiba
Administrator
Hi,

Normally you can save the ontology to OWL and open it in Protégé.

Possibly, something went wrong in the individual creation, or maybe you created the individual in another ontology?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Saving Ontology with Added Individuals and Data

Avraheem
I tried the following, but it does not work:
  onto.save(file = "updated_ontology", format = "owl")

The following works, but I want it it owl:
  onto.save(file = "updated_ontology", format = "rdfxml")
Reply | Threaded
Open this post in threaded view
|

Re: Saving Ontology with Added Individuals and Data

Jiba
Administrator
Hi,

Owlready can currently save only in the RDF/XML and NTriple file format.

Note that RDF/XML is considered as "OWL" (serialization of an OWL ontology), and is actually the most common OWL file format.

Jiba