projectviewer.persist
Class ProjectNodeHandler

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

public class ProjectNodeHandler
extends NodeHandler

Handler for project nodes.

Version:
$Id: ProjectNodeHandler.java 6410 2006-06-12 01:53:11Z vanza $
Author:
Marcelo Vanzin

Field Summary
protected static java.lang.String NODE_NAME
           
 
Constructor Summary
ProjectNodeHandler()
           
 
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(VPTNode node, java.io.Writer out)
          Saves a project node.
 
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
 

Field Detail

NODE_NAME

protected static final java.lang.String NODE_NAME
See Also:
Constant Field Values
Constructor Detail

ProjectNodeHandler

public ProjectNodeHandler()
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
Saves a project node. This behaves a little differently than other nodes, since it not only saves the project data, but creates nodes for the project's properties and open files.

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