org.apache.tuscany.sca.databinding.fastinfoset
Class Node2FastInfoset

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.fastinfoset.Node2FastInfoset
All Implemented Interfaces:
PushTransformer<org.w3c.dom.Node,java.io.OutputStream>, Transformer

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


Constructor Summary
Node2FastInfoset()
           
 
Method Summary
protected  java.lang.Class<org.w3c.dom.Node> getSourceType()
           
 java.lang.String getTargetDataBinding()
          Get the target type that this transformer transforms data into.
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 target, TransformationContext context)
           
 
Methods inherited from class org.apache.tuscany.sca.databinding.impl.BaseTransformer
getSourceDataBinding
 
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
 

Constructor Detail

Node2FastInfoset

public Node2FastInfoset()
Method Detail

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>

transform

public void transform(org.w3c.dom.Node source,
                      java.io.OutputStream target,
                      TransformationContext context)
Specified by:
transform in interface PushTransformer<org.w3c.dom.Node,java.io.OutputStream>
Parameters:
source - The source data
target - The sink to receive the data
See Also:
PushTransformer.transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext)

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

getTargetDataBinding

public java.lang.String getTargetDataBinding()
Description copied from interface: Transformer
Get the target type that this transformer transforms data into. The type is used as the key when the transformer is registered with TransformerRegistry.

Specified by:
getTargetDataBinding in interface Transformer
Overrides:
getTargetDataBinding in class BaseTransformer<org.w3c.dom.Node,java.io.OutputStream>
Returns:
A key identifying the target type