Class RoleAssertion

  • All Implemented Interfaces:
    Formula, SimpleLogicalFormula

    public class RoleAssertion
    extends AssertionalAxiom
    This class models a role assertion in description logic, i.e. an expression of the form "(a,b) : R", where a,b are Individuals and R is a role.
    Author:
    Anna Gessler
    • Constructor Detail

      • RoleAssertion

        public RoleAssertion()
        Empty default constructor.
      • RoleAssertion

        public RoleAssertion​(Individual a,
                             Individual b,
                             AtomicRole r)
        Initializes a role assertion with the given individuals and role.
        Parameters:
        a - an Individual
        b - an Individual
        r - a role
      • RoleAssertion

        public RoleAssertion​(java.util.List<Individual> args,
                             AtomicRole r)
        Initializes a role assertion with the given individuals and role.
        Parameters:
        args - list of individuals
        r - a role
      • RoleAssertion

        public RoleAssertion​(Pair<Individual,​Individual> args,
                             AtomicRole r)
        Initializes a role assertion with the given role and individuals.
        Parameters:
        args - pair of individuals
        r - role
    • Method Detail

      • toString

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

        public int hashCode()
        Specified by:
        hashCode in interface SimpleLogicalFormula
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface SimpleLogicalFormula
        Overrides:
        equals in class java.lang.Object
      • getSignature

        public DlSignature getSignature()
        Description copied from interface: Formula
        Returns the signature of the language of this formula.
        Specified by:
        getSignature in interface Formula
        Specified by:
        getSignature in class DlAxiom
        Returns:
        the signature of the language of this formula.
      • getIndividuals

        public Pair<Individual,​Individual> getIndividuals()
        Get the individuals of this assertional axiom (= the individuals that are instances of the role)
        Returns:
        individuals
      • getRole

        public AtomicRole getRole()
        Get the role that the individuals of this assertional axiom are instances of.
        Returns:
        role
      • isAtomic

        public boolean isAtomic()
        Specified by:
        isAtomic in class AssertionalAxiom
        Returns:
        "true" if the concept of the assertion is atomic, "false" if it is a complex concept