Package net.sf.tweety.logics.dl.syntax
Class RoleAssertion
- java.lang.Object
-
- net.sf.tweety.logics.dl.syntax.DlAxiom
-
- net.sf.tweety.logics.dl.syntax.AssertionalAxiom
-
- net.sf.tweety.logics.dl.syntax.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 Summary
Constructors Constructor Description RoleAssertion()Empty default constructor.RoleAssertion(java.util.List<Individual> args, AtomicRole r)Initializes a role assertion with the given individuals and role.RoleAssertion(Pair<Individual,Individual> args, AtomicRole r)Initializes a role assertion with the given role and individuals.RoleAssertion(Individual a, Individual b, AtomicRole r)Initializes a role assertion with the given individuals and role.
-
Method Summary
Modifier and Type Method Description RoleAssertionclone()Creates a deep copy of this formulabooleanequals(java.lang.Object obj)Pair<Individual,Individual>getIndividuals()Get the individuals of this assertional axiom (= the individuals that are instances of the role)java.util.Set<Predicate>getPredicates()Processes the set of all predicates which appear in this formulaAtomicRolegetRole()Get the role that the individuals of this assertional axiom are instances of.DlSignaturegetSignature()Returns the signature of the language of this formula.inthashCode()booleanisAtomic()java.lang.StringtoString()-
Methods inherited from class net.sf.tweety.logics.dl.syntax.DlAxiom
getAtoms, getPredicateCls, isLiteral
-
-
-
-
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 Individualb- an Individualr- 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 individualsr- 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 individualsr- role
-
-
Method Detail
-
getPredicates
public java.util.Set<Predicate> getPredicates()
Description copied from interface:SimpleLogicalFormulaProcesses the set of all predicates which appear in this formula- Specified by:
getPredicatesin interfaceSimpleLogicalFormula- Specified by:
getPredicatesin classDlAxiom- Returns:
- all predicates that appear in this formula
-
clone
public RoleAssertion clone()
Description copied from interface:SimpleLogicalFormulaCreates a deep copy of this formula- Specified by:
clonein interfaceSimpleLogicalFormula- Specified by:
clonein classDlAxiom- Returns:
- the cloned formula
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceSimpleLogicalFormula- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfaceSimpleLogicalFormula- Overrides:
equalsin classjava.lang.Object
-
getSignature
public DlSignature getSignature()
Description copied from interface:FormulaReturns the signature of the language of this formula.- Specified by:
getSignaturein interfaceFormula- Specified by:
getSignaturein classDlAxiom- 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:
isAtomicin classAssertionalAxiom- Returns:
- "true" if the concept of the assertion is atomic, "false" if it is a complex concept
-
-