-
Notifications
You must be signed in to change notification settings - Fork 10
2. What is a Descriptor?
OWLOOP enables interaction with 'OWL entities', i.e, Concept (also known as, Class), Individual, Object property and Data property as objects within the OOP paradigm. These objects are termed as Descriptors. A descriptor is composed of three parts, i.e, Ground, Expression and EntitySet.
- A descriptor's Ground: is an OWL entity.
- A descriptor's Expression: represents an expression (or expressions) of the Ground.
- A descriptor's EntitySet: is a set of OWL entities associated to the to the Ground via an Expression.
Quick example:
- A descriptor's Ground (of OWL entity type
OWLClass
): Socrates - A descriptor's Expression: SubClassOf
- A descriptor's EntitySet (of OWL entity type
OWLClass
): [Human, Mortal]
Once a descriptor is instantiated with a specific ground (i.e., OWLEntity
) and reference to an ontology file (i.e., OWLReference
), it offers the following methods:
-
readExpressionAxioms()
: modifies the descriptor's internal state (the representation of the ontology within the OOP domain) to be equal to the state of the ontology. It reads the asserted and inferred axioms from the ontology. Furthermore, this method returns the modifications it makes, to its internal state. Note that, by default it does not call the reasoning task (this can be changed by a flag). -
writeExpressionAxioms()
: modifies the state of the ontology to be equal to the the descriptor's internal state. Furthermore, this method returns the modifications it makes, to the state of the ontology. Note that, by default it does not call the reasoning task. -
get()
: gets the axioms (i.e, entitySet) based on the ground and expression. Based on the most recentreadExpressionAxioms()
orwriteExpressionAxioms()
. -
query()
: gets the axioms (i.e, entitySet) based on the ground and expression. By doingreadExpressionAxioms()
. -
add()
: adds axioms (i.e, entitySet) to the internal state of the descriptor, based on the ground and a particular expression. An example shows how to add axioms. -
remove()
: removes axioms (i.e, entitySet) from the internal state of the descriptor, based on the ground and a particular expression. An example shows how to remove axioms. -
build()
: allows to build one descriptor from another. For example, if the ground of an individual descriptor is corridor1 and this individual descriptor implements theType
expression, which allows to find the ontological type of the individual corridor1. Then, by using thebuild()
method we get a concept descriptor whose ground is the ontological type of the individual corridor1. An example shows how to build one descriptor from another. -
reason()
: it synchronizes the reasoner to obtain the latest inferences in the ontology. -
saveOntology(pathToOntoFile)
: it allows to save the current state of the ontology in the path provided in the method's parameter.
Apart from the above commonly used Descriptor methods, each Descriptor provides getOntologyReference()
method. This Descriptor method returns reference to the ontology file (i.e., an object of the class OWLReference
) with which it is associated. Using OWLReference
you have access to classes provided by OWL-API via methods in aMOR. Therefore, lower-level aMOR methods allow access to the OWL-API classes OWLOntologyManager
, OWLDataFactory
, OWLOntology
and OWLReasoner
.
OWLOOP maps most of the features of OWL but not all. For example it implements only the commonly used expressions for each type of descriptor. The remaining expressions will be added when the need arises.
A hint, you may want to use Protege to add sophisticated axioms or rules, that do not change in the ontology at run time and load that ontology as a starting point for your system.
Break this page into two parts .. (1) descriptor construction .. (2) descriptor utilization