org.apache.tuscany.sca.databinding.xml
Class DOMWrapperHandler

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.xml.DOMWrapperHandler
All Implemented Interfaces:
WrapperHandler<org.w3c.dom.Node>

public class DOMWrapperHandler
extends java.lang.Object
implements WrapperHandler<org.w3c.dom.Node>


Constructor Summary
DOMWrapperHandler()
           
 
Method Summary
 org.w3c.dom.Node create(Operation operation, boolean input)
          Create a wrapper element
 java.util.List getChildren(org.w3c.dom.Node wrapper, Operation operation, boolean input)
          Get a list of child elements from the wrapper
 DataType getWrapperType(Operation operation, boolean input)
          Get the data type for the wrapper
 boolean isInstance(java.lang.Object wrapperObj, Operation operation, boolean input)
          Check if the given data is an instance of the wrapper
 void setChild(org.w3c.dom.Node wrapper, int i, ElementInfo childElement, java.lang.Object value)
           
 void setChildren(org.w3c.dom.Node wrapper, java.lang.Object[] childObjects, Operation operation, boolean input)
          Populate the wrapper element with the child objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMWrapperHandler

public DOMWrapperHandler()
Method Detail

create

public org.w3c.dom.Node create(Operation operation,
                               boolean input)
Description copied from interface: WrapperHandler
Create a wrapper element

Specified by:
create in interface WrapperHandler<org.w3c.dom.Node>
Parameters:
operation - The operation
input - Is it for input or output
Returns:
An object representing the wrapper element

setChildren

public void setChildren(org.w3c.dom.Node wrapper,
                        java.lang.Object[] childObjects,
                        Operation operation,
                        boolean input)
Description copied from interface: WrapperHandler
Populate the wrapper element with the child objects

Specified by:
setChildren in interface WrapperHandler<org.w3c.dom.Node>
Parameters:
wrapper - The wrapper object
childObjects - The child objects
operation - The operation
input - Is it for input or output

setChild

public void setChild(org.w3c.dom.Node wrapper,
                     int i,
                     ElementInfo childElement,
                     java.lang.Object value)

getChildren

public java.util.List getChildren(org.w3c.dom.Node wrapper,
                                  Operation operation,
                                  boolean input)
Description copied from interface: WrapperHandler
Get a list of child elements from the wrapper

Specified by:
getChildren in interface WrapperHandler<org.w3c.dom.Node>
Parameters:
wrapper - The wrapper object
operation - The operation
input - Is it for input or output
Returns:
child elements under the wrapper

getWrapperType

public DataType getWrapperType(Operation operation,
                               boolean input)
Description copied from interface: WrapperHandler
Get the data type for the wrapper

Specified by:
getWrapperType in interface WrapperHandler<org.w3c.dom.Node>
Parameters:
operation - The operation
input - Is it for input or output?
Returns:
The data type of the wrapper, null if it's not a wrapper type
See Also:
WrapperHandler.getWrapperType(Operation, boolean)

isInstance

public boolean isInstance(java.lang.Object wrapperObj,
                          Operation operation,
                          boolean input)
Description copied from interface: WrapperHandler
Check if the given data is an instance of the wrapper

Specified by:
isInstance in interface WrapperHandler<org.w3c.dom.Node>
operation - The operation
input - Input or output
Returns: