jcreek.representation.constraints
Class ValueClassConstraint

java.lang.Object
  extended byjcreek.representation.constraints.Constraint
      extended byjcreek.representation.constraints.ValueClassConstraint

public class ValueClassConstraint
extends Constraint

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...

Author:
Martin Stige

Field Summary
 
Fields inherited from class jcreek.representation.constraints.Constraint
constraintData, knowledgeModel
 
Constructor Summary
ValueClassConstraint(KnowledgeModel knowledgeModel, ConstraintData constraintData)
          Creates a new instance of ValueClassConstraint from a constraint data object
ValueClassConstraint(KnowledgeModel knowledgeModel, RelationType rel, Entity superEntity, java.lang.String description)
          Creates a new instance of ValueClassConstraint
 
Method Summary
 Entity getSuperEntity()
          Returns the super entity
 void setSuperEntity(Entity superEntity)
          Sets the mandatory super entity
 
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

ValueClassConstraint

public ValueClassConstraint(KnowledgeModel knowledgeModel,
                            RelationType rel,
                            Entity superEntity,
                            java.lang.String description)
Creates a new instance of ValueClassConstraint

Parameters:
knowledgeModel - the knowledge model the constraint shall bellong to
rel - the relation type the constraint shall constrain
superEntity - the entity that the relation's value must be a subclass of
description - a description of the constraint

ValueClassConstraint

public ValueClassConstraint(KnowledgeModel knowledgeModel,
                            ConstraintData constraintData)
Creates a new instance of ValueClassConstraint from a constraint data object

Parameters:
knowledgeModel - the knowledge model the constraint shall bellong to
constraintData - the constraint data to be contained by the constraint
Method Detail

setSuperEntity

public void setSuperEntity(Entity superEntity)
Sets the mandatory super entity

Parameters:
superEntity - the entity that the relation's value must be a subclass of

getSuperEntity

public Entity getSuperEntity()
Returns the super entity



Created at IDI, NTNU by the Artificial Intelligence and Learning group