Humboldt Alignment Editor 2.5.0

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

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.impl.AbstractTransformationNode
      extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.impl.CellNodeImpl
All Implemented Interfaces:
CellNode, TransformationNode

@Immutable
public class CellNodeImpl
extends AbstractTransformationNode
implements CellNode

Default CellNode implementation

Author:
Simon Templer

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.common.align.model.transformation.tree.CellNode
ANNOTATION_VALID
 
Constructor Summary
CellNodeImpl(Cell cell)
          Create a cell node w/o associated sources.
CellNodeImpl(Cell cell, SourceNodeFactory sourceNodes)
          Creates a cell node where the sources are populated from the given cell.
 
Method Summary
 void accept(TransformationNodeVisitor visitor)
          Accept a transformation node visitor.
 void addSource(Set<String> names, SourceNode source)
          Add a source to the cell node.
 void addTarget(TargetNode target)
          Add an associated target node to the cell.
 boolean equals(Object obj)
           
 Cell getCell()
          Get the associated cell.
 Set<String> getSourceNames(SourceNode source)
          Get the entity names for the given source node.
 List<SourceNode> getSources()
          Get the source entities associated to the cell.
 List<TargetNode> getTargets()
          Get the associated target nodes.
 int hashCode()
           
 boolean isValid()
          Get the value of the valid annotation.
 void setValid(boolean valid)
          Set the value of the valid annotation.
 
Methods inherited from class eu.esdihumboldt.hale.common.align.model.transformation.tree.impl.AbstractTransformationNode
getAnnotation, hasAnnotations, reset, setAnnotation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.common.align.model.transformation.tree.TransformationNode
getAnnotation, hasAnnotations, reset, setAnnotation
 

Constructor Detail

CellNodeImpl

public CellNodeImpl(Cell cell,
                    SourceNodeFactory sourceNodes)
Creates a cell node where the sources are populated from the given cell.

Parameters:
cell - the cell
sourceNodes - the factory for creating source nodes

CellNodeImpl

public CellNodeImpl(Cell cell)
Create a cell node w/o associated sources. Sources can be added later on through addSource(Set, SourceNode)

Parameters:
cell - the associated cell
Method Detail

addSource

public void addSource(Set<String> names,
                      SourceNode source)
Add a source to the cell node. May only be called if the cell node was created using the CellNodeImpl(Cell) constructor.

Parameters:
names - the entity names associated to the source
source - the source node

accept

public void accept(TransformationNodeVisitor visitor)
Description copied from interface: TransformationNode
Accept a transformation node visitor.

Specified by:
accept in interface TransformationNode
Parameters:
visitor - the visitor
See Also:
TransformationNode.accept(TransformationNodeVisitor)

getCell

public Cell getCell()
Description copied from interface: CellNode
Get the associated cell.

Specified by:
getCell in interface CellNode
Returns:
the cell
See Also:
CellNode.getCell()

getSources

public List<SourceNode> getSources()
Description copied from interface: CellNode
Get the source entities associated to the cell.

Specified by:
getSources in interface CellNode
Returns:
the source entities represented by source nodes
See Also:
CellNode.getSources()

getSourceNames

public Set<String> getSourceNames(SourceNode source)
Description copied from interface: CellNode
Get the entity names for the given source node. These are the names of the cell entities the node is associated to.

Specified by:
getSourceNames in interface CellNode
Parameters:
source - the source node
Returns:
the source names
See Also:
CellNode.getSourceNames(SourceNode)

addTarget

public void addTarget(TargetNode target)
Description copied from interface: CellNode
Add an associated target node to the cell.

Specified by:
addTarget in interface CellNode
Parameters:
target - the target node
See Also:
CellNode.addTarget(TargetNode)

getTargets

public List<TargetNode> getTargets()
Description copied from interface: CellNode
Get the associated target nodes.

Specified by:
getTargets in interface CellNode
Returns:
the list of target nodes
See Also:
CellNode.getTargets()

setValid

public void setValid(boolean valid)
Description copied from interface: CellNode
Set the value of the valid annotation.

Specified by:
setValid in interface CellNode
Parameters:
valid - if the cell node is valid in its configuration for transformation execution
See Also:
CellNode.setValid(boolean)

isValid

public boolean isValid()
Description copied from interface: CellNode
Get the value of the valid annotation. Returns false in any case if no validation has been performed yet.

Specified by:
isValid in interface CellNode
Returns:
if the cell node is valid in its configuration for transformation execution
See Also:
CellNode.isValid()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

Humboldt Alignment Editor 2.5.0

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