Class RoleAssertion

  • All Implemented Interfaces:
    net.sf.tweety.commons.Formula, net.sf.tweety.logics.commons.syntax.interfaces.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​(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​(net.sf.tweety.commons.util.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

      • getPredicates

        public Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
        Specified by:
        getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Specified by:
        getPredicates in class DlAxiom
      • clone

        public RoleAssertion clone()
        Specified by:
        clone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Specified by:
        clone in class DlAxiom
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        equals in class Object
      • getSignature

        public DlSignature getSignature()
        Specified by:
        getSignature in interface net.sf.tweety.commons.Formula
        Specified by:
        getSignature in class DlAxiom
      • getIndividuals

        public net.sf.tweety.commons.util.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