|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.constraints.Constraint
jcreek.representation.constraints.ConcreteValueConstraint
Offers the ability to define constraints based on concrete values. You can either define the closed set of allowed values, or define a set of values that are not allowed.
It is not interresting to define both these two constraints on the same
entity->relation. If the (positive) allowed is used, all values not
on the list are implicitly defined as disallowed.
If the (negative) disallowed is used all values not on the list are allowed.
Field Summary |
Fields inherited from class jcreek.representation.constraints.Constraint |
constraintData, knowledgeModel |
Constructor Summary | |
ConcreteValueConstraint(KnowledgeModel knowledgeModel,
ConstraintData constraintData)
Creates a new instance of ConcreteValueConstraint |
|
ConcreteValueConstraint(KnowledgeModel knowledgeModel,
RelationType rel,
java.util.ArrayList values,
boolean allowed,
java.lang.String description)
Creates a new instance of ConcreteValueConstraint |
Method Summary | |
boolean |
getAllowed()
Returns whether the values are allowed or disallowed |
java.util.ArrayList |
getValues()
Returns the list of allowed or disallowed values |
void |
setAllowed(boolean b)
Sets whether the values are allowed or disallowed |
void |
setValues(java.util.ArrayList al)
Sets the values that are either allowed or disallowed |
Methods inherited from class jcreek.representation.constraints.Constraint |
check, equals, getConstraintData, getDescription, getID, getRelation, setDescription, setKnowledgeModel, setRelation, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConcreteValueConstraint(KnowledgeModel knowledgeModel, RelationType rel, java.util.ArrayList values, boolean allowed, java.lang.String description)
knowledgeModel
- the knowledge model the constraint shall bellong torel
- the relation type the constraint shall constrainvalues
- the concrete values to be allowed or notallowed
- whether the values shall be allowed or notdescription
- a description of the constraintpublic ConcreteValueConstraint(KnowledgeModel knowledgeModel, ConstraintData constraintData)
knowledgeModel
- the knowledge model the constraint shall bellong toconstraintData
- the constraint data to be contained by the constraintMethod Detail |
public void setValues(java.util.ArrayList al)
al
- the list of valuespublic void setAllowed(boolean b)
b
- allowed or notpublic java.util.ArrayList getValues()
public boolean getAllowed()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |