projectviewer.persist
Class FileNodeHandler

java.lang.Object
  extended by projectviewer.persist.NodeHandler
      extended by projectviewer.persist.FileNodeHandler

public class FileNodeHandler
extends NodeHandler

Handler for file nodes.

Author:
Marcelo Vanzin

Field Summary
 
Fields inherited from class projectviewer.persist.NodeHandler
VCSTATE_ATTR
 
Constructor Summary
FileNodeHandler()
           
 
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 file node to the config file.
 
Methods inherited from class projectviewer.persist.NodeHandler
fixPath, startElement, startElement, writeAttr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNodeHandler

public FileNodeHandler()
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 file node to the config file.

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