ucot.model.object
Class ObjectAnalyzeModelEditor

java.lang.Object
  extended by ucot.model.object.ObjectAnalyzeModelEditor
All Implemented Interfaces:
java.io.Serializable, ModelEditor

public class ObjectAnalyzeModelEditor
extends java.lang.Object
implements ModelEditor, java.io.Serializable

Editor for the ObjectAnalyzeModel.

Author:
pajumasu
See Also:
Serialized Form

Field Summary
(package private)  ObjectAnalyzeModel model
           
static long serialVersionUID
           
(package private)  java.util.List<Updation> updations
           
 
Constructor Summary
ObjectAnalyzeModelEditor(ObjectAnalyzeModel model)
           
 
Method Summary
 void addAttribute(java.lang.String entityName, java.lang.String attributeName)
          Adds attribute to the entity.
 void addChild(java.lang.String entityName, java.lang.String childEntity)
          Adds child to the entity.
 void addEntity(java.lang.String name)
          Adds an entity to the model.
 void addEntityInfluenceByMethod(java.lang.String entityName, java.lang.String methodName, java.lang.String influencedEntity)
          Adds an influence between entity's method and the given entity.
 void addMethod(java.lang.String entityName, java.lang.String methodName)
          Add method to the entity.
 void addParent(java.lang.String entityName, java.lang.String parentEntity)
          Adds parent to the entity.
 void changeEntityName(java.lang.String oldName, java.lang.String newName)
          Changes the name of the entity.
 void changeMethodName(java.lang.String entityName, java.lang.String methodOldName, java.lang.String methodNewName)
          Changes method name.
 void clearModel()
          Clears model and makes it empty.
 boolean containsAttribute(java.lang.String entityName, java.lang.String attributeName)
          Checks wheter the entity contains the attribute or not.
 boolean containsEntity(java.lang.String entityName)
          Does the model contain the entity?
 boolean containsMethod(java.lang.String entityName, java.lang.String methodName)
          Checks if the given method exists in the entity.
 boolean execute(Updation updation)
          Executes action defined by updaton object.
 java.lang.String getAttributeFromCardinal(java.lang.String entityName, java.lang.String attributeName)
          Gets from part of the cardinality of the attribute relation.
 java.util.Set<java.lang.String> getAttributeNames(java.lang.String entityName)
          Returns the attributes of the entity.
 java.lang.String getAttributeToCardinal(java.lang.String entityName, java.lang.String attributeName)
          Gets to part of the cardinality of the attribute relation.
 java.util.Set<java.lang.String> getChildren(java.lang.String entityName)
          Returns the names of the entity's children.
 java.util.Set<java.lang.String> getEntitiesInfluencedByMethod(java.lang.String entityName, java.lang.String methodName)
          Returns set of entities that are refered by methods in the model.
 java.util.Set<java.lang.String> getEntityNames()
          Returns the names of the entities that the model contains.
 java.lang.String getEntityType(java.lang.String name)
          Returns the type of the entity.
 java.util.Set<java.lang.String> getMethodNames(java.lang.String entityName)
          Returns the names of the entity's methods.
 java.util.Set<java.lang.String> getParents(java.lang.String entityName)
          Returns the parents of the entity.
 java.util.List<Updation> getUpdations()
          Get updations done to this analyzemodel.
 void merge(AnalyzeModel fromModel)
          Merges given AnalyzeModel to the editors model.
 void mergeEntity(java.lang.String targetEntityName, java.util.Set<java.lang.String> mergeSet)
          Merges entities to other entity.
 void readySignal()
          Signals all observers that this model is ready.
 void removeAllChildren(java.lang.String entityName)
          Removes all the children from the entity.
 void removeAllParents(java.lang.String entityName)
          Removes all the parents of the entity.
 void removeAttribute(java.lang.String entityName, java.lang.String attributeName)
          Removes attribute from the entity.
 void removeChild(java.lang.String entityName, java.lang.String childEntity)
          Removes given child from the entity.
 void removeEntity(java.lang.String name)
          Removes entity from model.
 void removeEntityInfluenceByMethod(java.lang.String entityName, java.lang.String methodName, java.lang.String influencedEntity)
          Removes influnce between entity's method and the given entity.
 void removeMethod(java.lang.String entityName, java.lang.String methodName)
          Removes method from the entity.
 void removeParent(java.lang.String entityName, java.lang.String parentEntity)
          Removes given parent from the entity.
 void saveUpdationsToFile(java.io.File target)
          Saves the updations (modification log) to the given file.
private  void sendUpdation(Updation updation)
           
 void setAttributeFromCardinal(java.lang.String entityName, java.lang.String attributeName, java.lang.String cardinal)
          Sets the cardinality on the entitys side.
 void setAttributeToCardinal(java.lang.String entityName, java.lang.String attributeName, java.lang.String cardinal)
          Sets the cardinality on attributes side.
 void setEntityType(java.lang.String name, java.lang.String entityType)
          Sets the type of the entity.
 void stepBack(int steps)
          Undoes some edition steps.
 void updationStartedSignal()
          Signals all observers that this model is beign modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

model

ObjectAnalyzeModel model

updations

java.util.List<Updation> updations
Constructor Detail

ObjectAnalyzeModelEditor

public ObjectAnalyzeModelEditor(ObjectAnalyzeModel model)
Method Detail

sendUpdation

private void sendUpdation(Updation updation)

clearModel

public void clearModel()
Description copied from interface: ModelEditor

Clears model and makes it empty.

If cleared MUST send Updation message:
Type: UpdationType.CLEAR

Specified by:
clearModel in interface ModelEditor
See Also:
Updation.UpdationType.CLEAR

getEntityNames

public java.util.Set<java.lang.String> getEntityNames()
Description copied from interface: ModelEditor

Returns the names of the entities that the model contains.

Specified by:
getEntityNames in interface ModelEditor
Returns:
the names of the entities that the model contains.

getEntityType

public java.lang.String getEntityType(java.lang.String name)
Description copied from interface: ModelEditor

Returns the type of the entity.

Specified by:
getEntityType in interface ModelEditor
Parameters:
name - The name of the entity.
Returns:
The type of the entity.

setEntityType

public void setEntityType(java.lang.String name,
                          java.lang.String entityType)
Description copied from interface: ModelEditor

Sets the type of the entity.

If type is set MUST send Updation message:
Type: UpdationType.MODIFY
DataType: UpdationDataType.ENTITY_TYPE
Parameters: name of the entity, the type string

Specified by:
setEntityType in interface ModelEditor
Parameters:
name - The name of the entity.
entityType - The type
See Also:
Updation.UpdationType.MODIFY, Updation.UpdationDataType.ENTITY_TYPE

addEntity

public void addEntity(java.lang.String name)
Description copied from interface: ModelEditor

Adds an entity to the model. If entity exists nothing is done.

If addition occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.ENTITY
Parameters: name of the entity.

Specified by:
addEntity in interface ModelEditor
Parameters:
name - The name of the entity.
See Also:
Updation.UpdationDataType.ENTITY

removeEntity

public void removeEntity(java.lang.String name)
Description copied from interface: ModelEditor

Removes entity from model. If no such entity is found nothing is done.

If removing occurs MUST send Updation message:
Type: UpdationType.DELETE
DataType: UpdationDataType.ENTITY
Parameters: name of the entity.

Specified by:
removeEntity in interface ModelEditor
Parameters:
name - The name of the entity.
See Also:
Updation.UpdationDataType.ENTITY

changeEntityName

public void changeEntityName(java.lang.String oldName,
                             java.lang.String newName)
                      throws NoSuchEntityException
Description copied from interface: ModelEditor

Changes the name of the entity.

If change occurs MUST send Updation message:
Type: UpdationType.MODIFY
DataType: UpdationDataType.ENTITY
Parameters: old name of the entity, new name of the entity

Specified by:
changeEntityName in interface ModelEditor
Parameters:
oldName - The entity name that is going to be changed.
newName - The new name for that entity.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationType.MODIFY, Updation.UpdationDataType.ENTITY

containsEntity

public boolean containsEntity(java.lang.String entityName)
Description copied from interface: ModelEditor

Does the model contain the entity?

Specified by:
containsEntity in interface ModelEditor
Parameters:
entityName - The name of the entity which existence is checked.
Returns:
true if the entity exists. False otherwise.

addParent

public void addParent(java.lang.String entityName,
                      java.lang.String parentEntity)
               throws NoSuchEntityException
Description copied from interface: ModelEditor

Adds parent to the entity. If entity is not found

if adding occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.ENTITY_PARENT
Parameters: name of the entity, the name of the parent

Specified by:
addParent in interface ModelEditor
Parameters:
entityName - The name of the child entity.
parentEntity - The name of the parent entity.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationDataType.ENTITY_PARENT

removeParent

public void removeParent(java.lang.String entityName,
                         java.lang.String parentEntity)
                  throws AnalyzeModelException
Description copied from interface: ModelEditor

Removes given parent from the entity.

If removing occurs MUST send Updation message:
Type: UpdationType.DELETE
DataType: UpdationDataType.ENTITY_PARENT
Parameters: name of the entity, the name of the parent

Specified by:
removeParent in interface ModelEditor
Parameters:
entityName - The name of the child entity.
parentEntity - The name of the parent entity.
Throws:
NoSuchEntityException - If given entity is not found.
AnalyzeModelException
See Also:
Updation.UpdationDataType.ENTITY_PARENT

removeAllParents

public void removeAllParents(java.lang.String entityName)
                      throws NoSuchEntityException
Description copied from interface: ModelEditor

Removes all the parents of the entity. This does same thing than calling removeParent(String,String) for every parent.

Specified by:
removeAllParents in interface ModelEditor
Parameters:
entityName - The name of the entity which parents are cleared.
Throws:
NoSuchEntityException - If given entity is not found.

getParents

public java.util.Set<java.lang.String> getParents(java.lang.String entityName)
Description copied from interface: ModelEditor

Returns the parents of the entity.

Specified by:
getParents in interface ModelEditor
Parameters:
entityName - The name of the entity.
Returns:
The parents of the given entity.

addChild

public void addChild(java.lang.String entityName,
                     java.lang.String childEntity)
              throws NoSuchEntityException
Description copied from interface: ModelEditor

Adds child to the entity. This is same than calling addParent(childEntity, entityName) and same kind of updation message is expected.

if adding occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.ENTITY_PARENT
Parameters: name of the entity, the name of the parent

Specified by:
addChild in interface ModelEditor
Parameters:
entityName - The name of parent entity.
childEntity - The name of the child.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationDataType.ENTITY_PARENT

removeChild

public void removeChild(java.lang.String entityName,
                        java.lang.String childEntity)
                 throws AnalyzeModelException
Description copied from interface: ModelEditor

Removes given child from the entity. This is same than calling removeParent(childEntity, entityName) and same kind of updation message is expected.

If removing occurs MUST send Updation message:
Type: UpdationType.DELETE
DataType: UpdationDataType.ENTITY_PARENT
Parameters: name of the entity, the name of the parent

Specified by:
removeChild in interface ModelEditor
Parameters:
entityName - The entity.
childEntity - The child to be removed.
Throws:
NoSuchEntityException - If given entity is not found.
AnalyzeModelException
See Also:
Updation.UpdationDataType.ENTITY_PARENT

removeAllChildren

public void removeAllChildren(java.lang.String entityName)
                       throws AnalyzeModelException
Description copied from interface: ModelEditor

Removes all the children from the entity. This is same than calling removeChild(String, String) for all the childs.

Specified by:
removeAllChildren in interface ModelEditor
Parameters:
entityName - The name of the entity which childs are cleared.
Throws:
NoSuchEntityException - If given entity is not found.
AnalyzeModelException

getChildren

public java.util.Set<java.lang.String> getChildren(java.lang.String entityName)
Description copied from interface: ModelEditor

Returns the names of the entity's children.

Specified by:
getChildren in interface ModelEditor
Parameters:
entityName - The name of the entity.
Returns:
The child of the given entity.

addMethod

public void addMethod(java.lang.String entityName,
                      java.lang.String methodName)
               throws NoSuchEntityException
Description copied from interface: ModelEditor

Add method to the entity.

If adding occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.METHOD
Parameters: name of the entity, the name of the method

Specified by:
addMethod in interface ModelEditor
Parameters:
entityName - The name of the entity.
methodName - The name of the method.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationDataType.METHOD

removeMethod

public void removeMethod(java.lang.String entityName,
                         java.lang.String methodName)
                  throws NoSuchEntityException
Description copied from interface: ModelEditor

Removes method from the entity.

If remove occurs MUST send Updation message:
Type: UpdationType.REMOVE
DataType: UpdationDataType.METHOD
Parameters: name of the entity, the name of the method

Specified by:
removeMethod in interface ModelEditor
Parameters:
entityName - The entity which owns the method.
methodName - The name of the method.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationDataType.METHOD

changeMethodName

public void changeMethodName(java.lang.String entityName,
                             java.lang.String methodOldName,
                             java.lang.String methodNewName)
                      throws AnalyzeModelException
Description copied from interface: ModelEditor

Changes method name.

If change occurs MUST send Updation message:
Type: UpdationType.MODIFY
DataType: UpdationDataType.METHOD
Parameters: name of the entity, the old name of the method, the new name of the method.

Specified by:
changeMethodName in interface ModelEditor
Parameters:
entityName - The name of the entity.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchMethodException - If given method is not found.
AnalyzeModelException
See Also:
Updation.UpdationType.MODIFY, Updation.UpdationDataType.METHOD

containsMethod

public boolean containsMethod(java.lang.String entityName,
                              java.lang.String methodName)
Description copied from interface: ModelEditor

Checks if the given method exists in the entity.

Specified by:
containsMethod in interface ModelEditor
Parameters:
entityName - The name of the entity
methodName - The name of the method.
Returns:
True if the entity has given method.

getMethodNames

public java.util.Set<java.lang.String> getMethodNames(java.lang.String entityName)
Description copied from interface: ModelEditor

Returns the names of the entity's methods.

Specified by:
getMethodNames in interface ModelEditor
Parameters:
entityName - The name of the entity
Returns:
The entity's methods' names.

getEntitiesInfluencedByMethod

public java.util.Set<java.lang.String> getEntitiesInfluencedByMethod(java.lang.String entityName,
                                                                     java.lang.String methodName)
Description copied from interface: ModelEditor

Returns set of entities that are refered by methods in the model.

Specified by:
getEntitiesInfluencedByMethod in interface ModelEditor
Parameters:
entityName - The name of the entity that owns the method.
methodName - The methods name.
Returns:
Set of entity names that are refered by the method in some way.

addEntityInfluenceByMethod

public void addEntityInfluenceByMethod(java.lang.String entityName,
                                       java.lang.String methodName,
                                       java.lang.String influencedEntity)
                                throws AnalyzeModelException
Description copied from interface: ModelEditor

Adds an influence between entity's method and the given entity.

If addition occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.METHOD_INFLUENCE
Parameters: name of the entity, the name of the method, the name of entity influenced.

Specified by:
addEntityInfluenceByMethod in interface ModelEditor
Parameters:
entityName - The name of the entity that owns the method.
methodName - The methods name.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchMethodException - If given method is not found.
AnalyzeModelException
See Also:
Updation.UpdationDataType.METHOD_INFLUENCE

removeEntityInfluenceByMethod

public void removeEntityInfluenceByMethod(java.lang.String entityName,
                                          java.lang.String methodName,
                                          java.lang.String influencedEntity)
                                   throws AnalyzeModelException
Description copied from interface: ModelEditor

Removes influnce between entity's method and the given entity.

If deletion occurs MUST send Updation message:
Type: UpdationType.DELETE
DataType: UpdationDataType.METHOD_INFLUENCE
Parameters: name of the entity, the name of the method, the name of entity influenced.

Specified by:
removeEntityInfluenceByMethod in interface ModelEditor
Parameters:
entityName - The name of the entity that owns the method.
methodName - The methods name.
influencedEntity - The name of the method that is influenced by the given method.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchMethodException - If given method is not found.
AnalyzeModelException
See Also:
Updation.UpdationDataType.METHOD_INFLUENCE

addAttribute

public void addAttribute(java.lang.String entityName,
                         java.lang.String attributeName)
                  throws NoSuchEntityException
Description copied from interface: ModelEditor

Adds attribute to the entity.

If addition occurs MUST send Updation message:
Type: UpdationType.ADD
DataType: UpdationDataType.ATTRIBUTE
Parameters: name of the entity, the name of the attribute

Specified by:
addAttribute in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attribute.
Throws:
NoSuchEntityException - If given entity is not found.
See Also:
Updation.UpdationDataType.ATTRIBUTE

removeAttribute

public void removeAttribute(java.lang.String entityName,
                            java.lang.String attributeName)
                     throws AnalyzeModelException
Description copied from interface: ModelEditor

Removes attribute from the entity.

If deletion occurs MUST send Updation message:
Type: UpdationType.DELETE
DataType: UpdationDataType.ATTRIBUTE
Parameters: name of the entity, the name of the attribute

Specified by:
removeAttribute in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attribute.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchAttributeException - If given attribute is not found.
AnalyzeModelException
See Also:
Updation.UpdationDataType.ATTRIBUTE

containsAttribute

public boolean containsAttribute(java.lang.String entityName,
                                 java.lang.String attributeName)
                          throws NoSuchEntityException
Description copied from interface: ModelEditor

Checks wheter the entity contains the attribute or not.

Specified by:
containsAttribute in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attribute.
Returns:
True if contains.
Throws:
NoSuchEntityException - If given entity is not found.

getAttributeFromCardinal

public java.lang.String getAttributeFromCardinal(java.lang.String entityName,
                                                 java.lang.String attributeName)
                                          throws AnalyzeModelException
Description copied from interface: ModelEditor

Gets from part of the cardinality of the attribute relation. From part means the cardinality on the entity's side that owns the attribute. For example in one-to-many relation the 'one' is from cardinality.

Specified by:
getAttributeFromCardinal in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attibute.
Returns:
The cardinality value of the from part of the cardinal relation.
Throws:
AnalyzeModelException

getAttributeToCardinal

public java.lang.String getAttributeToCardinal(java.lang.String entityName,
                                               java.lang.String attributeName)
                                        throws AnalyzeModelException
Description copied from interface: ModelEditor

Gets to part of the cardinality of the attribute relation. To part means the cardinality on the attributes side. For example in one-to-many relation the 'many' is to cardinality.

Specified by:
getAttributeToCardinal in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attibute.
Returns:
The cardinality value of the to part of the cardinal relation.
Throws:
AnalyzeModelException

setAttributeFromCardinal

public void setAttributeFromCardinal(java.lang.String entityName,
                                     java.lang.String attributeName,
                                     java.lang.String cardinal)
                              throws AnalyzeModelException
Description copied from interface: ModelEditor

Sets the cardinality on the entitys side.

If change occurs MUST send Updation message:
Type: UpdationType.MODIFY
DataType: UpdationDataType.ATTRIBUTE_FROM_CARDINALITY
Parameters: name of the entity, the name of the attribute, the from cardinality

Specified by:
setAttributeFromCardinal in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attibute.
cardinal - The cardinality value.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchAttributeException - If given attribute is not found.
AnalyzeModelException
See Also:
Updation.UpdationType.MODIFY, Updation.UpdationDataType.ATTRIBUTE_FROM_CARDINALITY

setAttributeToCardinal

public void setAttributeToCardinal(java.lang.String entityName,
                                   java.lang.String attributeName,
                                   java.lang.String cardinal)
                            throws AnalyzeModelException
Description copied from interface: ModelEditor

Sets the cardinality on attributes side.

If change occurs MUST send Updation message:
Type: UpdationType.MODIFY
DataType: UpdationDataType.ATTRIBUTE_TO_CARDINALITY
Parameters: name of the entity, the name of the attribute, the to cardinality

Specified by:
setAttributeToCardinal in interface ModelEditor
Parameters:
entityName - The name of the entity.
attributeName - The name of the attibute.
cardinal - The cardinality value.
Throws:
NoSuchEntityException - If given entity is not found.
NoSuchAttributeException - If given attribute is not found.
AnalyzeModelException
See Also:
Updation.UpdationType.MODIFY, Updation.UpdationDataType.ATTRIBUTE_TO_CARDINALITY

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames(java.lang.String entityName)
Description copied from interface: ModelEditor

Returns the attributes of the entity.

Specified by:
getAttributeNames in interface ModelEditor
Parameters:
entityName - The name of the entity.
Returns:
The attributes.

merge

public void merge(AnalyzeModel fromModel)
           throws AnalyzeModelException
Description copied from interface: ModelEditor

Merges given AnalyzeModel to the editors model. Merge only adds things that do not yet exist in the current model. Nothing is delted or modified. For example attribute's cardinalities are not modified even if there is same attribute with different cardinalities.

All proper updation messages should be sended for every action made. It might be good idea to send AnalydeModel.signalModificationStarted() when starting modifications and AnalzydeMode.signalReady() when done.

Specified by:
merge in interface ModelEditor
Parameters:
fromModel - The analyze model beign merged.
Throws:
AnalyzeModelException

getUpdations

public java.util.List<Updation> getUpdations()
Description copied from interface: ModelEditor

Get updations done to this analyzemodel.

Specified by:
getUpdations in interface ModelEditor
Returns:
List of Updations or null if this feature is not supported.

stepBack

public void stepBack(int steps)
Description copied from interface: ModelEditor

Undoes some edition steps.

Specified by:
stepBack in interface ModelEditor
Parameters:
steps - to undo

execute

public boolean execute(Updation updation)
                throws AnalyzeModelException
Description copied from interface: ModelEditor

Executes action defined by updaton object.

Specified by:
execute in interface ModelEditor
Returns:
true if success, false if did not.
Throws:
AnalyzeModelException

mergeEntity

public void mergeEntity(java.lang.String targetEntityName,
                        java.util.Set<java.lang.String> mergeSet)
Description copied from interface: ModelEditor

Merges entities to other entity. If given target entity (called targetEntityName) does not exists it is created.

All the methods, attributes, and parents are added to one entity and the sources are removed afterwards. If there are same attributes it depens on the underlaying implementation which one of them will remain in the final entity.

Specified by:
mergeEntity in interface ModelEditor
Parameters:
targetEntityName - The name of the entity after merge.
mergeSet - The set of entity names that are going to be merged.

readySignal

public void readySignal()
Description copied from interface: ModelEditor

Signals all observers that this model is ready.

Sends observers Updation-message which type is Updation.UpdationType.READY.

Specified by:
readySignal in interface ModelEditor
See Also:
ModelEditor.updationStartedSignal()

updationStartedSignal

public void updationStartedSignal()
Description copied from interface: ModelEditor

Signals all observers that this model is beign modified.

This method should be called before the model is going to trough lots of changes. All observers receive updation signal that is from this model and the argument is instance of Updation which type is Updation.UpdationType.MODIFICATION_STARTED.

Example of Observer listening the model:

 new Observable(){
                void update(Observable o, Object arg){
                        // Check that we know how to handle the parameters.
                        if (! (o instanceof AnalyzeModel)) return;
                        if (! (arg instanceof Updation)) return;
 
                        Updation updation = (Updation) arg;
 
                        // Check updation type
                        switch(updation.getType()){
                                case Update.MODIFICATION_STARTED:                                       
                                        drawUpdates = false;    // Dont draw updates.
                                break;
                                case Update.READY:
 
                                        drawUpdates = true;             // Start drawing updates.
                                break;
                        }
                        // Draw updates if we are not in midle of updation.       
                        if (drawUpdates){
                                doDrawUpdates();
                        }
                }
 }
 

Specified by:
updationStartedSignal in interface ModelEditor

saveUpdationsToFile

public void saveUpdationsToFile(java.io.File target)
                         throws java.io.IOException
Description copied from interface: ModelEditor

Saves the updations (modification log) to the given file.

Specified by:
saveUpdationsToFile in interface ModelEditor
Parameters:
target - Defines the target filename for the modification log file.
Throws:
java.io.IOException