Package org.semanticweb.owlapi.util
Class OWLObjectPropertyManager
java.lang.Object
org.semanticweb.owlapi.util.OWLObjectPropertyManager
- Since:
- 2.2.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Set<OWLObjectPropertyExpression>>
getEquivalentObjectProperties
(Stream<OWLOntology> ontologies) The object property hierarchy relation -> is the smallest relation on object property expressions for which the following conditions hold (A -> B means that -> holds for A and B): if Ax contains an axiom SubObjectPropertyOf(PE1 PE2), then PE1 -> PE2 holds; and if Ax contains an axiom EquivalentObjectProperties(PE1 PE2), then PE1 -> PE2 and PE2 -> PE1 hold; and if Ax contains an axiom InverseObjectProperties(PE1 PE2), then PE1 -> INV(PE2) and INV(PE2) -> PE1 hold; and if Ax contains an axiom SymmetricObjectProperty(PE), then PE -> INV(PE) holds; and if PE1 -> PE2 holds, then INV(PE1) -> INV(PE2) holds as well.boolean
isComposite
(OWLObjectPropertyExpression expression) An object property expression PE is composite in Ax if Ax contains an axiom of the form SubObjectPropertyOf(SubObjectPropertyChain(PE1 ...boolean
isLessThan
(OWLObjectPropertyExpression propA, OWLObjectPropertyExpression propB) boolean
isNonSimple
(OWLObjectPropertyExpression expression) The relation ->* is the reflexive-transitive closure of ->.boolean
Tests to see if one property is a sub property of another property in the reflexive transitive closure of the property hierarchy.static void
tarjan
(Stream<OWLOntology> ontologies, OWLObjectPropertyExpression prop, int index, Deque<OWLObjectPropertyExpression> stack, Map<OWLObjectPropertyExpression, Integer> indexMap, Map<OWLObjectPropertyExpression, Integer> lowlinkMap, Set<Set<OWLObjectPropertyExpression>> result, Set<OWLObjectPropertyExpression> processed, Set<OWLObjectPropertyExpression> stackProps)
-
Constructor Details
-
OWLObjectPropertyManager
- Parameters:
ont
- the ontology to use
-
-
Method Details
-
getEquivalentObjectProperties
public static Collection<Set<OWLObjectPropertyExpression>> getEquivalentObjectProperties(Stream<OWLOntology> ontologies) - Parameters:
ontologies
- ontologies to search- Returns:
- sets of equivalent properties
-
tarjan
public static void tarjan(Stream<OWLOntology> ontologies, OWLObjectPropertyExpression prop, int index, Deque<OWLObjectPropertyExpression> stack, Map<OWLObjectPropertyExpression, Integer> indexMap, Map<OWLObjectPropertyExpression, Integer> lowlinkMap, Set<Set<OWLObjectPropertyExpression>> result, Set<OWLObjectPropertyExpression> processed, Set<OWLObjectPropertyExpression> stackProps) - Parameters:
ontologies
- The ontologiesprop
- the propertyindex
- indexstack
- stackindexMap
- index maplowlinkMap
- low link mapresult
- resultprocessed
- processedstackProps
- stack entities
-
isComposite
An object property expression PE is composite in Ax if Ax contains an axiom of the form SubObjectPropertyOf(SubObjectPropertyChain(PE1 ... PEn) PE) with n greater than 1, or SubObjectPropertyOf(SubObjectPropertyChain(PE1 ... PEn) INV(PE)) with n greater than 1, or TransitiveObjectProperty(PE), or TransitiveObjectProperty(INV(PE)).- Parameters:
expression
- The object property expression to be tested- Returns:
true
if the object property is composite (according to the above definition) orfalse
if the object property is not composite.
-
getCompositeProperties
- Returns:
- the property expressions
-
getPropertyHierarchy
The object property hierarchy relation -> is the smallest relation on object property expressions for which the following conditions hold (A -> B means that -> holds for A and B): if Ax contains an axiom SubObjectPropertyOf(PE1 PE2), then PE1 -> PE2 holds; and if Ax contains an axiom EquivalentObjectProperties(PE1 PE2), then PE1 -> PE2 and PE2 -> PE1 hold; and if Ax contains an axiom InverseObjectProperties(PE1 PE2), then PE1 -> INV(PE2) and INV(PE2) -> PE1 hold; and if Ax contains an axiom SymmetricObjectProperty(PE), then PE -> INV(PE) holds; and if PE1 -> PE2 holds, then INV(PE1) -> INV(PE2) holds as well.- Returns:
- A Map that maps sub properties to sets of super properties.
-
getHierarchyReflexiveTransitiveClosure
public Map<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> getHierarchyReflexiveTransitiveClosure()- Returns:
- transitive reflexive closure
-
isSubPropertyOf
Tests to see if one property is a sub property of another property in the reflexive transitive closure of the property hierarchy.- Parameters:
sub
- The sub propertysup
- The super property- Returns:
true
if sub is the sub-property of sup, otherwisefalse
-
isNonSimple
The relation ->* is the reflexive-transitive closure of ->. An object property expression PE is simple in Ax if, for each object property expression PE' such that PE' ->* PE holds, PE' is not composite.- Parameters:
expression
- The expression to be tested.- Returns:
true
if the object property expression is simple, otherwise false.
-
getNonSimpleProperties
- Returns:
- non simple properties
-
getPropertyPartialOrdering
public Map<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> getPropertyPartialOrdering()- Returns:
- partial ordering
-
isLessThan
- Parameters:
propA
- first propertypropB
- second property- Returns:
- true if first property comes first in the default ordering
-
getEquivalentObjectProperties
- Returns:
- sets of equivalent properties
-