Class RoleImpl

  • All Implemented Interfaces:
    Role

    public class RoleImpl
    extends java.lang.Object
    implements Role

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Evren Sirin
    • Field Detail

      • TRANSITIVE

        public static int TRANSITIVE
      • FUNCTIONAL

        public static int FUNCTIONAL
      • INV_FUNCTIONAL

        public static int INV_FUNCTIONAL
      • REFLEXIVE

        public static int REFLEXIVE
      • IRREFLEXIVE

        public static int IRREFLEXIVE
      • ASYM

        public static int ASYM
      • ANTI_SYM

        public static int ANTI_SYM
        Use ASYM
      • SIMPLE

        public static int SIMPLE
      • COMPLEX_SUB

        public static int COMPLEX_SUB
      • FORCE_SIMPLE

        public static int FORCE_SIMPLE
    • Constructor Detail

      • RoleImpl

        public RoleImpl​(openllet.aterm.ATermAppl name,
                        PropertyType type)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • debugString

        public java.lang.String debugString()
        Specified by:
        debugString in interface Role
      • addSubRoleChain

        public void addSubRoleChain​(openllet.aterm.ATermList chain)
        Add a sub role chain without dependency tracking information
        Specified by:
        addSubRoleChain in interface Role
        Parameters:
        chain -
      • addSubRoleChain

        public void addSubRoleChain​(openllet.aterm.ATermList chain,
                                    DependencySet ds)
        Add a sub role chain with dependency tracking.
        Specified by:
        addSubRoleChain in interface Role
        Parameters:
        chain - List of role names of at least length 2.
        ds -
      • removeSubRoleChain

        public void removeSubRoleChain​(openllet.aterm.ATermList chain)
        Specified by:
        removeSubRoleChain in interface Role
      • addSubRole

        public void addSubRole​(Role r)
        r is subrole of this role
        Specified by:
        addSubRole in interface Role
        Parameters:
        r -
      • addSubRole

        public void addSubRole​(Role r,
                               DependencySet ds)
        Add sub role with depedency set.
        Specified by:
        addSubRole in interface Role
        Parameters:
        r - subrole of this role
        ds -
      • resetDomainRange

        public void resetDomainRange()
        Specified by:
        resetDomainRange in interface Role
      • addSuperRole

        public void addSuperRole​(Role r)
        r is superrole of this role
        Specified by:
        addSuperRole in interface Role
        Parameters:
        r -
      • addDomain

        public boolean addDomain​(openllet.aterm.ATermAppl a,
                                 DependencySet ds)
        Specified by:
        addDomain in interface Role
      • addRange

        public boolean addRange​(openllet.aterm.ATermAppl a,
                                DependencySet ds)
        Specified by:
        addRange in interface Role
      • isObjectRole

        public boolean isObjectRole()
        Specified by:
        isObjectRole in interface Role
      • isDatatypeRole

        public boolean isDatatypeRole()
        Specified by:
        isDatatypeRole in interface Role
      • isAnnotationRole

        public boolean isAnnotationRole()
        check if a role is declared as datatype property
        Specified by:
        isAnnotationRole in interface Role
        Returns:
        true if a role is declared as datatype property
      • isUntypedRole

        public boolean isUntypedRole()
        Specified by:
        isUntypedRole in interface Role
      • hasNamedInverse

        public boolean hasNamedInverse()
        Specified by:
        hasNamedInverse in interface Role
      • hasComplexSubRole

        public boolean hasComplexSubRole()
        Specified by:
        hasComplexSubRole in interface Role
      • isFunctional

        public boolean isFunctional()
        Specified by:
        isFunctional in interface Role
      • isSymmetric

        public boolean isSymmetric()
        Specified by:
        isSymmetric in interface Role
      • isAntisymmetric

        @Deprecated
        public boolean isAntisymmetric()
        Deprecated.
        Returns:
        DO NOT USE
      • isAsymmetric

        public boolean isAsymmetric()
        Specified by:
        isAsymmetric in interface Role
      • isTransitive

        public boolean isTransitive()
        Specified by:
        isTransitive in interface Role
      • isReflexive

        public boolean isReflexive()
        Specified by:
        isReflexive in interface Role
      • isIrreflexive

        public boolean isIrreflexive()
        Specified by:
        isIrreflexive in interface Role
      • isAnon

        public boolean isAnon()
        Specified by:
        isAnon in interface Role
      • getName

        public openllet.aterm.ATermAppl getName()
        Specified by:
        getName in interface Role
      • getDomains

        public java.util.Set<openllet.aterm.ATermAppl> getDomains()
        Specified by:
        getDomains in interface Role
      • getRanges

        public java.util.Set<openllet.aterm.ATermAppl> getRanges()
        Specified by:
        getRanges in interface Role
      • getSubRoles

        public java.util.Set<Role> getSubRoles()
        Specified by:
        getSubRoles in interface Role
      • isEquivalent

        public boolean isEquivalent​(Role r)
        Specified by:
        isEquivalent in interface Role
      • getSubRoleChains

        public java.util.Set<openllet.aterm.ATermList> getSubRoleChains()
        Specified by:
        getSubRoleChains in interface Role
      • getSuperRoles

        public java.util.Set<Role> getSuperRoles()
        Specified by:
        getSuperRoles in interface Role
      • getTypeName

        public java.lang.String getTypeName()
        Specified by:
        getTypeName in interface Role
      • isSubRoleOf

        public boolean isSubRoleOf​(Role r)
        Specified by:
        isSubRoleOf in interface Role
      • isSuperRoleOf

        public boolean isSuperRoleOf​(Role r)
        Specified by:
        isSuperRoleOf in interface Role
      • setInverse

        public void setInverse​(Role term)
        Specified by:
        setInverse in interface Role
      • setFunctional

        public void setFunctional​(boolean b)
        Specified by:
        setFunctional in interface Role
      • setInverseFunctional

        public void setInverseFunctional​(boolean b)
        Specified by:
        setInverseFunctional in interface Role
      • setTransitive

        public void setTransitive​(boolean b)
        Specified by:
        setTransitive in interface Role
      • setReflexive

        public void setReflexive​(boolean b)
        Specified by:
        setReflexive in interface Role
      • setIrreflexive

        public void setIrreflexive​(boolean b)
        Specified by:
        setIrreflexive in interface Role
      • setAntisymmetric

        @Deprecated
        public void setAntisymmetric​(boolean b)
        Deprecated.
        Parameters:
        b -
      • setAsymmetric

        public void setAsymmetric​(boolean b)
        Specified by:
        setAsymmetric in interface Role
      • setHasComplexSubRole

        public void setHasComplexSubRole​(boolean b)
        Specified by:
        setHasComplexSubRole in interface Role
      • setSubRolesAndChains

        public void setSubRolesAndChains​(java.util.Set<Role> subRoles,
                                         java.util.Set<openllet.aterm.ATermList> subRoleChains,
                                         java.util.Map<openllet.aterm.ATerm,​DependencySet> dependencies)
        Specified by:
        setSubRolesAndChains in interface Role
        Parameters:
        subRoleChains -
        dependencies - map from role names (or lists) to dependencies
      • setSuperRoles

        public void setSuperRoles​(java.util.Set<Role> superRoles)
        Specified by:
        setSuperRoles in interface Role
        Parameters:
        superRoles - The _superRoles to set.
      • getFunctionalSupers

        public java.util.Set<Role> getFunctionalSupers()
        Specified by:
        getFunctionalSupers in interface Role
        Returns:
        Returns the functionalSuper.
      • addFunctionalSuper

        public void addFunctionalSuper​(Role r)
        Specified by:
        addFunctionalSuper in interface Role
        Parameters:
        r - The functionalSuper to set.
      • setForceSimple

        public void setForceSimple​(boolean b)
        Specified by:
        setForceSimple in interface Role
      • isForceSimple

        public boolean isForceSimple()
        Specified by:
        isForceSimple in interface Role
      • isSimple

        public boolean isSimple()
        Specified by:
        isSimple in interface Role
      • setSimple

        public void setSimple​(boolean b)
        Specified by:
        setSimple in interface Role
      • getTransitiveSubRoles

        public java.util.Set<Role> getTransitiveSubRoles()
        Specified by:
        getTransitiveSubRoles in interface Role
        Returns:
        Returns transitive sub roles.
      • addTransitiveSubRole

        public void addTransitiveSubRole​(Role r)
        Specified by:
        addTransitiveSubRole in interface Role
        Parameters:
        r - The transtive sub role to add.
      • isTop

        public boolean isTop()
        Specified by:
        isTop in interface Role
      • isBottom

        public boolean isBottom()
        Specified by:
        isBottom in interface Role
      • isBuiltin

        public boolean isBuiltin()
        Specified by:
        isBuiltin in interface Role