|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.constraints.Constraint
Super class for all the different Constraint classes
Field Summary | |
protected ConstraintData |
constraintData
|
protected KnowledgeModel |
knowledgeModel
|
Constructor Summary | |
Constraint(KnowledgeModel knowledgeModel,
ConstraintData constraintData)
Creates a new instance of CardinalityConstraint from a constraint data object |
|
Constraint(KnowledgeModel knowledgeModel,
java.lang.String description)
Creates a new instance of Constraint |
Method Summary | |
ConstraintCheckResult |
check(Entity e)
Checks the constraint, met or violated |
boolean |
equals(java.lang.Object obj)
Descides whether two constraints are equal |
ConstraintData |
getConstraintData()
Returns the constraint data |
java.lang.String |
getDescription()
Returns the description of the constraint |
java.lang.Integer |
getID()
Returns the ID of the constraint |
RelationType |
getRelation()
Returns the relation type |
void |
setDescription(java.lang.String description)
Sets the description of this constraint. |
void |
setKnowledgeModel(KnowledgeModel knowledgeModel)
Sets the knowledge model that this constraint contains |
void |
setRelation(RelationType rel)
Sets the relation type constrained by the constraint |
java.lang.String |
toString()
Returns a string describing the constraint |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient KnowledgeModel knowledgeModel
protected transient ConstraintData constraintData
Constructor Detail |
public Constraint(KnowledgeModel knowledgeModel, java.lang.String description)
knowledgeModel
- the knowledge modeldescription
- a description of the constraintpublic Constraint(KnowledgeModel knowledgeModel, ConstraintData constraintData)
knowledgeModel
- the knowledge modelconstraintData
- the constraint data to be contained in the constraintMethod Detail |
public ConstraintCheckResult check(Entity e)
e
- the entity to be checked with this constraintpublic void setDescription(java.lang.String description)
description
- the description of the constraintpublic java.lang.String getDescription()
public void setRelation(RelationType rel)
rel
- the relationpublic RelationType getRelation()
public ConstraintData getConstraintData()
public void setKnowledgeModel(KnowledgeModel knowledgeModel)
knowledgeModel
- the knowledge modelpublic boolean equals(java.lang.Object obj)
obj
- the constraint to be compared with thispublic java.lang.Integer getID()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |