|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qedeq.kernel.bo.service.logic.DefaultExistenceChecker
public class DefaultExistenceChecker
Checks if all predicate and function constants exist already.
Field Summary |
---|
Fields inherited from interface org.qedeq.kernel.bo.logic.common.ExistenceChecker |
---|
NAME_EQUAL |
Constructor Summary | |
---|---|
DefaultExistenceChecker()
Constructor. |
Method Summary | |
---|---|
void |
add(FunctionConstant definition)
Add unknown function constant definition. |
void |
add(InitialFunctionDefinition initialDefinition)
Add unknown function constant definition. |
void |
add(InitialPredicateDefinition initialDefinition)
Add unknown predicate constant definition. |
void |
add(PredicateConstant constant)
Add unknown predicate constant definition. |
void |
add(RuleKey ruleKey,
Rule definition)
Add unknown rule definition. |
boolean |
classOperatorExists()
Check if the class operator is already defined. |
void |
clear()
Empty all definitions. |
boolean |
functionExists(FunctionKey function)
Check if a function is already defined. |
boolean |
functionExists(java.lang.String name,
int arguments)
Check if a function is already defined. |
FunctionConstant |
get(FunctionKey function)
Get function constant definition. |
PredicateConstant |
get(PredicateKey predicate)
Get predicate constant definition. |
Rule |
get(RuleKey ruleKey)
Get rule definition. |
FunctionConstant |
getFunction(java.lang.String name,
int arguments)
Get function constant definition. |
java.lang.String |
getIdentityOperator()
Get identity operator. |
PredicateConstant |
getPredicate(java.lang.String name,
int arguments)
Get predicate constant definition. |
boolean |
identityOperatorExists()
Check if the identity operator is already defined. |
boolean |
isInitialFunction(FunctionKey function)
Check if given function key has an initial function definition. |
boolean |
isInitialPredicate(PredicateKey predicate)
Check if given predicate key has an initial predicate definition. |
boolean |
predicateExists(PredicateKey predicate)
Check if a predicate is already defined. |
boolean |
predicateExists(java.lang.String name,
int arguments)
Check if a predicate is already defined. |
boolean |
ruleExists(RuleKey ruleKey)
Check if a rule is already defined. |
void |
setIdentityOperatorDefined(java.lang.String identityOperator)
Set the identity operator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultExistenceChecker()
Method Detail |
---|
public void clear()
public boolean predicateExists(PredicateKey predicate)
PredicateExistenceChecker
predicateExists
in interface PredicateExistenceChecker
predicate
- Predicate.
public boolean predicateExists(java.lang.String name, int arguments)
PredicateExistenceChecker
predicateExists
in interface PredicateExistenceChecker
name
- Predicate name.arguments
- Number of operands for the predicate.
public boolean isInitialPredicate(PredicateKey predicate)
PredicateExistenceChecker
isInitialPredicate
in interface PredicateExistenceChecker
predicate
- Predicate.
public void add(InitialPredicateDefinition initialDefinition)
initialDefinition
- Predicate constant definition that is not already known. Must not be
null
.
java.lang.IllegalArgumentException
- Predicate constant is already defined.public void add(PredicateConstant constant)
constant
- Predicate constant definition that is not already known. Must not be
null
.
java.lang.IllegalArgumentException
- Predicate constant is already defined.public PredicateConstant get(PredicateKey predicate)
predicate
- Get definition of this predicate.
public PredicateConstant getPredicate(java.lang.String name, int arguments)
name
- Name of predicate.arguments
- Arguments of predicate.
null
.public boolean functionExists(FunctionKey function)
FunctionExistenceChecker
functionExists
in interface FunctionExistenceChecker
function
- Function.
public boolean functionExists(java.lang.String name, int arguments)
FunctionExistenceChecker
functionExists
in interface FunctionExistenceChecker
name
- Function name.arguments
- Number of operands for the function.
public void add(FunctionConstant definition)
definition
- Function constant definition that is not already known. Must not be
null
.
java.lang.IllegalArgumentException
- Function constant is already defined.public void add(InitialFunctionDefinition initialDefinition)
initialDefinition
- Function constant definition that is not already known. Must not be
null
.
java.lang.IllegalArgumentException
- Function constant is already defined.public FunctionConstant get(FunctionKey function)
function
- Get definition of this predicate.
null
.public FunctionConstant getFunction(java.lang.String name, int arguments)
name
- Name of function.arguments
- Arguments of function.
null
.public boolean isInitialFunction(FunctionKey function)
FunctionExistenceChecker
isInitialFunction
in interface FunctionExistenceChecker
function
- Function key.
public boolean ruleExists(RuleKey ruleKey)
RuleExistenceChecker
ruleExists
in interface RuleExistenceChecker
ruleKey
- Rule defining data.
public void add(RuleKey ruleKey, Rule definition)
ruleKey
- Key for rule.definition
- Rule definition that is not already known. Must not be
null
. Rule key might be different!
java.lang.IllegalArgumentException
- Rule is already defined (for given version).public Rule get(RuleKey ruleKey)
ruleKey
- Get definition of this key.
null
.public boolean classOperatorExists()
ClassOperatorExistenceChecker
classOperatorExists
in interface ClassOperatorExistenceChecker
public boolean identityOperatorExists()
IdentityOperatorExistenceChecker
identityOperatorExists
in interface IdentityOperatorExistenceChecker
public java.lang.String getIdentityOperator()
IdentityOperatorExistenceChecker
getIdentityOperator
in interface IdentityOperatorExistenceChecker
null
if !IdentityOperatorExistenceChecker.identityOperatorExists()
.public void setIdentityOperatorDefined(java.lang.String identityOperator)
identityOperator
- Operator name. Might be null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |