com.sdm.quasar.client.core.data.structure
Class Node

java.lang.Object
  extended bycom.sdm.quasar.client.core.data.structure.Node
All Implemented Interfaces:
SystemInfoProvider
Direct Known Subclasses:
AspectNode, BaseNode, ComputedNode, IndexedNode

public abstract class Node
extends java.lang.Object
implements SystemInfoProvider

Defines a node of the data structure of the DataManager.

Version:
1.0
Author:
Thomas Wolf, sd&m AG, Bernd Olleck, sd&m AG

Constructor Summary
protected Node(java.lang.String key, java.lang.Class type)
          Creates a node without dependencies
protected Node(java.lang.String key, java.lang.String[] sourceNodesKeys, java.lang.Class type)
          Creates a node that depends on other nodes.
 
Method Summary
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 java.lang.String getKey()
           
 java.lang.String[] getSourceNodeKeys()
           
 java.lang.Class getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

protected Node(java.lang.String key,
               java.lang.Class type)
Creates a node without dependencies

Parameters:
key - the key of the node
type - the type of the value that this node represents

Node

protected Node(java.lang.String key,
               java.lang.String[] sourceNodesKeys,
               java.lang.Class type)
Creates a node that depends on other nodes. Note the source nodes will be stored as reference so the given array must not be modified.

Parameters:
key - the key of the node
sourceNodesKeys - the keys of the nodes that this node depends on
type - the type of the value that this node represents
Method Detail

getKey

public java.lang.String getKey()
Returns:
the key of this node

getSourceNodeKeys

public java.lang.String[] getSourceNodeKeys()
Returns:
the keys of the nodes that this node depends on

getType

public java.lang.Class getType()
Returns:
the type of the value that this node represents

toString

public java.lang.String toString()

collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from interface: SystemInfoProvider
Builds the system information tree upon local information of the implementor. The system information tree can be used within development by inspecting the system; so implementors should append their internal state (depending on the details settings within SystemInfoOptions). The information can be appended to the tree by adding new child SystemInformationNodes to the root node given using the SystemInfoNode.createChild(String) method and by setting information attributes the these nodes or the given root node.

Specified by:
collectSystemInfo in interface SystemInfoProvider
Parameters:
root - the SystemInfoNode to add information to (guaranteed to be not null)
options - contains additional options, that might influence the amount of information added to the tree (guaranteed to be not null)
See Also:
SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)