org.semanticweb.HermiT.hierarchy
Class RoleSubsumptionCache

java.lang.Object
  extended by org.semanticweb.HermiT.hierarchy.RoleSubsumptionCache
All Implemented Interfaces:
SubsumptionCache<Role>
Direct Known Subclasses:
DataRoleSubsumptionCache, ObjectRoleSubsumptionCache

public abstract class RoleSubsumptionCache
extends java.lang.Object
implements SubsumptionCache<Role>

A cache for role subsumption and role satisfiability tests. This class also maintains the set of known and possible subsumers for a role. This information can be used to optimize classification.


Nested Class Summary
protected static class RoleSubsumptionCache.RoleInfo
           
 
Field Summary
protected  AtomicRole m_bottomRole
           
protected  boolean m_hasInverse
           
protected  Reasoner m_reasoner
           
protected  java.util.Map<Role,RoleSubsumptionCache.RoleInfo> m_roleInfos
           
protected  AtomicRole m_topRole
           
 
Constructor Summary
RoleSubsumptionCache(Reasoner reasoner, boolean hasInverse, AtomicRole bottomRole, AtomicRole topRole)
           
 
Method Summary
protected abstract  boolean doSatisfiabilityTest(Role role)
           
protected abstract  boolean doSubsumptionCheck(RoleSubsumptionCache.RoleInfo subroleInfo, Role superrole)
           
 java.util.Set<Role> getAllKnownSubsumers(Role role)
           
protected  RoleSubsumptionCache.RoleInfo getRoleInfo(Role role)
           
 boolean isSatisfiable(Role role)
           
protected  boolean isSatisfiable(Role role, boolean updatePossibleSubsumers)
           
 boolean isSubsumedBy(Role subrole, Role superrole)
           
protected abstract  void loadRoleGraph(java.util.Set<Role> allRoles, Graph<Role> roleGraph)
           
protected  void updateKnownSubsumers(Role subrole, Tableau tableau)
           
protected  void updatePossibleSubsumers(Tableau tableau)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_reasoner

protected final Reasoner m_reasoner

m_roleInfos

protected final java.util.Map<Role,RoleSubsumptionCache.RoleInfo> m_roleInfos

m_hasInverse

protected final boolean m_hasInverse

m_bottomRole

protected final AtomicRole m_bottomRole

m_topRole

protected final AtomicRole m_topRole
Constructor Detail

RoleSubsumptionCache

public RoleSubsumptionCache(Reasoner reasoner,
                            boolean hasInverse,
                            AtomicRole bottomRole,
                            AtomicRole topRole)
Method Detail

loadRoleGraph

protected abstract void loadRoleGraph(java.util.Set<Role> allRoles,
                                      Graph<Role> roleGraph)

getAllKnownSubsumers

public java.util.Set<Role> getAllKnownSubsumers(Role role)
Specified by:
getAllKnownSubsumers in interface SubsumptionCache<Role>

isSatisfiable

public boolean isSatisfiable(Role role)
Specified by:
isSatisfiable in interface SubsumptionCache<Role>

isSatisfiable

protected boolean isSatisfiable(Role role,
                                boolean updatePossibleSubsumers)

doSatisfiabilityTest

protected abstract boolean doSatisfiabilityTest(Role role)

isSubsumedBy

public boolean isSubsumedBy(Role subrole,
                            Role superrole)
Specified by:
isSubsumedBy in interface SubsumptionCache<Role>

doSubsumptionCheck

protected abstract boolean doSubsumptionCheck(RoleSubsumptionCache.RoleInfo subroleInfo,
                                              Role superrole)

updateKnownSubsumers

protected void updateKnownSubsumers(Role subrole,
                                    Tableau tableau)

updatePossibleSubsumers

protected void updatePossibleSubsumers(Tableau tableau)

getRoleInfo

protected RoleSubsumptionCache.RoleInfo getRoleInfo(Role role)