|
||||||||||
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
org.qedeq.kernel.bo.service.logic.ModuleConstantsExistenceCheckerImpl
public class ModuleConstantsExistenceCheckerImpl
Checks if a predicate or function constant is defined.
Field Summary |
---|
Fields inherited from interface org.qedeq.kernel.bo.logic.common.ExistenceChecker |
---|
NAME_EQUAL |
Constructor Summary | |
---|---|
ModuleConstantsExistenceCheckerImpl(KernelQedeqBo prop)
Constructor. |
Method Summary | |
---|---|
boolean |
classOperatorExists()
Check if the class operator is already defined. |
boolean |
functionExists(FunctionKey function)
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. |
KernelQedeqBo |
getClassOperatorModule()
Get QEDEQ module where the class operator is defined within. |
KernelQedeqBo |
getIdentityOperatorModule()
Get QEDEQ module where the identity operator is defined within. |
RuleKey |
getParentRuleKey(java.lang.String ruleName)
Get maximum rule version that is defined in an imported module. |
KernelQedeqBo |
getQedeq(FunctionKey function)
Get QEDEQ module where given function constant is defined. |
KernelQedeqBo |
getQedeq(PredicateKey predicate)
Get QEDEQ module where given predicate constant is defined. |
KernelQedeqBo |
getQedeq(RuleKey ruleKey)
Get QEDEQ module where given rule is defined. |
RuleKey |
getRuleKey(java.lang.String ruleName)
Get maximum rule version that is defined in this or an imported module. |
java.util.Map |
getRules()
Get map of all RuleKey s defined in this module or in one of the imported ones. |
void |
init()
Check if required QEDEQ modules mix without problems. |
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. |
void |
setClassOperatorModule(KernelQedeqBo classOperatorModule,
ModuleContext context)
Set if the class operator is already defined. |
void |
setIdentityOperatorDefined(java.lang.String identityOperator,
KernelQedeqBo identityOperatorModule,
ModuleContext context)
Set the identity operator. |
Methods inherited from class org.qedeq.kernel.bo.service.logic.DefaultExistenceChecker |
---|
add, add, add, add, add, clear, functionExists, getFunction, getIdentityOperator, getPredicate, identityOperatorExists, predicateExists, ruleExists, setIdentityOperatorDefined |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.qedeq.kernel.bo.module.ModuleConstantsExistenceChecker |
---|
getFunction, getPredicate |
Methods inherited from interface org.qedeq.kernel.bo.logic.common.PredicateExistenceChecker |
---|
predicateExists |
Methods inherited from interface org.qedeq.kernel.bo.logic.common.FunctionExistenceChecker |
---|
functionExists |
Methods inherited from interface org.qedeq.kernel.bo.logic.common.IdentityOperatorExistenceChecker |
---|
getIdentityOperator, identityOperatorExists |
Methods inherited from interface org.qedeq.kernel.bo.logic.common.RuleExistenceChecker |
---|
ruleExists |
Constructor Detail |
---|
public ModuleConstantsExistenceCheckerImpl(KernelQedeqBo prop) throws ModuleDataException
prop
- QEDEQ module properties object.
ModuleDataException
- Referenced QEDEQ modules are already inconsistent: they doesn't
mix.Method Detail |
---|
public final void init() throws ModuleDataException
setIdentityOperatorDefined(String,
KernelQedeqBo, ModuleContext)
and
ModuleConstantsExistenceCheckerImpl#setClassOperatorModule(KernelQedeqBo)
) are set accordingly.
ModuleDataException
- Required modules doesn't mix.public boolean predicateExists(PredicateKey predicate)
PredicateExistenceChecker
predicateExists
in interface PredicateExistenceChecker
predicateExists
in interface ModuleConstantsExistenceChecker
predicateExists
in class DefaultExistenceChecker
predicate
- Predicate.
public boolean functionExists(FunctionKey function)
FunctionExistenceChecker
functionExists
in interface FunctionExistenceChecker
functionExists
in interface ModuleConstantsExistenceChecker
functionExists
in class DefaultExistenceChecker
function
- Function.
public boolean isInitialPredicate(PredicateKey predicate)
PredicateExistenceChecker
isInitialPredicate
in interface PredicateExistenceChecker
isInitialPredicate
in class DefaultExistenceChecker
predicate
- Predicate.
public boolean isInitialFunction(FunctionKey function)
FunctionExistenceChecker
isInitialFunction
in interface FunctionExistenceChecker
isInitialFunction
in class DefaultExistenceChecker
function
- Function key.
public PredicateConstant get(PredicateKey predicate)
DefaultExistenceChecker
get
in interface ModuleConstantsExistenceChecker
get
in class DefaultExistenceChecker
predicate
- Get definition of this predicate.
public FunctionConstant get(FunctionKey function)
DefaultExistenceChecker
get
in interface ModuleConstantsExistenceChecker
get
in class DefaultExistenceChecker
function
- Get definition of this predicate.
null
.public KernelQedeqBo getQedeq(FunctionKey function)
getQedeq
in interface ModuleConstantsExistenceChecker
function
- Function we look for.
public KernelQedeqBo getQedeq(PredicateKey predicate)
getQedeq
in interface ModuleConstantsExistenceChecker
predicate
- Predicate we look for.
public RuleKey getRuleKey(java.lang.String ruleName)
ModuleConstantsExistenceChecker
getRuleKey
in interface ModuleConstantsExistenceChecker
ruleName
- Rule we look for.
public RuleKey getParentRuleKey(java.lang.String ruleName)
ModuleConstantsExistenceChecker
getParentRuleKey
in interface ModuleConstantsExistenceChecker
ruleName
- Rule we look for.
public Rule get(RuleKey ruleKey)
DefaultExistenceChecker
get
in interface ModuleConstantsExistenceChecker
get
in class DefaultExistenceChecker
ruleKey
- Get definition of this key.
null
.public java.util.Map getRules()
ModuleConstantsExistenceChecker
RuleKey
s defined in this module or in one of the imported ones.
getRules
in interface ModuleConstantsExistenceChecker
RuleKey
to KernelQedeqBo
.public KernelQedeqBo getQedeq(RuleKey ruleKey)
getQedeq
in interface ModuleConstantsExistenceChecker
ruleKey
- Rule we look for.
null
.public boolean classOperatorExists()
ClassOperatorExistenceChecker
classOperatorExists
in interface ClassOperatorExistenceChecker
classOperatorExists
in interface ModuleConstantsExistenceChecker
classOperatorExists
in class DefaultExistenceChecker
public void setIdentityOperatorDefined(java.lang.String identityOperator, KernelQedeqBo identityOperatorModule, ModuleContext context) throws IdentityOperatorAlreadyExistsException
setIdentityOperatorDefined
in interface ModuleConstantsExistenceChecker
identityOperator
- Operator name. Might be null
.identityOperatorModule
- In this module the identity operator is defined.context
- Here we are within the module.
IdentityOperatorAlreadyExistsException
- Already defined.public KernelQedeqBo getClassOperatorModule()
ModuleConstantsExistenceChecker
getClassOperatorModule
in interface ModuleConstantsExistenceChecker
public KernelQedeqBo getIdentityOperatorModule()
ModuleConstantsExistenceChecker
getIdentityOperatorModule
in interface ModuleConstantsExistenceChecker
public void setClassOperatorModule(KernelQedeqBo classOperatorModule, ModuleContext context) throws ClassOperatorAlreadyExistsException
setClassOperatorModule
in interface ModuleConstantsExistenceChecker
classOperatorModule
- Module where class operator is defined.context
- Context where we try to set new class operator.
ClassOperatorAlreadyExistsException
- Operator already defined.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |