projectviewer.persist
Class FilterNodeHandler

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

public class FilterNodeHandler
extends NodeHandler

Handler for filter configuration nodes.

Since:
PV 3.0.0
Author:
Marcelo Vanzin

Field Summary
 
Fields inherited from class projectviewer.persist.NodeHandler
VCSTATE_ATTR
 
Constructor Summary
FilterNodeHandler()
           
 
Method Summary
 VPTNode createNode(org.xml.sax.Attributes attrs, VPTProject project)
          Instantiates a filter based on the given attributes.
 java.lang.Class getNodeClass()
          Filter nodes are handled differently; returns null.
 java.lang.String getNodeName()
          Returns the name of the filter node in the config file.
 boolean hasChildren()
          Filters don't have children.
 boolean isChild()
          Filters are not children of any node.
 void saveNode(VPTFilterData filter, java.io.Writer out)
          Saves the filter to the output.
 void saveNode(VPTNode node, java.io.Writer out)
          Saving filters is handled differently.
 
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

FilterNodeHandler

public FilterNodeHandler()
Method Detail

getNodeName

public java.lang.String getNodeName()
Returns the name of the filter node in the config file.

Specified by:
getNodeName in class NodeHandler

getNodeClass

public java.lang.Class getNodeClass()
Filter nodes are handled differently; returns null.

Specified by:
getNodeClass in class NodeHandler

isChild

public boolean isChild()
Filters are not children of any node.

Specified by:
isChild in class NodeHandler

hasChildren

public boolean hasChildren()
Filters don't have children.

Specified by:
hasChildren in class NodeHandler

createNode

public VPTNode createNode(org.xml.sax.Attributes attrs,
                          VPTProject project)
Instantiates a filter based on the given attributes.

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 filters is handled differently.

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

saveNode

public void saveNode(VPTFilterData filter,
                     java.io.Writer out)
              throws java.io.IOException
Saves the filter to the output.

Throws:
java.io.IOException