Public Member Functions | Private Attributes

de.fraunhofer.isst.axbench.utilities.StructureNode Class Reference

Structure node that is inserted into the outline or another view in order to structure its contents The AXLOutline contains both IAXLangElements and StructureNodes. Therefore the parent-children relation is heterogeneous since on either side there may always be an IAXLangElementNode or a StructureNode. More...

List of all members.

Public Member Functions

void addChild (IAXLangElementNode newChild)
 adds an aXLang element as new child to the calling structure node
void addChild (Object newChild)
 adds an object as child to the calling structure node
void addChild (StructureNode newChild)
 adds a structure node as child to the calling structure node
void addChild (FeatureInSelection newChild)
 adds a structure node as child to the calling structure node
void addChildren (Collection<?extends Object > newChildren)
boolean equals (Object obj)
IAXLangElement getAXLElementParent ()
List< Object > getChildren ()
 getter method for children
NodeKind getKind ()
 getter method for the kind
String getUID ()
boolean hasError ()
int hashCode ()
void setKind (NodeKind newKind)
 setter method for the kind
 StructureNode (NodeKind theKind, IAXLangElement parent, Object data)
 Constructor.
 StructureNode (NodeKind theKind, IAXLangElement parent)
 Constructor.

Private Attributes

List< Object > children
boolean error = false
 needed to mark an error (at this version only reference errors inside the editor)
NodeKind kind
 seems to be the attached data, inherited from tree node
IAXLangElement parent = null
 needed to analyze the valid elements inside the editable view, to get the entry point
String uid = null

Detailed Description

Structure node that is inserted into the outline or another view in order to structure its contents The AXLOutline contains both IAXLangElements and StructureNodes. Therefore the parent-children relation is heterogeneous since on either side there may always be an IAXLangElementNode or a StructureNode.

Author:
mgrosse
skaegebein
Version:
0.8.0
Since:
0.7.2

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.utilities.StructureNode.StructureNode ( NodeKind  theKind,
IAXLangElement  parent 
)

Constructor.

Parameters:
theKind kind of the node
de.fraunhofer.isst.axbench.utilities.StructureNode.StructureNode ( NodeKind  theKind,
IAXLangElement  parent,
Object  data 
)

Constructor.

Parameters:
theKind kind of the node
parent parent of the node
data data element for the node

Member Function Documentation

void de.fraunhofer.isst.axbench.utilities.StructureNode.addChild ( IAXLangElementNode  newChild  ) 

adds an aXLang element as new child to the calling structure node

Parameters:
newChild new aXLang element
void de.fraunhofer.isst.axbench.utilities.StructureNode.addChild ( StructureNode  newChild  ) 

adds a structure node as child to the calling structure node

Parameters:
newChild new StructureNode
void de.fraunhofer.isst.axbench.utilities.StructureNode.addChild ( FeatureInSelection  newChild  ) 

adds a structure node as child to the calling structure node

Parameters:
newChild new StructureNode
void de.fraunhofer.isst.axbench.utilities.StructureNode.addChild ( Object  newChild  ) 

adds an object as child to the calling structure node

Parameters:
newChild new Object
void de.fraunhofer.isst.axbench.utilities.StructureNode.addChildren ( Collection<?extends Object >  newChildren  ) 

@ brief adds a collection of aXLang elements as children to the calling structure node This method is only provided for IAXLangElements due to problems with the overloading: Collection<IAXLangElement> and Collection<StructureNode> are not sufficiently distinct.

Todo:
smann: Was spricht gegen "Collection<? extends Object> newChildren" als Argumenttyp?
Parameters:
newChildren collection of aXLang elements
boolean de.fraunhofer.isst.axbench.utilities.StructureNode.equals ( Object  obj  ) 
IAXLangElement de.fraunhofer.isst.axbench.utilities.StructureNode.getAXLElementParent (  ) 
Parameters:
error the error to set
Returns:
the myelement
Return values:
the parent element
null if the structure node has a structure node as parent
List<Object> de.fraunhofer.isst.axbench.utilities.StructureNode.getChildren (  )  [virtual]

getter method for children

Returns:
the collection of children

Implements de.fraunhofer.isst.axbench.utilities.TreeNode.

NodeKind de.fraunhofer.isst.axbench.utilities.StructureNode.getKind (  ) 

getter method for the kind

Returns:
String de.fraunhofer.isst.axbench.utilities.StructureNode.getUID (  ) 
Returns:
the uid based on the childrens uids
boolean de.fraunhofer.isst.axbench.utilities.StructureNode.hasError (  ) 
Returns:
the error
int de.fraunhofer.isst.axbench.utilities.StructureNode.hashCode (  ) 
void de.fraunhofer.isst.axbench.utilities.StructureNode.setKind ( NodeKind  newKind  ) 

setter method for the kind

Parameters:
newKind 

Member Data Documentation

needed to mark an error (at this version only reference errors inside the editor)

seems to be the attached data, inherited from tree node

needed to analyze the valid elements inside the editable view, to get the entry point

Reimplemented from de.fraunhofer.isst.axbench.utilities.TreeNode.