2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.databinding.xml
Class Source2StringTransformer
java.lang.Object
org.apache.tuscany.sca.databinding.impl.BaseTransformer<javax.xml.transform.Source,java.lang.String>
org.apache.tuscany.sca.databinding.xml.Source2StringTransformer
- All Implemented Interfaces:
- PullTransformer<javax.xml.transform.Source,java.lang.String>, Transformer
public class Source2StringTransformer
- extends BaseTransformer<javax.xml.transform.Source,java.lang.String>
- implements PullTransformer<javax.xml.transform.Source,java.lang.String>
Transform TrAX Source to String
Method Summary |
protected java.lang.Class<javax.xml.transform.Source> |
getSourceType()
|
protected java.lang.Class<java.lang.String> |
getTargetType()
|
int |
getWeight()
Get the cost of the transformation. |
java.lang.String |
transform(javax.xml.transform.Source source,
TransformationContext context)
Transform source data into the result type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Source2StringTransformer
public Source2StringTransformer()
transform
public java.lang.String transform(javax.xml.transform.Source source,
TransformationContext context)
- Description copied from interface:
PullTransformer
- Transform source data into the result type.
- Specified by:
transform
in interface PullTransformer<javax.xml.transform.Source,java.lang.String>
- Parameters:
source
- The source datacontext
- The context for the transformation
- Returns:
- The transformed result
getSourceType
protected java.lang.Class<javax.xml.transform.Source> getSourceType()
- Specified by:
getSourceType
in class BaseTransformer<javax.xml.transform.Source,java.lang.String>
getTargetType
protected java.lang.Class<java.lang.String> getTargetType()
- Specified by:
getTargetType
in class BaseTransformer<javax.xml.transform.Source,java.lang.String>
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<javax.xml.transform.Source,java.lang.String>
- Returns:
- An integer representing the cost of the transformation