Overloading Ontology class methods

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

Overloading Ontology class methods

emir
Hello!

How to properly overload Ontology class? Since we use get_ontology to create new ontologies, what is the right way to make a custom ontology class based on class Ontology so that I can overload a couple of methods?
Reply | Threaded
Open this post in threaded view
|

Re: Overloading Ontology class methods

Jiba
Administrator
Hi,

Currently, it is not possible to do that... To fix that, I've added the OntologyClass argument to the get_ontology function (and similarly for the get_namespace function), in the development version.

You can download the development version on Bitbucket. You may also just create the ontology with YourOntologyClass("base iri"), provided that the base IRI ends with # or /, and that the ontology does not exist yet in Python (these two tasks are normally handled by get_ontology()).

Jiba