which when loaded to Protege results in two DO classes instead of one. One of those DO classes has correct IRI but no instances/individuals, the second one with an IRI equal to the filepath to onotology (obviously worng IRI) has a HorWdSpd individual related to it.
However, if I use "#" instead for IRI entities (i.e., base_iri#ClassName):
onto = get_ontology("http://knowledge.graph/wind")
define_datatype_in_ontology(VestasNaming, "http://knowledge.graph/wind#VestasNaming", onto)
class DO(Thing):
namespace = onto
class notation(Thing >> VestasNaming):
namespace = onto
HorWdSpd = DO("HorWdSpd", namespace = onto,
label="Horizontal Wind Speed",
comment="IEC data object instance for Horizontal Wind Speed")
HorWdSpd.notation.append(VestasNaming("WindSpeed"))
onto.save("./ontology.xml")
everything works as expected and resulting XML is correct:
First of all, a fantastic tool!
I played with it today making ontology.
I noticed issues in generated ontology if I use "/" instead of "#" for entities IRIs.
Code for IRIs which use "/":
which results in
which when loaded to Protege results in two DO classes instead of one. One of those DO classes has correct IRI but no instances/individuals, the second one with an IRI equal to the filepath to onotology (obviously worng IRI) has a HorWdSpd individual related to it.
However, if I use "#" instead for IRI entities (i.e., base_iri#ClassName):
everything works as expected and resulting XML is correct:
which when loaded in Protege result in a single class DO, and HorWdSpd instance of it.
Is there anything I should do to make sure that entity IRIs which use "/" work properly when ontology is exported to XML?