Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.model.transformation.tree
Interface SourceNode

All Superinterfaces:
TransformationNode
All Known Implementing Classes:
SourceNodeImpl

public interface SourceNode
extends TransformationNode

Represents a source type, group or property

Author:
Simon Templer

Field Summary
static String ANNOTATION_CHILDREN
          Name of the children annotation.
static String ANNOTATION_LEFTOVERS
          Name of the leftovers annotation.
static String ANNOTATION_PARENT
          Name of the parent annotation.
static String ANNOTATION_RELATIONS
          Name of the relations annotation.
static String ANNOTATION_VALUE
          Name of the value annotation.
static String ANNOTATION_VALUE_DEFINED
          Name of the value defined annotation.
 
Method Summary
 void addAnnotatedChild(SourceNode child)
          Add a child node as annotation.
 void addAnnotatedRelation(CellNode relation)
          Add a cell node as annotated relation.
 void addChild(SourceNode child)
          Add a child node.
 void addRelation(CellNode cellNode)
          Add a relation.
 SourceNode getAnnotatedParent()
          Get the annotated parent.
 Collection<SourceNode> getChildren(boolean includeAnnotated)
          Get the node's children.
 TransformationContext getContext()
          Get the associated transformation context.
 Definition<?> getDefinition()
          Get the associated definition
 EntityDefinition getEntityDefinition()
          Get the full entity definition associated with the node.
 Leftovers getLeftovers()
          Get the left over values associated to the node's entity, but not represented by the node.
 SourceNode getParent()
          Get the group or property's parent
 Collection<CellNode> getRelations(boolean includeAnnotated)
          Get the relations associated to the source node.
 Object getValue()
          Get the value of the node in the context of a specific source instance.
 boolean isDefined()
          Get if the source node value is defined.
 void setAnnotatedParent(SourceNode parent)
          Sets an annotated parent.
 void setContext(TransformationContext context)
          Set the transformation context.
 void setDefined(boolean defined)
          Set the value of the defined annotation.
 void setLeftovers(Leftovers leftovers)
          Set the left over values associated to the node's entity, but not represented by the node.
 void setValue(Object value)
          Set the value of the value annotation.
 
Methods inherited from interface eu.esdihumboldt.hale.common.align.model.transformation.tree.TransformationNode
accept, getAnnotation, hasAnnotations, reset, setAnnotation
 

Field Detail

ANNOTATION_VALUE_DEFINED

static final String ANNOTATION_VALUE_DEFINED
Name of the value defined annotation. It specifies if a value is defined for the source node.

See Also:
Constant Field Values

ANNOTATION_VALUE

static final String ANNOTATION_VALUE
Name of the value annotation. It specifies a concrete value for the node from an instance.

See Also:
Constant Field Values

ANNOTATION_CHILDREN

static final String ANNOTATION_CHILDREN
Name of the children annotation. It represents a list of additional children.

See Also:
Constant Field Values

ANNOTATION_LEFTOVERS

static final String ANNOTATION_LEFTOVERS
Name of the leftovers annotation. It represents values that are not (yet) represented in their own source node.

See Also:
Constant Field Values

ANNOTATION_RELATIONS

static final String ANNOTATION_RELATIONS
Name of the relations annotation. It represents a list of additional relations.

See Also:
Constant Field Values

ANNOTATION_PARENT

static final String ANNOTATION_PARENT
Name of the parent annotation. It represents a parent of a type source node.

See Also:
Constant Field Values
Method Detail

getDefinition

Definition<?> getDefinition()
Get the associated definition

Returns:
the type, group or property definition

getParent

SourceNode getParent()
Get the group or property's parent

Returns:
the parent node or null

getEntityDefinition

EntityDefinition getEntityDefinition()
Get the full entity definition associated with the node.

Returns:
the entity definition

addChild

void addChild(SourceNode child)
Add a child node.

Parameters:
child - the child source node

addAnnotatedChild

void addAnnotatedChild(SourceNode child)
Add a child node as annotation. This means resetting the node will remove the child.

Parameters:
child - the child node to add

getChildren

Collection<SourceNode> getChildren(boolean includeAnnotated)
Get the node's children.

Parameters:
includeAnnotated - if annotated children should be included
Returns:
the collection of child nodes

setContext

void setContext(TransformationContext context)
Set the transformation context.

Parameters:
context - the transformation context

getContext

TransformationContext getContext()
Get the associated transformation context.

Returns:
the transformation context, may be null

setLeftovers

void setLeftovers(Leftovers leftovers)
Set the left over values associated to the node's entity, but not represented by the node.

Parameters:
leftovers - the leftovers

getLeftovers

Leftovers getLeftovers()
Get the left over values associated to the node's entity, but not represented by the node.

Returns:
the leftovers, may be null

isDefined

boolean isDefined()
Get if the source node value is defined.

Returns:
the value of the defined annotation, or false if it is not set
See Also:
ANNOTATION_VALUE_DEFINED

setDefined

void setDefined(boolean defined)
Set the value of the defined annotation.

Parameters:
defined - if the node value is defined
See Also:
ANNOTATION_VALUE_DEFINED

getValue

Object getValue()
Get the value of the node in the context of a specific source instance.

Returns:
the property value associated to the node, may be null
See Also:
ANNOTATION_VALUE

setValue

void setValue(Object value)
Set the value of the value annotation. When setting a value the value of the defined annotation is set to true.

Parameters:
value - the value of the node in the context of a specific source instance
See Also:
ANNOTATION_VALUE, ANNOTATION_VALUE_DEFINED

addRelation

void addRelation(CellNode cellNode)
Add a relation.

Parameters:
cellNode - the cell node representing the relation

addAnnotatedRelation

void addAnnotatedRelation(CellNode relation)
Add a cell node as annotated relation. This means resetting the node will remove the relation.

Parameters:
relation - the cell node representing the relation

getRelations

Collection<CellNode> getRelations(boolean includeAnnotated)
Get the relations associated to the source node.

Parameters:
includeAnnotated - if annotated relations should be included
Returns:
the associated relations

setAnnotatedParent

void setAnnotatedParent(SourceNode parent)
Sets an annotated parent.

Parameters:
parent - the annotated parent

getAnnotatedParent

SourceNode getAnnotatedParent()
Get the annotated parent.

Returns:
the annotated parent or null if none is set

Humboldt Alignment Editor 2.5.0

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