0

I am a newbie to OWL, and I have defined a node using OWL DL, as

<Declaration>
    <Class IRI="#node"/>
</Declaration>
<Declaration>
    <ObjectProperty IRI="#leftChild"/>
</Declaration>
<Declaration>
    <ObjectProperty IRI="#parent"/>
</Declaration>
<Declaration>
    <ObjectProperty IRI="#rightChild"/>
</Declaration>
<InverseObjectProperties>
    <ObjectProperty IRI="#parent"/>
    <ObjectProperty IRI="#leftChild"/>
</InverseObjectProperties>
<InverseObjectProperties>
    <ObjectProperty IRI="#parent"/>
    <ObjectProperty IRI="#rightChild"/>
</InverseObjectProperties>
<FunctionalObjectProperty>
    <ObjectProperty IRI="#leftChild"/>
</FunctionalObjectProperty>
<FunctionalObjectProperty>
    <ObjectProperty IRI="#parent"/>
</FunctionalObjectProperty>
<FunctionalObjectProperty>
    <ObjectProperty IRI="#rightChild"/>
</FunctionalObjectProperty>
<ObjectPropertyDomain>
    <ObjectProperty IRI="#leftChild"/>
    <Class IRI="#node"/>
</ObjectPropertyDomain>
<ObjectPropertyDomain>
    <ObjectProperty IRI="#parent"/>
    <Class IRI="#node"/>
</ObjectPropertyDomain>
<ObjectPropertyDomain>
    <ObjectProperty IRI="#rightChild"/>
    <Class IRI="#node"/>
</ObjectPropertyDomain>
<ObjectPropertyRange>
    <ObjectProperty IRI="#leftChild"/>
    <Class IRI="#node"/>
</ObjectPropertyRange>
<ObjectPropertyRange>
    <ObjectProperty IRI="#parent"/>
    <Class IRI="#node"/>
</ObjectPropertyRange>
<ObjectPropertyRange>
    <ObjectProperty IRI="#rightChild"/>
    <Class IRI="#node"/>
</ObjectPropertyRange>

`

and I would like to define concepts as root, branch ad leaves, so as to infer and segregate nodes as root, branches and leaves,as root will have no parent, branch having a parent ad atleast one child, and leaves having only parent and no child, or orphan nodes having no parent ad no child.

1 Answers1

0

If you want this hierarchy to match the subclass hierarchy in your ontology, you can use SubClassOf axioms to connect ancestors and children. Then, your roots will be the ones whose only ancestor is owl:Thing, your leaves will be the ones whose only descendant is owl:Nothing, and your branches will be all the remaining classes.

Ignazio
  • 10,504
  • 1
  • 14
  • 25