org.apache.tuscany.sca.cpp.tools.services
Class DomHandler
java.lang.Object
org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
org.apache.tuscany.sca.cpp.tools.services.DomHandler
- All Implemented Interfaces:
- DomNodeHandler
- public class DomHandler
- extends GenericDomNodeHandler
The purpose of this class it to provide a generic class that can handle both
a DOM and a DOM node.
Method Summary |
static void |
handleDom(org.w3c.dom.Document dom,
java.util.Map handlers,
java.util.Map parameters)
This method will run through the initial level of the DOM using the
handlers map |
void |
handleNode(org.w3c.dom.Node node,
java.lang.String contextXPath,
java.util.Map handlers,
java.util.Map parameters)
This method will place the attributes in this node into the parameter
map keyed by the XPath and recursively continue processing for any
sub-elements of the node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DomHandler
public DomHandler()
handleDom
public static void handleDom(org.w3c.dom.Document dom,
java.util.Map handlers,
java.util.Map parameters)
- This method will run through the initial level of the DOM using the
handlers map
- Parameters:
dom
- the document being consumedhandlers
- the map from element name to node handlerparameters
- a map of parameters - this is often used by a handler to place
a name-value pair, the name is often an Xpath representation
of the location of the data in the DOM but handlers are free
to use whatever they like - the contextXpath is generated as
an Xpath prefix for those handlers that wish to use it.
handleNode
public void handleNode(org.w3c.dom.Node node,
java.lang.String contextXPath,
java.util.Map handlers,
java.util.Map parameters)
- Description copied from class:
GenericDomNodeHandler
- This method will place the attributes in this node into the parameter
map keyed by the XPath and recursively continue processing for any
sub-elements of the node.
- Specified by:
handleNode
in interface DomNodeHandler
- Overrides:
handleNode
in class GenericDomNodeHandler
- Parameters:
node
- The DOM node being consumedcontextXPath
- The XPath to this nodehandlers
- The map from element name to node handlerparameters
- A map of parameters - this is often used by a handler to place
a name-value pair, the name is often an Xpath representation
of the location of the data in the DOM but handlers are free
to use whatever they like - the contextXpath is generated as
an Xpath prefix for those handlers that wish to use it.
Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved