Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.service.align.internal
Class AlignmentServiceDecorator

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.service.align.internal.AlignmentServiceDecorator
All Implemented Interfaces:
AlignmentService
Direct Known Subclasses:
AlignmentServiceUndoSupport

public abstract class AlignmentServiceDecorator
extends Object
implements AlignmentService

Alignment service decorator

Author:
Simon Templer

Field Summary
protected  AlignmentService alignmentService
          The decorated alignment service
 
Constructor Summary
AlignmentServiceDecorator(AlignmentService alignmentService)
          Create a decorator for the given alignment service
 
Method Summary
 void addCell(MutableCell cell)
          Adds the given cell to the current alignment.
 void addListener(AlignmentServiceListener listener)
          Adds a listener to the service
 void addOrUpdateAlignment(MutableAlignment alignment)
          Adds the cells contained in the given alignment to the current alignment.
 void clean()
          Invoke this operation if you want to clear out all alignments stored.
 Alignment getAlignment()
          Get the current alignment
 void removeCells(Cell... cells)
          Removes the given cells
 void removeListener(AlignmentServiceListener listener)
          Removes a listener to the service
 void replaceCell(Cell oldCell, MutableCell newCell)
          Replace a cell with a new cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alignmentService

protected final AlignmentService alignmentService
The decorated alignment service

Constructor Detail

AlignmentServiceDecorator

public AlignmentServiceDecorator(AlignmentService alignmentService)
Create a decorator for the given alignment service

Parameters:
alignmentService - the alignment service
Method Detail

getAlignment

public Alignment getAlignment()
Description copied from interface: AlignmentService
Get the current alignment

Specified by:
getAlignment in interface AlignmentService
Returns:
the entire Alignment as currently represented in the Alignment Model.
See Also:
AlignmentService.getAlignment()

addOrUpdateAlignment

public void addOrUpdateAlignment(MutableAlignment alignment)
Description copied from interface: AlignmentService
Adds the cells contained in the given alignment to the current alignment. If cells with the same entities and transformations already exist they will be replaced.

Specified by:
addOrUpdateAlignment in interface AlignmentService
Parameters:
alignment - the alignment to add
See Also:
AlignmentService.addOrUpdateAlignment(MutableAlignment)

addCell

public void addCell(MutableCell cell)
Description copied from interface: AlignmentService
Adds the given cell to the current alignment.

Specified by:
addCell in interface AlignmentService
Parameters:
cell - the cell to add
See Also:
AlignmentService.addCell(MutableCell)

removeCells

public void removeCells(Cell... cells)
Description copied from interface: AlignmentService
Removes the given cells

Specified by:
removeCells in interface AlignmentService
Parameters:
cells - the cells to remove
See Also:
AlignmentService.removeCells(Cell[])

clean

public void clean()
Description copied from interface: AlignmentService
Invoke this operation if you want to clear out all alignments stored. This method is required when one wants to start working on a new alignment.

Specified by:
clean in interface AlignmentService
See Also:
AlignmentService.clean()

addListener

public void addListener(AlignmentServiceListener listener)
Description copied from interface: AlignmentService
Adds a listener to the service

Specified by:
addListener in interface AlignmentService
Parameters:
listener - the listener to add
See Also:
AlignmentService.addListener(AlignmentServiceListener)

removeListener

public void removeListener(AlignmentServiceListener listener)
Description copied from interface: AlignmentService
Removes a listener to the service

Specified by:
removeListener in interface AlignmentService
Parameters:
listener - the listener to remove
See Also:
AlignmentService.removeListener(AlignmentServiceListener)

replaceCell

public void replaceCell(Cell oldCell,
                        MutableCell newCell)
Description copied from interface: AlignmentService
Replace a cell with a new cell.

Specified by:
replaceCell in interface AlignmentService
Parameters:
oldCell - the old cell that should be removed from the alignment
newCell - the new cell that should be added to the alignment
See Also:
AlignmentService.replaceCell(Cell, MutableCell)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d