be.ac.vub.cocompose.operations
Class UndeleteElement

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.DefaultModelVisitor
      extended bybe.ac.vub.cocompose.lang.DefaultSuperModelVisitor
          extended bybe.ac.vub.cocompose.operations.UndeleteElement
All Implemented Interfaces:
ModelVisitor

public class UndeleteElement
extends DefaultSuperModelVisitor

Undo for a DeleteElement operation.

Since:
0.2.0
Version:
0.2.9, 26/04/2004
Author:
Dennis Wagelaar
See Also:
DeleteElement

Field Summary
 
Fields inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
current
 
Constructor Summary
UndeleteElement()
           
 
Method Summary
 ModelElement getDeletedElement()
          Gets the deleted element to undelete.
 int getElementIndex()
          Gets the element participant index at which a relationship was deleted.
 int getSourceIndex()
          Gets the source participant index at which a relationship was deleted.
 int getTargetIndex()
          Gets the target participant index at which a relationship was deleted.
 void setDeletedElement(ModelElement deletedElement)
          Sets the deleted element to undelete.
 void setElementIndex(int elementIndex)
          Sets the element participant index at which a relationship was deleted.
 void setSourceIndex(int sourceIndex)
          Sets the source participant index at which a relationship was deleted.
 void setTargetIndex(int targetIndex)
          Sets the target participant index at which a relationship was deleted.
 void visitModelElement(ModelElement modelElement)
          Visits a ModelElement.
 void visitRefinedElement(RefinedElement refinedElement)
          Visits a RefinedElement.
 void visitRelationship(Relationship relationship)
          Visits a Relationship.
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultSuperModelVisitor
visitAndConstraint, visitCompositeConstraint, visitConcept, visitConstraint, visitElementConstraint, visitImplementationGenerator, visitImplementationPattern, visitImplementationRolePart, visitModel, visitModelProperty, visitModelTransformation, visitMultiplicity, visitNamespace, visitOrConstraint, visitProperty, visitRefinement, visitRelationElement, visitRole, visitSimpleProperty, visitSolutionPattern
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
getStacked, setStacked, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndeleteElement

public UndeleteElement()
Method Detail

getDeletedElement

public ModelElement getDeletedElement()
Gets the deleted element to undelete.

Returns:
the deleted element.

setDeletedElement

public void setDeletedElement(ModelElement deletedElement)
Sets the deleted element to undelete.

Parameters:
deletedElement - - the deleted element.

visitModelElement

public void visitModelElement(ModelElement modelElement)
                       throws ModelElementException
Visits a ModelElement.

Specified by:
visitModelElement in interface ModelVisitor
Overrides:
visitModelElement in class DefaultModelVisitor
Parameters:
modelElement - - the element to visit.
Throws:
<{be.ac.vub.cocompose.lang.ModelElementException}>
ModelElementException

visitRelationship

public void visitRelationship(Relationship relationship)
                       throws ModelElementException
Visits a Relationship.

Specified by:
visitRelationship in interface ModelVisitor
Overrides:
visitRelationship in class DefaultSuperModelVisitor
Parameters:
relationship - - the element to visit.
Throws:
<{ModelElementException}>
ModelElementException

visitRefinedElement

public void visitRefinedElement(RefinedElement refinedElement)
                         throws ModelElementException
Visits a RefinedElement.

Specified by:
visitRefinedElement in interface ModelVisitor
Overrides:
visitRefinedElement in class DefaultSuperModelVisitor
Parameters:
refinedElement - - the element to visit.
Throws:
ModelElementException

getElementIndex

public int getElementIndex()
Gets the element participant index at which a relationship was deleted.

Returns:
the index.

setElementIndex

public void setElementIndex(int elementIndex)
Sets the element participant index at which a relationship was deleted.

Parameters:
elementIndex - - the index.

getSourceIndex

public int getSourceIndex()
Gets the source participant index at which a relationship was deleted.

Returns:
the index.

setSourceIndex

public void setSourceIndex(int sourceIndex)
Sets the source participant index at which a relationship was deleted.

Parameters:
sourceIndex - - the index.

getTargetIndex

public int getTargetIndex()
Gets the target participant index at which a relationship was deleted.

Returns:
the index.

setTargetIndex

public void setTargetIndex(int targetIndex)
Sets the target participant index at which a relationship was deleted.

Parameters:
targetIndex - - the index.