|
|||||||||||
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.CardinalityConstraint
Offers the ability from define cardinality constraints for the relations of a given type for some entity. Two integer values, max and min defines the maximum and minimum cardinality.
Field Summary |
Fields inherited from class jcreek.representation.constraints.Constraint |
constraintData, knowledgeModel |
Constructor Summary | |
CardinalityConstraint(KnowledgeModel knowledgeModel,
ConstraintData constraintData)
Creates a new instance of CardinalityConstraint from a constraint data object |
|
CardinalityConstraint(KnowledgeModel knowledgeModel,
RelationType rel,
int numberMin,
int numberMax,
java.lang.String description)
Creates a new instance of CardinalityConstraint |
Method Summary | |
int |
getMax()
Returns the maximum cardinality constraint |
int |
getMin()
Returns the minimum cardinality constraint |
void |
setMax(int max)
Sets the maximum cardinality value |
void |
setMin(int min)
Sets the minimum cardinality value |
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 CardinalityConstraint(KnowledgeModel knowledgeModel, RelationType rel, int numberMin, int numberMax, java.lang.String description)
knowledgeModel
- the knowledge modelrel
- the relation to be constrainednumberMin
- the minimum cardinalitynumberMax
- the maximum cardinalitydescription
- description of the constraintpublic CardinalityConstraint(KnowledgeModel knowledgeModel, ConstraintData constraintData)
knowledgeModel
- the knowledge modelconstraintData
- the constraint data to be contained in the constraintMethod Detail |
public void setMin(int min)
min
- the minimum cardinalitypublic void setMax(int max)
max
- the maximum cardinalitypublic int getMin()
public int getMax()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |