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:
- Formula,- ClassicalFormula,- Conjunctable,- Disjunctable,- Invertable,- ProbabilityAware,- 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 SummaryConstructors Constructor Description UniversalRestriction(AtomicRole r, ComplexConcept c)Creates a new ALC universal restriction with the given role and concept.
 - 
Method SummaryModifier 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(java.lang.Object obj)ComplexConceptgetConcept()Get the concept of the universal restriction.Pair<AtomicRole,ComplexConcept>getFormulas()Get the role and concept that are part of the universal restriction.java.util.Set<Predicate>getPredicates()Processes the set of all predicates which appear in this formulaAtomicRolegetRole()Get the role of the universal restriction.DlSignaturegetSignature()Returns the signature of the language of this formula.inthashCode()booleanisLiteral()java.lang.StringtoString()- 
Methods inherited from class net.sf.tweety.logics.dl.syntax.ComplexConceptcombineWithAnd, combineWithOr, complement, getAtoms, getPredicateCls, getUniformProbability
 
- 
 
- 
- 
- 
Constructor Detail- 
UniversalRestrictionpublic UniversalRestriction(AtomicRole r, ComplexConcept c) Creates a new ALC universal restriction with the given role and concept.- Parameters:
- r- the role
- c- the concept that is being restricted by the role
 
 
- 
 - 
Method Detail- 
getFormulaspublic Pair<AtomicRole,ComplexConcept> getFormulas() Get the role and concept that are part of the universal restriction.- Returns:
- an atomic role and a concept
 
 - 
getRolepublic AtomicRole getRole() Get the role of the universal restriction.- Returns:
- an atomic role
 
 - 
getConceptpublic ComplexConcept getConcept() Get the concept of the universal restriction.- Returns:
- a concept
 
 - 
getSignaturepublic DlSignature getSignature() Description copied from interface:FormulaReturns the signature of the language of this formula.- Specified by:
- getSignaturein interface- Formula
- Specified by:
- getSignaturein class- ComplexConcept
- Returns:
- the signature of the language of this formula.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getPredicatespublic java.util.Set<Predicate> getPredicates() Description copied from interface:SimpleLogicalFormulaProcesses the set of all predicates which appear in this formula- Specified by:
- getPredicatesin interface- SimpleLogicalFormula
- Specified by:
- getPredicatesin class- ComplexConcept
- Returns:
- all predicates that appear in this formula
 
 - 
isLiteralpublic boolean isLiteral() - Returns:
- true if the formula represents a literal in the language or false otherwise
 
 - 
clonepublic ComplexConcept clone() Description copied from class:ComplexConceptCreates a deep copy of this formula- Specified by:
- clonein interface- SimpleLogicalFormula
- Specified by:
- clonein class- ComplexConcept
- Returns:
- the cloned formula
 
 - 
collapseAssociativeFormulaspublic 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 class- ComplexConcept
- Returns:
- the collapsed formula.
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- SimpleLogicalFormula
- Specified by:
- hashCodein class- ComplexConcept
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Specified by:
- equalsin interface- SimpleLogicalFormula
- Specified by:
- equalsin class- ComplexConcept
 
 
- 
 
-