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 RoleAssertion
clone()
Creates a deep copy of this formulaboolean
equals(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 formulaAtomicRole
getRole()
Get the role that the individuals of this assertional axiom are instances of.DlSignature
getSignature()
Returns the signature of the language of this formula.int
hashCode()
boolean
isAtomic()
java.lang.String
toString()
-
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: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
public RoleAssertion 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classjava.lang.Object
-
getSignature
public DlSignature 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
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 classAssertionalAxiom
- Returns:
- "true" if the concept of the assertion is atomic, "false" if it is a complex concept
-
-