jcreek.representation.constraints
Class LocalConstraintData

java.lang.Object
  extended byjcreek.representation.constraints.LocalConstraintData
All Implemented Interfaces:
ConstraintData, java.io.Serializable

public class LocalConstraintData
extends java.lang.Object
implements ConstraintData, java.io.Serializable

Implementation of constraint data that for storing the model as a local file.
For use together with LocalKnowledgeModel, LocalEntityData and so on.

Author:
Martin Stige
See Also:
Serialized Form

Constructor Summary
LocalConstraintData(KnowledgeModel km, java.lang.Integer id)
          Creates a new instance of LocalConstraintData
 
Method Summary
 ConstraintObject getConstraintObject()
          Returns the constraint object
 java.lang.String getDescription()
          Returns the description of the constraint
 java.lang.Integer getID()
          Returns the ID of the constraint
 Constraint newConstraintInstance()
          Returns an instance of the right constraint type
 void setConstraintObject(ConstraintObject constraintObject)
          Sets constraint object
 void setDescription(java.lang.String description)
          Sets the description of the constraint data
 void setKnowledgeModel(KnowledgeModel km)
          Sets the knowledge model
This method is used for building up the structures in the knowledge model during loading from file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalConstraintData

public LocalConstraintData(KnowledgeModel km,
                           java.lang.Integer id)
Creates a new instance of LocalConstraintData

Parameters:
km - the knowledge model
id - the id of this constraint shall have
Method Detail

getDescription

public java.lang.String getDescription()
Returns the description of the constraint

Specified by:
getDescription in interface ConstraintData

setDescription

public void setDescription(java.lang.String description)
Sets the description of the constraint data

Specified by:
setDescription in interface ConstraintData
Parameters:
description -

getConstraintObject

public ConstraintObject getConstraintObject()
Returns the constraint object

Specified by:
getConstraintObject in interface ConstraintData

setConstraintObject

public void setConstraintObject(ConstraintObject constraintObject)
Sets constraint object

Specified by:
setConstraintObject in interface ConstraintData
Parameters:
constraintObject - the constraintObject

getID

public java.lang.Integer getID()
Returns the ID of the constraint

Specified by:
getID in interface ConstraintData

toString

public java.lang.String toString()
Specified by:
toString in interface ConstraintData

newConstraintInstance

public Constraint newConstraintInstance()
Returns an instance of the right constraint type

Specified by:
newConstraintInstance in interface ConstraintData

setKnowledgeModel

public void setKnowledgeModel(KnowledgeModel km)
Sets the knowledge model
This method is used for building up the structures in the knowledge model during loading from file. If you scroll some centimeters up, you probaboy understand why - the km variable in this class is declared transient.

Parameters:
km - the knowledge model


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