com.sri.emo.dbobj.model_tree
Class DefaultModelNode

java.lang.Object
  extended by com.sri.emo.dbobj.model_tree.AbstractModelNode
      extended by com.sri.emo.dbobj.model_tree.DefaultModelNode
All Implemented Interfaces:
ModelNode, MutableModelNode

public class DefaultModelNode
extends AbstractModelNode

Default Model node used for nesting ModelVisitable data.

Author:
Michael Rimov

Field Summary
 
Fields inherited from interface com.sri.emo.dbobj.model_tree.ModelNode
NO_CHILDREN, NO_LINK, NO_PARENT
 
Constructor Summary
DefaultModelNode(ModelVisitable data)
          Constructor used for a root node.
DefaultModelNode(ModelVisitable data, MutableModelNode nodeParent)
          Constructor to indicate a nested node.
 
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.
 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
 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.
 void setModelFilledStatus(ModelFillStatus newStatus)
          Set the model status in terms of 'filled parts'.
 void setNodeCompletionStatus(NodeCompletionStatus newStatus)
          Sets the node completion status.
 
Methods inherited from class com.sri.emo.dbobj.model_tree.AbstractModelNode
addChild, getChildren, getLabel, getLink, getParent, iterator, setLabel, setLink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModelNode

public DefaultModelNode(ModelVisitable data)
Constructor used for a root node.

Parameters:
data - The data to be attached.

DefaultModelNode

public DefaultModelNode(ModelVisitable data,
                        MutableModelNode nodeParent)
Constructor to indicate a nested node.

Parameters:
nodeParent - ModelCompositeNode nodeParent.addChild() is automatically called by the base class implementation.
data - the data to be attached to the node.
Method Detail

getVisitable

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

Returns:
IViewable

getModelFillStatus

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

Returns:
ModelFillStatus

setModelFilledStatus

public void setModelFilledStatus(ModelFillStatus newStatus)
Set the model status in terms of 'filled parts'. A set on a particular node propagates calls up the tree.

Parameters:
newStatus - ModelStatus

getAdditionalInfo

public 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

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

Parameters:
newInfo - the new application-specific information.

getNodeCompletionStatus

public 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

setNodeCompletionStatus

public void setNodeCompletionStatus(NodeCompletionStatus newStatus)
Sets the node completion status. They can either be Undefined, Complete, or Recursive -- pointing to another model node in the tree.

Parameters:
newStatus - NodeCompletionStatus
See Also:
NodeCompletionStatus


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