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

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.impl.BaseTransformer<java.io.InputStream,org.xml.sax.ContentHandler>
      extended by org.apache.tuscany.sca.databinding.fastinfoset.FastInfoset2SAX
All Implemented Interfaces:
PushTransformer<java.io.InputStream,org.xml.sax.ContentHandler>, Transformer

public class FastInfoset2SAX
extends BaseTransformer<java.io.InputStream,org.xml.sax.ContentHandler>
implements PushTransformer<java.io.InputStream,org.xml.sax.ContentHandler>


Constructor Summary
FastInfoset2SAX()
           
 
Method Summary
 java.lang.String getSourceDataBinding()
          Get the source type that this transformer transforms data from.
protected  java.lang.Class<java.io.InputStream> getSourceType()
           
protected  java.lang.Class<org.xml.sax.ContentHandler> getTargetType()
           
 int getWeight()
          Get the cost of the transformation.
 void transform(java.io.InputStream source, org.xml.sax.ContentHandler target, TransformationContext context)
           
 
Methods inherited from class org.apache.tuscany.sca.databinding.impl.BaseTransformer
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
getTargetDataBinding
 

Constructor Detail

FastInfoset2SAX

public FastInfoset2SAX()
Method Detail

getSourceType

protected java.lang.Class<java.io.InputStream> getSourceType()
Specified by:
getSourceType in class BaseTransformer<java.io.InputStream,org.xml.sax.ContentHandler>

getTargetType

protected java.lang.Class<org.xml.sax.ContentHandler> getTargetType()
Specified by:
getTargetType in class BaseTransformer<java.io.InputStream,org.xml.sax.ContentHandler>

transform

public void transform(java.io.InputStream source,
                      org.xml.sax.ContentHandler target,
                      TransformationContext context)
Specified by:
transform in interface PushTransformer<java.io.InputStream,org.xml.sax.ContentHandler>
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<java.io.InputStream,org.xml.sax.ContentHandler>
Returns:
An integer representing the cost of the transformation

getSourceDataBinding

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

Specified by:
getSourceDataBinding in interface Transformer
Overrides:
getSourceDataBinding in class BaseTransformer<java.io.InputStream,org.xml.sax.ContentHandler>
Returns:
A key identifying the source type