Package net.sf.tweety.logics.dl.syntax
Class UniversalRestriction
- java.lang.Object
-
- net.sf.tweety.logics.dl.syntax.ComplexConcept
-
- net.sf.tweety.logics.dl.syntax.UniversalRestriction
-
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Invertable,net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
public class UniversalRestriction extends ComplexConcept
This class models an universal restriction in description logics, i.e. an expression of the form "forall R.C" for a role R and a Concept C.- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description UniversalRestriction(AtomicRole r, ComplexConcept c)Creates a new ALC universal restriction with the given role and concept.
-
Method Summary
Modifier and Type Method Description ComplexConceptclone()Creates a deep copy of this formulaComplexConceptcollapseAssociativeFormulas()This method collapses all associative operations appearing in this term, e.g.booleanequals(Object obj)ComplexConceptgetConcept()Get the concept of the universal restriction.net.sf.tweety.commons.util.Pair<AtomicRole,ComplexConcept>getFormulas()Get the role and concept that are part of the universal restriction.Set<net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()AtomicRolegetRole()Get the role of the universal restriction.DlSignaturegetSignature()inthashCode()booleanisLiteral()StringtoString()-
Methods inherited from class net.sf.tweety.logics.dl.syntax.ComplexConcept
combineWithAnd, combineWithOr, complement, getAtoms, getPredicateCls, getUniformProbability
-
-
-
-
Constructor Detail
-
UniversalRestriction
public UniversalRestriction(AtomicRole r, ComplexConcept c)
Creates a new ALC universal restriction with the given role and concept.- Parameters:
r- the rolec- the concept that is being restricted by the role
-
-
Method Detail
-
getFormulas
public net.sf.tweety.commons.util.Pair<AtomicRole,ComplexConcept> getFormulas()
Get the role and concept that are part of the universal restriction.- Returns:
- an atomic role and a concept
-
getRole
public AtomicRole getRole()
Get the role of the universal restriction.- Returns:
- an atomic role
-
getConcept
public ComplexConcept getConcept()
Get the concept of the universal restriction.- Returns:
- a concept
-
getSignature
public DlSignature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula- Specified by:
getSignaturein classComplexConcept
-
getPredicates
public Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
- Specified by:
getPredicatesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
getPredicatesin classComplexConcept
-
isLiteral
public boolean isLiteral()
-
clone
public ComplexConcept clone()
Description copied from class:ComplexConceptCreates a deep copy of this formula- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
clonein classComplexConcept
-
collapseAssociativeFormulas
public ComplexConcept collapseAssociativeFormulas()
Description copied from class:ComplexConceptThis method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.- Specified by:
collapseAssociativeFormulasin classComplexConcept- Returns:
- the collapsed formula.
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
hashCodein classComplexConcept
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
equalsin classComplexConcept
-
-