org.semanticweb.HermiT.model
Class AtomicRole

java.lang.Object
  extended by org.semanticweb.HermiT.model.Role
      extended by org.semanticweb.HermiT.model.AtomicRole
All Implemented Interfaces:
java.io.Serializable, DLPredicate

public class AtomicRole
extends Role
implements DLPredicate

Represents an atomic role.

See Also:
Serialized Form

Field Summary
static AtomicRole BOTTOM_DATA_ROLE
           
static AtomicRole BOTTOM_OBJECT_ROLE
           
private  boolean isDatatypeRole
           
private  java.lang.String m_uri
           
protected static InterningManager<AtomicRole> s_interningManager
           
private static long serialVersionUID
           
static AtomicRole TOP_DATA_ROLE
           
static AtomicRole TOP_OBJECT_ROLE
           
 
Constructor Summary
protected AtomicRole(java.lang.String uri, boolean isDatatypeRole)
           
 
Method Summary
static AtomicRole createDataRole(java.lang.String uri)
           
static AtomicRole createObjectRole(java.lang.String uri)
           
 int getArity()
           
 Role getInverse()
           
 java.lang.String getURI()
           
 boolean isRestrictedToDatatypes()
          Check whether the role can only be applied to datatypes.
protected  java.lang.Object readResolve()
           
 java.lang.String toString(Namespaces namespaces)
           
 
Methods inherited from class org.semanticweb.HermiT.model.Role
fromString, fromString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

m_uri

private final java.lang.String m_uri

isDatatypeRole

private final boolean isDatatypeRole

s_interningManager

protected static InterningManager<AtomicRole> s_interningManager

TOP_OBJECT_ROLE

public static final AtomicRole TOP_OBJECT_ROLE

BOTTOM_OBJECT_ROLE

public static final AtomicRole BOTTOM_OBJECT_ROLE

TOP_DATA_ROLE

public static final AtomicRole TOP_DATA_ROLE

BOTTOM_DATA_ROLE

public static final AtomicRole BOTTOM_DATA_ROLE
Constructor Detail

AtomicRole

protected AtomicRole(java.lang.String uri,
                     boolean isDatatypeRole)
Method Detail

getURI

public java.lang.String getURI()

isRestrictedToDatatypes

public boolean isRestrictedToDatatypes()
Check whether the role can only be applied to datatypes. This is just an expedient hack; a cleaner approach would simply set the ranges of object and data roles appropriately.

Specified by:
isRestrictedToDatatypes in class Role

getArity

public int getArity()
Specified by:
getArity in interface DLPredicate
Returns:
the arity of the predicate

getInverse

public Role getInverse()
Specified by:
getInverse in class Role

toString

public java.lang.String toString(Namespaces namespaces)
Specified by:
toString in interface DLPredicate
Specified by:
toString in class Role

readResolve

protected java.lang.Object readResolve()

createObjectRole

public static AtomicRole createObjectRole(java.lang.String uri)

createDataRole

public static AtomicRole createDataRole(java.lang.String uri)