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