public abstract class AbstractHierarchy<T extends org.semanticweb.owlapi.model.OWLObject> extends Object implements Hierarchy<T>
| Constructor and Description |
|---|
AbstractHierarchy(SortedMap<T,SortedSet<T>> hierarchyUp,
SortedMap<T,SortedSet<T>> hierarchyDown) |
| Modifier and Type | Method and Description |
|---|---|
AbstractHierarchy<T> |
cloneAndRestrict(Set<? extends T> allowedEntities)
The method computes a new subsumption hierarchy, which is a copy of this
one, but only the specified entities are allowed to occur.
|
boolean |
contains(T entity)
Checks whether the entity is contained in the hierarchy.
|
abstract T |
getBottomConcept() |
SortedSet<T> |
getChildren(T entity) |
SortedSet<T> |
getChildren(T entity,
boolean direct) |
Set<T> |
getEntities() |
SortedMap<T,SortedSet<T>> |
getHierarchyDown() |
SortedMap<T,SortedSet<T>> |
getHierarchyUp() |
SortedSet<T> |
getMostGeneralEntities() |
SortedSet<T> |
getMostSpecialEntities() |
SortedSet<T> |
getParents(T entity) |
SortedSet<T> |
getParents(T entity,
boolean direct) |
SortedSet<T> |
getRoots() |
SortedSet<T> |
getSiblings(T entity) |
abstract T |
getTopConcept() |
boolean |
isChildOf(T entity1,
T entity2) |
boolean |
isParentOf(T entity1,
T entity2) |
void |
precompute() |
void |
setHierarchyDown(SortedMap<T,SortedSet<T>> hierarchyDown) |
void |
setHierarchyUp(SortedMap<T,SortedSet<T>> hierarchyUp) |
void |
thinOutSubsumptionHierarchy()
This method modifies the subsumption hierarchy such that for each class,
there is only a single path to reach it via upward and downward
refinement respectively.
|
String |
toString() |
String |
toString(boolean showUpwardHierarchy) |
public SortedSet<T> getChildren(T entity)
getChildren in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public Set<T> getEntities()
public SortedSet<T> getChildren(T entity, boolean direct)
getChildren in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public SortedSet<T> getParents(T entity)
getParents in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public SortedSet<T> getParents(T entity, boolean direct)
getParents in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public SortedSet<T> getSiblings(T entity)
getSiblings in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public boolean isParentOf(T entity1, T entity2)
isParentOf in interface Hierarchy<T extends org.semanticweb.owlapi.model.OWLObject>public SortedSet<T> getMostGeneralEntities()
public SortedSet<T> getMostSpecialEntities()
public boolean contains(T entity)
Hierarchypublic void thinOutSubsumptionHierarchy()
public AbstractHierarchy<T> cloneAndRestrict(Set<? extends T> allowedEntities)
allowedEntities - The entities, which are allowed to occur in the new
subsumption hierarchy.public void setHierarchyUp(SortedMap<T,SortedSet<T>> hierarchyUp)
hierarchyUp - the hierarchyUp to setpublic SortedMap<T,SortedSet<T>> getHierarchyUp()
public void setHierarchyDown(SortedMap<T,SortedSet<T>> hierarchyDown)
hierarchyDown - the hierarchyDown to setpublic SortedMap<T,SortedSet<T>> getHierarchyDown()
public void precompute()
public abstract T getTopConcept()
public abstract T getBottomConcept()
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann