Using the ontopuml library, complex class expression can be drawn in cascade. Two slightly different notational styles can be used for detailed and quick diagramming. Before we describe these two styles, a short overview of OWL axioms is given.
An ontology is primarily consists of a set of axioms. Although, axioms can be of both nonlogical, such as, declaration of class, individual, object properties, data properties, and annotation properties as well as logical statements.
OWL 2 provides axioms that allow relationships to be established between class expressions. The SubClassOf axiom allows one to state that each instance of one class expression is also an instance of another class expression, and thus to construct a hierarchy of classes. The EquivalentClasses axiom allows one to state that several class expressions are equivalent to each other. The DisjointClasses axiom allows one to state that several class expressions are pairwise disjoint — that is, that they have no instances in common. Finally, the DisjointUnion class expression allows one to define a class as a disjoint union of several class expressions and thus to express covering constraints.
If class A is SubClassOf class expression B, then class expression B is the necessary condition and if class expression B is SubClassOf class A, then B is the sufficient condition for class A. If class A is EquivalentTo class expression B, then class expression B is necessary and sufficient condition for A.
In the detailed method, every class expression, including a simple class declaration, is drawn using aliases. Aliases are variables which can be reused in place of the entire class name. In this method, the class expressions are drawn separately before joining or comosing them to form a complex axioms.
Let's consider the following axiom from IOF Core.
Class: ProcuringBusinessProcess
EquivalentTo:
BusinessProcess
and ('has occurrent part' some BuyingBusinessProcess)
and ('has occurrent part' some (SellingBusinessProcess or SupplyingBusinessProcess))
ce1 = SellingBusinessProcess or SupplyingBusinessProcess ce2 = 'has occurrent part' some (ce1) ce3 = 'has occurrent part' some BuyingBusinessProcess ce4 = BusinessProcess and (ce3) and (ce2)
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c3, iof:BuyingBusinessProcess)
class(c4, iof:SellingBusinessProcess)
class(c5, iof:SupplyingBusinessProcess)
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c3, iof:BuyingBusinessProcess)
class(c4, iof:SellingBusinessProcess)
class(c5, iof:SupplyingBusinessProcess)
intersection(ce1, '["c4", "c5"]')
some(ce3, bfo:hasOccurrentPart, c3)
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c3, iof:BuyingBusinessProcess)
class(c4, iof:SellingBusinessProcess)
class(c5, iof:SupplyingBusinessProcess)
union(ce1, '["c4", "c5"]')
some(ce3, bfo:hasOccurrentPart, c3)
some(ce2, bfo:hasOccurrentPart, ce1)
intersection(ce4, '["c2", "ce2", "ce3"]')
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c3, iof:BuyingBusinessProcess)
class(c4, iof:SellingBusinessProcess)
class(c5, iof:SupplyingBusinessProcess)
union(ce1, '["c4", "c5"]')
some(ce3, bfo:hasOccurrentPart, c3)
some(ce2, bfo:hasOccurrentPart, ce1)
intersection(ce4, '["c2", "ce2", "ce3"]')
equivalent(c1, ce4)
class(c1, iof:ProcuringBusinessProcess)
class(c2, iof:BusinessProcess)
class(c3, iof:BuyingBusinessProcess)
class(c4, iof:SellingBusinessProcess)
class(c5, iof:SupplyingBusinessProcess)
union(ce1, '["c4", "c5"]')
some(ce3, bfo:hasOccurrentPart, c3, right)
some(ce2, bfo:hasOccurrentPart, ce1, right)
union(ce4, '["c2", "ce2", "ce3"]', right)
equivalent(c1, ce4, right)
ontopuml provides a set of alternative commands which produces class diagram with abridged visual notations using less numeber of nodes. Also this alternative set of commands The abridged notation avoid drawing the anonymous classes (empty squares) representing the class expression. However, this notation has certain limitations in expressing complex axioms.
Class: ProcuringBusinessProcess
EquivalentTo:
BusinessProcess
and ('has occurrent part' some BuyingBusinessProcess)
and ('has occurrent part' some (SellingBusinessProcess or SupplyingBusinessProcess))