harmonic.mz.data
Class MetaFields

java.lang.Object
  |
  +--harmonic.mz.data.MetaFields

public class MetaFields
extends java.lang.Object

MetaFields alow a node to have formal database fields without associated memory cost. There should be one meta fields object for all nodes of a given type. All JVTreeNodes of this type should use setMetaFields() in their contructor. Field "children" are added the single MetaFields object instead of every node that needs the fields. ModelNode.assignFromMetaFields() and ModelNode.assignToMetaFields() is used to transfer the information. The node should have is own specialized way of keeping the information.

This is usefull for example when there are 10,000 atom nodes, each having 10 attributes as fields, resulting in 100,000 tree nodes.


Constructor Summary
MetaFields()
          Constructs a MetaFields object
 
Method Summary
 void addField(java.lang.String name, java.lang.String cat, ModelNode f)
          Add node to meta fields list
 ModelNode findNode(java.lang.String name)
          Return node of given name
 ModelNode[] getNodes()
          Return all nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaFields

public MetaFields()
Constructs a MetaFields object

Method Detail

addField

public void addField(java.lang.String name,
                     java.lang.String cat,
                     ModelNode f)
Add node to meta fields list


findNode

public ModelNode findNode(java.lang.String name)
Return node of given name


getNodes

public ModelNode[] getNodes()
Return all nodes