Dresden OCL Toolkit

tudresden.ocl.sql
Class SimpleOCLEditorModel.SimpleConstraintRepresentation

java.lang.Object
  extended bytudresden.ocl.sql.SimpleOCLEditorModel.SimpleConstraintRepresentation
All Implemented Interfaces:
ConstraintRepresentation, Serializable
Enclosing class:
SimpleOCLEditorModel

public class SimpleOCLEditorModel.SimpleConstraintRepresentation
extends Object
implements ConstraintRepresentation, Serializable

A simple implementation of the ConstraintRepresentation interface.

Author:
Sten Loecher
See Also:
Serialized Form

Field Summary
(package private)  String constraintData
           
(package private)  String constraintName
          The actual constraint will be stored directly into String objects.
(package private)  int posInModel
           
(package private) static long serialVersionUID
          To control serialization.
 
Constructor Summary
SimpleOCLEditorModel.SimpleConstraintRepresentation()
          Creates new SimpleConstraintRepresentation.
SimpleOCLEditorModel.SimpleConstraintRepresentation(ConstraintRepresentation ce)
          Creates new SimpleConstraintRepresentation.
SimpleOCLEditorModel.SimpleConstraintRepresentation(ConstraintRepresentation cr, int posInModel)
          Creates new SimpleConstraintRepresentation.
SimpleOCLEditorModel.SimpleConstraintRepresentation(String sName, String sData, int posInModel)
          Creates new SimpleConstraintRepresentation.
 
Method Summary
 String getData()
          Get the constraint's body text.
 String getName()
          Get the constraint's name.
 void setData(String sData, EditingUtilities euHelper)
          Set the constraint's body text.
 void setName(String sName, EditingUtilities euHelper)
          Set the constraint's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
To control serialization.

See Also:
Constant Field Values

constraintName

String constraintName
The actual constraint will be stored directly into String objects.


constraintData

String constraintData

posInModel

int posInModel
Constructor Detail

SimpleOCLEditorModel.SimpleConstraintRepresentation

public SimpleOCLEditorModel.SimpleConstraintRepresentation()
Creates new SimpleConstraintRepresentation.


SimpleOCLEditorModel.SimpleConstraintRepresentation

public SimpleOCLEditorModel.SimpleConstraintRepresentation(ConstraintRepresentation ce)
Creates new SimpleConstraintRepresentation.


SimpleOCLEditorModel.SimpleConstraintRepresentation

public SimpleOCLEditorModel.SimpleConstraintRepresentation(String sName,
                                                           String sData,
                                                           int posInModel)
Creates new SimpleConstraintRepresentation.


SimpleOCLEditorModel.SimpleConstraintRepresentation

public SimpleOCLEditorModel.SimpleConstraintRepresentation(ConstraintRepresentation cr,
                                                           int posInModel)
Creates new SimpleConstraintRepresentation.

Method Detail

getData

public String getData()
Get the constraint's body text.

Specified by:
getData in interface ConstraintRepresentation

getName

public String getName()
Get the constraint's name.

Specified by:
getName in interface ConstraintRepresentation

setData

public void setData(String sData,
                    EditingUtilities euHelper)
             throws IllegalStateException,
                    OclParserException,
                    OclTypeException
Description copied from interface: ConstraintRepresentation
Set the constraint's body text. For the exceptions the detailed message must be human readable.

Specified by:
setData in interface ConstraintRepresentation
Parameters:
sData - the new body of the constraint
euHelper - utility that can be used to check for syntactical correctness etc.
Throws:
OclTypeException - if the specified constraint does not adhere by OCL type rules.
OclParserException - if the specified constraint is not syntactically correct.
IllegalStateException - if the constraint is not in a state to accept body changes.

setName

public void setName(String sName,
                    EditingUtilities euHelper)
             throws IllegalStateException,
                    IllegalArgumentException
Description copied from interface: ConstraintRepresentation
Set the constraint's name. For the exceptions the detailed message must be human readable.

Specified by:
setName in interface ConstraintRepresentation
Parameters:
sName - the new name of the constraint
euHelper - utility that can be used to check for syntactical correctness etc.
Throws:
IllegalStateException - if the constraint is not in a state to accept name changes.
IllegalArgumentException - if the specified name is not a legal name for the constraint.

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.