Interface | Description |
---|---|
OWLGraphWrapper.ISynonym |
Class | Description |
---|---|
AxiomAnnotationTools |
These are helper methods to check and modify axiom annotations.
|
AxiomAnnotationTools.AxiomAnnotationsChanger |
Visitor which returns a new axiom of the same type with the new annotations.
|
CardinalityContraintsTools |
Tools to handle cardinality constraints in OWL.
|
CardinalityContraintsTools.CardinalityReporter | |
OWLGraphEdge | |
OWLGraphEdge.OWLGraphEdgeSet |
Represents a
Set of OWLGraphEdge s. |
OWLGraphManipulator |
This class provides functionalities to modify an ontology to simplify its graph structure.
|
OWLGraphUtil |
general static methods for additional graph operations
|
OWLGraphWrapper |
Wraps one or more OWLOntology objects providing convenient OBO-like operations
|
OWLGraphWrapper.Synonym | |
OWLGraphWrapperBasic |
Basic methods for handling multiple
OWLOntology objects as one graph. |
OWLGraphWrapperEdges |
Methods to extract and traverse relation in the graph.
|
OWLGraphWrapperEdgesAdvanced | |
OWLGraphWrapperEdgesExtended |
This class groups methods that could be modified, or added
to
OWLGraphWrapper and parent classes. |
OWLGraphWrapperExtended |
Methods to extract values from entities in the graph with potential multiple
OWLOntology objects. |
OWLQuantifiedProperty | |
RelationSets |
Enum | Description |
---|---|
OWLQuantifiedProperty.Quantifier |
Exception | Description |
---|---|
SharedLabelException |
OWLOntology
objects.
An OGW consists of a source ontology, and zero or more support ontologies. The support ontologies are generally not required to be connected to the source ontology via imports.
See the core OWLGraphWrapper
object
An OGW provides convenience methods for looking up entities by their label, querying for synonyms, text definitions, OBO subsets, etc.
It is assumed that the ontology makes use of the vocabulary specified in the official obo-owl mapping (i.e. a combination of IAO plus addition custom vocabulary elements).
The OWL API provides methods for querying and processing the axioms and expressions in an OWL ontology. The OWL API also provides a unified programmatic layer for accessing a variety of OWL reasoners (Elk, JFact, JCEL, and HermiT).
Sometimes it can be useful to view an ontology as a graph rather than a collection of axioms. This allows for simpler processing of reachability queries. For example, given an OWL object such as the class hippocampus CA4 in an anatomy ontology (ma.owl), we might want to know which classes are reachable from here, and what is the relationship between these classes. Answers might include "part of a brain" and "develops from part of a neural tube". OWL reasoners can have unpredictable performance, and will only return named superclasses.
This API provides a graph-like (or "OBO-format-like") view over an OWL ontology or collection of OWL ontologies, and provides scalable and valid reachability query answering.
An OWLOntology O includes a set of axioms A. The signature of an ontology is a set of named entities and expressions N, and is equivalent to the union of the signature of all axioms in the ontology. N can be partitioned into named entities and anonymous expressions -- the latter are structures formed recursively from OWL constructs and named entities. We omit literals here, but the formalism could be extended to cover them.
We introduce the notion of an OWLGraph: this is a set of edges E connecting the members of N, which are viewed as nodes in the graph. Each edge in E is a tuples consisting of a source, a target and an edge label. An edge label specifies how the source is connected to the target, and is a composite structure consisting of zero or more quantified relations and a distance:
E = 'Edge(' SourceNode QR* Distance Target ')'
A Quantified Relation is either a property-predicate pair, or a builtin predicate:
QR = Property 'some' | Property 'all' | Property 'value' | Property Cardinality(Int,Int) | 'SUBCLASS_OF' | 'INSTANCE_OF' | 'IDENTICAL_TO'
Note the edges in an OWLGraph are considerably different from the
triples of a RDF graph, in which edge labels
are atomicproperties, as opposed to composite structures. An
OWLGraph does not add expressivity over either RDF or OWL abstract
syntax representation, but allows for simpler specification of
traversal operations.
The set of graph edges E is constructed using both the set of axioms A, and the set of class expressions referenced in A. Recall that this is a subset of N.
The following two rules produce edges from the set of axioms A in O:
SubClassOf(x y) ==> Edge(x,SUBCLASS_OF,y)
EquivalentClasses(x y) ==> Edge(x,SUBCLASS_OF,y), Edge(y,SUBCLASS_OF,x)
The following rules produces edges from the set of class expressions referenced in the signature of O:
ObjectSomeValuesFrom(p x) ==> Edge( ObjectSomeValuesFrom(p x), p some, x)
ObjectOnlyValuesFrom(p x) ==> Edge( ObjectOnlyValuesFrom(p x), p only, x)
IntersectionOf(x1 x2 ... xn) ==> Edge( IntersectionOf(x1 x2 ... xn), SUBCLASS_OF, xi), for all xi in x1..xn
UnionOf(x1 x2 ... xn) ==> Edge( xn, SUBCLASS_OF, UnionOf(x1 x2 ... xn)), for all xi in x1..xn
Given:
SubClassOf(nucleus ObjectSomeValuesFrom(partOf cell))
SubClassOf(nucleolus ObjectSomeValuesFrom(partOf nucleus))
EquivalentClasses(nuclear_chromosome IntersectionOf(chromosome ObjectSomeValuesFrom(partOf nucleus)))
The following edges are generated:
Edge(nucleus, SUBCLASS_OF, ObjectSomeValuesFrom(partOf cell))
Edge(objectSomeValuesFrom(partOf cell), partOf some, cell)
Edge(nucleolus, SUBCLASS_OF, ObjectSomeValuesFrom(partOf nucleus))
Edge(objectSomeValuesFrom(partOf nucleus), partOf some, nucleus)
Edge(nuclear_chrosome, SUBCLASS_OF, IntersectionOf(chromosome ObjectSomeValuesFrom(partOf nucleus)))
Edge(IntersectionOf(chromosome ObjectSomeValuesFrom(partOf nucleus)), SUBCLASS_OF, nuclear_chrosome)
Edge(IntersectionOf(chromosome ObjectSomeValuesFrom(partOf nucleus)), SUBCLASS_OF, chromosome)
Edge(IntersectionOf(chromosome ObjectSomeValuesFrom(partOf nucleus)), SUBCLASS_OF, ObjectSomeValuesFrom(partOf nucleus))
The graph closure is the result of exhaustively applying the expansion rules:
Edge(x r1 r2 ... rn Dxy y), Edge(y rn+1 rn+2 ... rm Dyz z) ==> Edge(x r1 .. rm Dxy+Dyz z)
Together with reduction rules that compact a list of quantified relations using a composition table:
SUBCLASS_OF o SUBCLASS_OF → SUBCLASS_OF
SUBCLASS_OF o P some → P some
P some o SUBCLASS_OF → P some
SUBCLASS_OF o P only → P only
P only o SUBCLASS_OF → P only
P1 some o P2 some → P some on condition: TransitiveProperty(P) and subPropertyOf(P1 P) and subPropertyOf(P2 P)[*]
P1 some o P2 some o ... o Pn some → P some on condition: subObjectPropertyOf( PropertyChain(P1 .. Pn) P)[**]
[*] assumes inferred subPropertyOf has been calculated - recall this is reflexive.
if this condition is true for multiple values of the property P, the most specific property is chosen.
[**] again, RBox inference is used here.
The table operates on any two consecutive QRs and reduces it to a single QR.
The above operations will produce valid results, but is not guaranteed to be complete. For optimal results the ontology should be classified in advance using standard OWL reasoning.
The resulting edges correspond to linear class expressions, and can be translated to OWL using a reversal of the seeding rules.
Given the edges:
Edge(nucleus, SUBCLASS_OF, ObjectSomeValuesFrom(partOf cell))
Edge(objectSomeValuesFrom(partOf cell), partOf some, cell)
Edge(nucleolus, SUBCLASS_OF, ObjectSomeValuesFrom(partOf nucleus))
Edge(objectSomeValuesFrom(partOf nucleus), partOf some, nucleus)
and the following axiom:
TransitiveObjectProperty(partOf)
The closure will be:
Edge(nucleus, SUBCLASS_OF partOf some, cell)
Edge(nucleolus, SUBCLASS_OF partOf some, nucleus)
Edge(nucleolus, SUBCLASS_OF partOf some SUBCLASS_OF partOf some, cell)
(only edges between named entities are shown).
Using reduction rules / the composition table:
Edge(nucleus, partOf some, cell)
Edge(nucleolus, partOf some, nucleus)
Edge(nucleolus, partOf some, cell)
Given a subject node s, we can efficiently find the set of edges with all reachable nodes as targets:
E = {} -- returned edges
X = { Edge(s IDENTICAL_TO 0 s) } -- scheduled edges; seed with reflexive edge
V = {} -- visited edges
while |X| > 0 :
x = pop X
if (x in V) :
En = { x join e : e.s == x.t}
V = V u En
X = X u En
Ex = { x join e : e in En }
E = E u Ex
Here the join operation joins two edges by concatenating QRs and applying the composition table above.
The algorithm is safe in the presence of cycles. The results will be valid according to OWL semantics, but they may not be complete. We can see intuitively that the time or space requirements of the algorithm are not affected by the overall size of the ontology, only by the number of reachable nodes (this is an attractive feature when working with unions of large ontologies such as the FMA, where we only want to use a subset of FMA axioms for any given query).
Other algorithms can be used - e.g. rule-based deduction - but this will not have the same computational properties.
Copyright © 2010–2015. All rights reserved.