2016/05/28 - Apache Tuscany has been retired.

For more information, please explore the Attic.



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

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.impl.BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>
      extended by org.apache.tuscany.sca.databinding.xml.Node2OutputStream
All Implemented Interfaces:
PushTransformer<org.w3c.dom.Node,java.io.OutputStream>, Transformer

public class Node2OutputStream
extends BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>
implements PushTransformer<org.w3c.dom.Node,java.io.OutputStream>

Push DOM Node to OutputStream


Constructor Summary
Node2OutputStream()
           
 
Method Summary
protected  java.lang.Class<org.w3c.dom.Node> getSourceType()
           
protected  java.lang.Class<java.io.OutputStream> getTargetType()
           
 int getWeight()
          Get the cost of the transformation.
 void transform(org.w3c.dom.Node source, java.io.OutputStream writer, TransformationContext context)
           
 
Methods inherited from class org.apache.tuscany.sca.databinding.impl.BaseTransformer
getSourceDataBinding, getTargetDataBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.sca.databinding.Transformer
getSourceDataBinding, getTargetDataBinding
 

Constructor Detail

Node2OutputStream

public Node2OutputStream()
Method Detail

transform

public void transform(org.w3c.dom.Node source,
                      java.io.OutputStream writer,
                      TransformationContext context)
Specified by:
transform in interface PushTransformer<org.w3c.dom.Node,java.io.OutputStream>
Parameters:
source - The source data
writer - The sink to receive the data

getSourceType

protected java.lang.Class<org.w3c.dom.Node> getSourceType()
Specified by:
getSourceType in class BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>

getTargetType

protected java.lang.Class<java.io.OutputStream> getTargetType()
Specified by:
getTargetType in class BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>

getWeight

public int getWeight()
Description copied from interface: Transformer
Get the cost of the transformation. The weight can be used to choose the most efficient path if there are more than one available from the source to the target.

Specified by:
getWeight in interface Transformer
Overrides:
getWeight in class BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>
Returns:
An integer representing the cost of the transformation