Package org.semanticweb.owlapi.util
Class OWLObjectWalker<O extends OWLObject>
java.lang.Object
org.semanticweb.owlapi.util.OWLObjectWalker<O>
- Type Parameters:
O
- the returned type
- Direct Known Subclasses:
OWLClassLiteralCollector
,OWLOntologyWalker
- Since:
- 2.2.0
- Author:
- Matthew Horridge, The University Of Manchester, Information Management Group
-
Constructor Summary
ConstructorsConstructorDescriptionOWLObjectWalker
(Collection<O> objects) OWLObjectWalker
(Collection<O> objects, boolean walkDuplicates) OWLObjectWalker
(Collection<O> objects, boolean visitDuplicates, AnnotationWalkingControl walkFlag) OWLObjectWalker
(Stream<O> objects) OWLObjectWalker
(Stream<O> objects, boolean walkDuplicates) OWLObjectWalker
(Stream<O> objects, boolean walkDuplicates, AnnotationWalkingControl walkFlag) -
Method Summary
Modifier and TypeMethodDescriptionGets the last annotation to be visited.getAxiom()
Gets the last axiom to be visited.Gets the current class expression path.Gets the current data range path.Gets the last ontology to be visited.boolean
isFirstClassExpressionInPath
(OWLClassExpression classExpression) Determines if a particular class expression is the first (or root) class expression in the current class expression path.void
setAnnotation
(OWLAnnotation node) Allow the structure walker to set the current annotation.void
Allow the structure walker to set the current axiom.void
setStructureWalker
(StructureWalker<O> walker) void
void
-
Constructor Details
-
OWLObjectWalker
- Parameters:
objects
- objects to visit
-
OWLObjectWalker
- Parameters:
objects
- objects to visit
-
OWLObjectWalker
- Parameters:
objects
- objects to visitwalkDuplicates
- true if duplicates should be visited
-
OWLObjectWalker
- Parameters:
objects
- objects to visitwalkDuplicates
- true if duplicates should be visited
-
OWLObjectWalker
public OWLObjectWalker(Stream<O> objects, boolean walkDuplicates, AnnotationWalkingControl walkFlag) - Parameters:
objects
- objects to visitwalkDuplicates
- true if duplicates should be visitedwalkFlag
- control which annotations to visit
-
OWLObjectWalker
public OWLObjectWalker(Collection<O> objects, boolean visitDuplicates, AnnotationWalkingControl walkFlag) - Parameters:
objects
- the set of objects to visitvisitDuplicates
- true if duplicates should be visitedwalkFlag
- control which annotations to visit
-
-
Method Details
-
setStructureWalker
- Parameters:
walker
- the structure walker to use with this object walker
-
walkStructure
- Parameters:
v
- visitor to use over the objects
-
walkStructure
- Parameters:
v
- visitor to use over the objects
-
getOntology
Gets the last ontology to be visited.- Returns:
- The last ontology to be visited
-
getAxiom
Gets the last axiom to be visited.- Returns:
- The last axiom to be visited, or
null
if an axiom has not be visited
-
setAxiom
Allow the structure walker to set the current axiom.- Parameters:
axiom
- the axiom to set
-
getAnnotation
Gets the last annotation to be visited.- Returns:
- The last annotation to be visited (may be
null
)
-
setAnnotation
Allow the structure walker to set the current annotation.- Parameters:
node
- the annotation to set
-
getClassExpressionPath
Gets the current class expression path. The current class expression path is a list of class expressions that represents the containing expressions for the current class expressions. The first item in the path (list) is the root class expression that was visited. For i between 0 and pathLength, the item at index i+1 is a direct sub-expression of the item at index i. The last item in the path is the current class expression being visited.- Returns:
- A list of class expressions that represents the path of class expressions, with the root of the class expression being the first element in the list.
-
isFirstClassExpressionInPath
Determines if a particular class expression is the first (or root) class expression in the current class expression path.- Parameters:
classExpression
- The class expression- Returns:
true
if the specified class expression is the first class expression in the current class expression path, otherwisefalse
(false
if the path is empty)
-
getDataRangePath
Gets the current data range path. The current data range path is a list of data ranges that represents the containing expressions for the current data ranges. The first item in the path (list) is the root data range that was visited. For i between 0 and pathLength, the item at index i+1 is a direct sub-expression of the item at index i. The last item in the path is the current data range being visited.- Returns:
- A list of data ranges that represents the path of data ranges, with the root of the data range being the first element in the list.
-