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

java.lang.Object
  extended bycom.sdm.quasar.client.core.data.structure.Node
      extended bycom.sdm.quasar.client.core.data.structure.AspectNode
All Implemented Interfaces:
SystemInfoProvider

public class AspectNode
extends Node

Defines a node whose value is an aspect of a value. An aspect is usually the value of an attribute.

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

Constructor Summary
AspectNode(java.lang.String key, java.lang.String sourceKey, java.lang.Class sourceType, java.lang.String aspectName, java.lang.Class type)
          Constructor.
 
Method Summary
 boolean canModify()
           
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 java.lang.Class getSourceType()
           
 java.lang.Object getValue(java.lang.Object sourceValue)
          Reads the aspect using the getter method or a public member variable
 void setValue(java.lang.Object sourceValue, java.lang.Object aspectValue)
          Writes the aspect using the setter method
 
Methods inherited from class com.sdm.quasar.client.core.data.structure.Node
getKey, getSourceNodeKeys, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AspectNode

public AspectNode(java.lang.String key,
                  java.lang.String sourceKey,
                  java.lang.Class sourceType,
                  java.lang.String aspectName,
                  java.lang.Class type)
Constructor.

Parameters:
key - the key of the node
sourceKey - the key of the node that provides the source value for the aspect
sourceType - the type of object that this aspect node expects as source value
aspectName - the name of the aspect which is usually the name of the attribute
type - the type of the value that this node represents
Method Detail

getValue

public java.lang.Object getValue(java.lang.Object sourceValue)
Reads the aspect using the getter method or a public member variable

Parameters:
sourceValue - the source value
Returns:
the value of the aspect

canModify

public boolean canModify()
Returns:
true when the aspect of the node can be modified

setValue

public void setValue(java.lang.Object sourceValue,
                     java.lang.Object aspectValue)
Writes the aspect using the setter method

Parameters:
sourceValue - the source value
aspectValue - the attribute value to set

getSourceType

public java.lang.Class getSourceType()
Returns:
the type of object that this aspect node expects as source value

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
Overrides:
collectSystemInfo in class Node
See Also:
Node.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)