com.sri.emo.dbobj.model_tree
Interface ModelNode

All Known Subinterfaces:
MutableModelNode
All Known Implementing Classes:
AbstractModelNode, DefaultModelNode, NoParentNode

public interface ModelNode

Represents a particular node on the model tree. Also implements the Composite Pattern since it contains multiple types all nested in a tree structure.

Author:
Michael Rimov

Field Summary
static List NO_CHILDREN
          Special Case for when there are no children for a particular node in the model.
static Transition NO_LINK
          Special Case for when there is no link to view or edit the node.
static ModelNode NO_PARENT
          Special Case for when there is no parent node for a particular model.
 
Method Summary
 Serializable getAdditionalInfo()
          This is a method to allow 'tagging' particular nodes with application specific information and processing the node differently based on that information.
 List getChildren()
          Retrieve the items in the composite model.
 String getLabel()
          Retrieve the label assigned to the node.
 Transition getLink()
          Retrieve the link to get to the node for editing.
 ModelFillStatus getModelFillStatus()
          Contains status about the node itself -- are all parts and subparts completely filled?
 NodeCompletionStatus getNodeCompletionStatus()
          Returns a node completion status which represents whether the factory was able to build a non-recursive complete model for the given node in question or
 ModelNode getParent()
          Retrieves the parent or returns NO_PARENT if we are already at the top of the node.
 ModelVisitable getVisitable()
          Retrieve the viewable interface of what we are dealing with.
 void setAdditionalInfo(Serializable newInfo)
          Sets the additional tag information to be associated with this node.
 

Field Detail

NO_CHILDREN

static final List NO_CHILDREN
Special Case for when there are no children for a particular node in the model.


NO_PARENT

static final ModelNode NO_PARENT
Special Case for when there is no parent node for a particular model. Since there is only one instance, the equality reference operator (==) can be used instead of equals() to check for parent.


NO_LINK

static final Transition NO_LINK
Special Case for when there is no link to view or edit the node.

Method Detail

getChildren

List getChildren()
Retrieve the items in the composite model.

Returns:
a list of ModelComposite objects or NO_CHILDREN if this is a leaf node.

getParent

ModelNode getParent()
Retrieves the parent or returns NO_PARENT if we are already at the top of the node.

Returns:
ModelCompositeNode or NO_PARENT.

getVisitable

ModelVisitable getVisitable()
Retrieve the viewable interface of what we are dealing with.

Returns:
ModelVisitable

getLabel

String getLabel()
Retrieve the label assigned to the node.

Returns:
String label.

getLink

Transition getLink()
Retrieve the link to get to the node for editing. (Similar to IViewable)

Returns:
Transition.

getModelFillStatus

ModelFillStatus getModelFillStatus()
Contains status about the node itself -- are all parts and subparts completely filled?

Returns:
ModelFillStatus -- enumeration type

getNodeCompletionStatus

NodeCompletionStatus getNodeCompletionStatus()
Returns a node completion status which represents whether the factory was able to build a non-recursive complete model for the given node in question or

Returns:
NodeCompletionStatus

getAdditionalInfo

Serializable getAdditionalInfo()
This is a method to allow 'tagging' particular nodes with application specific information and processing the node differently based on that information. The default hierarchy has no specifics of what kind of information may be stored there other than it be serializable for maximum flexibility in the future.

Returns:
Serializable

setAdditionalInfo

void setAdditionalInfo(Serializable newInfo)
Sets the additional tag information to be associated with this node.

Parameters:
newInfo - the new application-specific information.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.