jcreek.representation.constraints
Class GeneralConstraint

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

public class GeneralConstraint
extends Constraint

General constraint.
Provides the ability to write arbitrary complex constraints using Java code.

Author:
Martin Stige

Field Summary
 
Fields inherited from class jcreek.representation.constraints.Constraint
constraintData, knowledgeModel
 
Constructor Summary
GeneralConstraint(KnowledgeModel km, ConstraintData data)
          Creates a new instance of CardinalityConstraint from a constraint data object
GeneralConstraint(KnowledgeModel knowledgeModel, java.lang.String constraintString, java.lang.String description)
          Creates a new instance of GeneralConstraint
 
Method Summary
 java.lang.String getConstraintString()
          Returns the constraint string, source code
 void setConstraintString(java.lang.String constraintString)
          Sets the constraint string, the source code
 
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

GeneralConstraint

public GeneralConstraint(KnowledgeModel knowledgeModel,
                         java.lang.String constraintString,
                         java.lang.String description)
Creates a new instance of GeneralConstraint

Parameters:
knowledgeModel - the knowledge model
constraintString - the source code describing the constraint
description - description of the constraint

GeneralConstraint

public GeneralConstraint(KnowledgeModel km,
                         ConstraintData data)
Creates a new instance of CardinalityConstraint from a constraint data object

Parameters:
km - the knowledge model
data - the constraint data to be contained in the constraint
Method Detail

setConstraintString

public void setConstraintString(java.lang.String constraintString)
Sets the constraint string, the source code

Parameters:
constraintString - the string containing the source code

getConstraintString

public java.lang.String getConstraintString()
Returns the constraint string, source code



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