Hi,
You can do this easily, by creating 2 ontologies.
Here is an example :
from owlready2 import *
main_onto = get_ontology("
http://test.org/main_ontology.owl")
sub_onto = get_ontology("
http://test.org/sub_ontology.owl")
with main_onto:
class MyClass(Thing): pass
sub_onto.imported_ontologies.append(main_onto) # Not strictly needed
with sub_onto:
my_instance = MyClass()
main_onto.save("/tmp/main_onto.owl")
sub_onto .save("/tmp/sub_onto.owl")
Jiba