Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor
Class CellNodeValidator

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor.AbstractTransformationNodeVisitor
      extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor.AbstractTargetToSourceVisitor
          extended by eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor.CellNodeValidator
All Implemented Interfaces:
TransformationNodeVisitor
Direct Known Subclasses:
FunctionExecutor

public class CellNodeValidator
extends AbstractTargetToSourceVisitor

Visitor that validates cell nodes. The tree should have already been annotated with the source instance values when applying this visitor.

Author:
Simon Templer

Field Summary
protected  TransformationReporter reporter
          the transformation reporter
 
Constructor Summary
CellNodeValidator(TransformationReporter reporter)
          Constructor
 
Method Summary
 boolean includeAnnotatedNodes()
          Specifies if annotated nodes should be included in the traversal.
protected  void processValid(Cell cell, com.google.common.collect.ListMultimap<String,Pair<SourceNode,Entity>> sources, com.google.common.collect.ListMultimap<String,Pair<TargetNode,Entity>> targets)
          Process a valid cell node.
protected  boolean validate(CellNode node, com.google.common.collect.ListMultimap<String,Pair<SourceNode,Entity>> sources, com.google.common.collect.ListMultimap<String,Pair<TargetNode,Entity>> targets)
          Validate a cell node.
 boolean visit(CellNode node)
          Visit a cell node.
 
Methods inherited from class eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor.AbstractTargetToSourceVisitor
isFromTargetToSource
 
Methods inherited from class eu.esdihumboldt.hale.common.align.model.transformation.tree.visitor.AbstractTransformationNodeVisitor
leave, leave, leave, leave, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reporter

protected final TransformationReporter reporter
the transformation reporter

Constructor Detail

CellNodeValidator

public CellNodeValidator(TransformationReporter reporter)
Constructor

Parameters:
reporter - the transformation reporter
Method Detail

visit

public boolean visit(CellNode node)
Description copied from interface: TransformationNodeVisitor
Visit a cell node.

Specified by:
visit in interface TransformationNodeVisitor
Overrides:
visit in class AbstractTransformationNodeVisitor
Parameters:
node - the cell node
Returns:
if the visitor is to be applied to any further nodes down the path
See Also:
AbstractTransformationNodeVisitor.visit(CellNode)

validate

protected boolean validate(CellNode node,
                           com.google.common.collect.ListMultimap<String,Pair<SourceNode,Entity>> sources,
                           com.google.common.collect.ListMultimap<String,Pair<TargetNode,Entity>> targets)
Validate a cell node.

Parameters:
node - the cell node
sources - the named source entities and nodes
targets - the named target entities and nodes
Returns:
if the cell node is valid for execution

processValid

protected void processValid(Cell cell,
                            com.google.common.collect.ListMultimap<String,Pair<SourceNode,Entity>> sources,
                            com.google.common.collect.ListMultimap<String,Pair<TargetNode,Entity>> targets)
Process a valid cell node.

Parameters:
cell - the associated cell
sources - the named source entities and nodes
targets - the named target entities and nodes

includeAnnotatedNodes

public boolean includeAnnotatedNodes()
Description copied from interface: TransformationNodeVisitor
Specifies if annotated nodes should be included in the traversal.

Returns:
if nodes that are only present as annotations should be visited
See Also:
TransformationNodeVisitor.includeAnnotatedNodes()

Humboldt Alignment Editor 2.5.0

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