|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.constraints.ConstraintObject
jcreek.representation.constraints.ValueClassConstraintObject
Handles the behaviour of Value class constraints.
Offers the ability to state that the value of the relations of a given type from a given entity must be subclasses of some class/entity.
It is probably a good idea to make a negative counterpart of this one, ore include the negative value class in this constraint. But that is defered...
Field Summary |
Fields inherited from class jcreek.representation.constraints.ConstraintObject |
km, rel |
Constructor Summary | |
ValueClassConstraintObject(RelationType rel,
Entity supercl)
Creates a new instance of Value Class Constraint from must be a subclass of supercl |
Method Summary | |
ConstraintCheckResult |
check(Entity from)
Checks whether the constraint is violated or not. |
protected Entity |
getSuperEntity()
|
Constraint |
newConstraintInstance(KnowledgeModel km,
ConstraintData data)
Creates a Constraint object of a specific type |
protected void |
setSuperEntity(Entity e)
|
java.lang.String |
toString()
|
Methods inherited from class jcreek.representation.constraints.ConstraintObject |
getRelation, setKnowledgeModel, setRelation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValueClassConstraintObject(RelationType rel, Entity supercl)
rel
- the relation being restrictedsupercl
- the entity that target of the relation must be an instance ofMethod Detail |
public ConstraintCheckResult check(Entity from)
ConstraintObject
Should be augmented to offer some feedback about the violations. Until that is made, feedback is just printed to System.out.
check
in class ConstraintObject
protected Entity getSuperEntity()
protected void setSuperEntity(Entity e)
public Constraint newConstraintInstance(KnowledgeModel km, ConstraintData data)
ConstraintObject
newConstraintInstance
in class ConstraintObject
km
- the knowledge model that the constraint shall bellong todata
- the ConstraintData object to be contained by the constriantpublic java.lang.String toString()
toString
in class ConstraintObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |