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

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

public class InputSource2SAX
extends BaseTransformer<org.xml.sax.InputSource,org.xml.sax.ContentHandler>
implements PushTransformer<org.xml.sax.InputSource,org.xml.sax.ContentHandler>

Push InputSource to SAX


Constructor Summary
InputSource2SAX()
           
 
Method Summary
 java.lang.Class<org.xml.sax.InputSource> getSourceType()
           
 java.lang.Class<org.xml.sax.ContentHandler> getTargetType()
           
 int getWeight()
          Get the cost of the transformation.
 void transform(org.xml.sax.InputSource source, org.xml.sax.ContentHandler target, 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

InputSource2SAX

public InputSource2SAX()
Method Detail

transform

public void transform(org.xml.sax.InputSource source,
                      org.xml.sax.ContentHandler target,
                      TransformationContext context)
Specified by:
transform in interface PushTransformer<org.xml.sax.InputSource,org.xml.sax.ContentHandler>
Parameters:
source - The source data
target - The sink to receive the data

getSourceType

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

getTargetType

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

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.xml.sax.InputSource,org.xml.sax.ContentHandler>
Returns:
An integer representing the cost of the transformation