Class RoleAssertion
java.lang.Object
org.tweetyproject.logics.dl.syntax.DlAxiom
org.tweetyproject.logics.dl.syntax.AssertionalAxiom
org.tweetyproject.logics.dl.syntax.RoleAssertion
- All Implemented Interfaces:
Formula
,SimpleLogicalFormula
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
ConstructorDescriptionEmpty default constructor.RoleAssertion
(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 TypeMethodDescriptionclone()
Creates a deep copy of this formulaboolean
Return the individuals of this assertional axiomProcesses the set of all predicates which appear in this formulagetRole()
Return the role that the individuals assertional axiomReturns the signature of the language of this formula.int
hashCode()
boolean
isAtomic()
Determines if the concept involved in the assertion is atomic.toString()
Methods inherited from class org.tweetyproject.logics.dl.syntax.DlAxiom
getAtoms, getPredicateCls, isLiteral
-
Constructor Details
-
RoleAssertion
public RoleAssertion()Empty default constructor. -
RoleAssertion
Initializes a role assertion with the given individuals and role.- Parameters:
a
- an Individualb
- an Individualr
- a role
-
RoleAssertion
Initializes a role assertion with the given individuals and role.- Parameters:
args
- list of individualsr
- a role
-
RoleAssertion
Initializes a role assertion with the given role and individuals.- Parameters:
args
- pair of individualsr
- role
-
-
Method Details
-
getPredicates
Description copied from interface:SimpleLogicalFormula
Processes the set of all predicates which appear in this formula- Specified by:
getPredicates
in interfaceSimpleLogicalFormula
- Specified by:
getPredicates
in classDlAxiom
- Returns:
- all predicates that appear in this formula
-
clone
Description copied from interface:SimpleLogicalFormula
Creates a deep copy of this formula- Specified by:
clone
in interfaceSimpleLogicalFormula
- Specified by:
clone
in classDlAxiom
- Returns:
- the cloned formula
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classObject
-
equals
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classObject
-
getSignature
Description copied from interface:Formula
Returns the signature of the language of this formula.- Specified by:
getSignature
in interfaceFormula
- Specified by:
getSignature
in classDlAxiom
- Returns:
- the signature of the language of this formula.
-
getIndividuals
Return the individuals of this assertional axiom- Returns:
- the individuals of this assertional axiom (= the individuals that are instances of the role)
-
getRole
Return the role that the individuals assertional axiom- Returns:
- the role that the individuals of this assertional axiom are instances of.
-
isAtomic
public boolean isAtomic()Description copied from class:AssertionalAxiom
Determines if the concept involved in the assertion is atomic.- Specified by:
isAtomic
in classAssertionalAxiom
- Returns:
true
if the concept of the assertion is atomic,false
if it is a complex concept
-