projectviewer.persist
Class PropertyNodeHandler

java.lang.Object
  extended byprojectviewer.persist.NodeHandler
      extended byprojectviewer.persist.PropertyNodeHandler

public class PropertyNodeHandler
extends NodeHandler

Handler for property nodes.

Version:
$Id: PropertyNodeHandler.java 7059 2006-09-17 20:58:10Z ezust $
Author:
Marcelo Vanzin

Constructor Summary
PropertyNodeHandler()
           
 
Method Summary
 VPTNode createNode(org.xml.sax.Attributes attrs, VPTProject project)
          Instantiates a VPTNode based on the information given in the attribute list.
 java.lang.Class getNodeClass()
          Returns the class of the nodes that should be delegated to this handler when saving node data to the config file.
 java.lang.String getNodeName()
          Returns the name of the nodes that should be delegated to this handler when loading configuration data.
 boolean hasChildren()
          Returns whether the node(s) handled by this handler are expected to have children or not.
 boolean isChild()
          Returns whether the node is a child of nome other node or not.
 void saveNode(java.lang.String name, java.lang.Object value, java.io.Writer out)
          This actually saves the property to the config file...
 void saveNode(VPTNode node, java.io.Writer out)
          Saving property nodes is going to be handled differently by the persistence manager...
 
Methods inherited from class projectviewer.persist.NodeHandler
startElement, startElement, translatePath, writeAttr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyNodeHandler

public PropertyNodeHandler()
Method Detail

getNodeName

public java.lang.String getNodeName()
Returns the name of the nodes that should be delegated to this handler when loading configuration data.

Specified by:
getNodeName in class NodeHandler

getNodeClass

public java.lang.Class getNodeClass()
Returns the class of the nodes that should be delegated to this handler when saving node data to the config file.

Specified by:
getNodeClass in class NodeHandler

isChild

public boolean isChild()
Returns whether the node is a child of nome other node or not.

Specified by:
isChild in class NodeHandler

hasChildren

public boolean hasChildren()
Returns whether the node(s) handled by this handler are expected to have children or not.

Specified by:
hasChildren in class NodeHandler

createNode

public VPTNode createNode(org.xml.sax.Attributes attrs,
                          VPTProject project)
Instantiates a VPTNode based on the information given in the attribute list.

Specified by:
createNode in class NodeHandler
Parameters:
attrs - The attributes read from the config file.
project - The project that holds this node.

saveNode

public void saveNode(VPTNode node,
                     java.io.Writer out)
              throws java.io.IOException
Saving property nodes is going to be handled differently by the persistence manager...

Specified by:
saveNode in class NodeHandler
Throws:
java.io.IOException

saveNode

public void saveNode(java.lang.String name,
                     java.lang.Object value,
                     java.io.Writer out)
              throws java.io.IOException
This actually saves the property to the config file...

Throws:
java.io.IOException