Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.model.transformation.tree.impl
Class LeftoversImpl

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.impl.LeftoversImpl
All Implemented Interfaces:
Leftovers

public class LeftoversImpl
extends Object
implements Leftovers

Default Leftovers implementation.

Author:
Simon Templer

Constructor Summary
LeftoversImpl(SourceNode originalSource, Object... leftovers)
          Constructor
 
Method Summary
 void addLeftover(Object value, SourceNode annotatedParent)
          Adds the given value to the leftovers.
 Pair<SourceNode,Set<Cell>> consumeValue()
          Consume a left over value completely (for all remaining cells).
 SourceNode consumeValue(Cell cell)
          Consume a left over value regarding the given cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeftoversImpl

public LeftoversImpl(SourceNode originalSource,
                     Object... leftovers)
Constructor

Parameters:
originalSource - the original source node to be duplicated
leftovers - the left over values
Method Detail

addLeftover

public void addLeftover(Object value,
                        SourceNode annotatedParent)
Adds the given value to the leftovers.

Parameters:
value - the leftover value
annotatedParent - the value for the annotated parent field of the duplicate nodes

consumeValue

public Pair<SourceNode,Set<Cell>> consumeValue()
Description copied from interface: Leftovers
Consume a left over value completely (for all remaining cells). The returned source node associated as annotated child to the parent of the original source node.

Specified by:
consumeValue in interface Leftovers
Returns:
the source node created for the value paired with the set of cells that have already been consumed for the value, or null if there is no value that hasn't been consumed completely
See Also:
Leftovers.consumeValue()

consumeValue

public SourceNode consumeValue(Cell cell)
Description copied from interface: Leftovers
Consume a left over value regarding the given cell. The returned source node associated as annotated child to the parent of the original source node.

Specified by:
consumeValue in interface Leftovers
Parameters:
cell - the cell
Returns:
the source node created for the value or null if there is no value that is not yet consumed completely or for the given cell
See Also:
Leftovers.consumeValue(Cell)

Humboldt Alignment Editor 2.5.0

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