org.apache.tuscany.sca.databinding.xstream
Class XObject2OMElement

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.impl.BaseTransformer<XObject,OMElement>
      extended by org.apache.tuscany.sca.databinding.xstream.XObject2OMElement
All Implemented Interfaces:
PullTransformer<XObject,OMElement>, Transformer

public class XObject2OMElement
extends BaseTransformer<XObject,OMElement>
implements PullTransformer<XObject,OMElement>

XObject --> AXIOM OMElement transformer


Constructor Summary
XObject2OMElement()
           
 
Method Summary
 java.lang.Class<XObject> getSourceType()
           
 java.lang.Class<OMElement> getTargetType()
           
 int getWeight()
          Get the cost of the transformation.
 OMElement transform(XObject source, TransformationContext context)
          Transform source data into the result type.
 
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

XObject2OMElement

public XObject2OMElement()
Method Detail

transform

public OMElement transform(XObject source,
                           TransformationContext context)
Description copied from interface: PullTransformer
Transform source data into the result type.

Specified by:
transform in interface PullTransformer<XObject,OMElement>
Parameters:
source - The source data
context - The context for the transformation
Returns:
The transformed result

getSourceType

public java.lang.Class<XObject> getSourceType()
Specified by:
getSourceType in class BaseTransformer<XObject,OMElement>

getTargetType

public java.lang.Class<OMElement> getTargetType()
Specified by:
getTargetType in class BaseTransformer<XObject,OMElement>

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<XObject,OMElement>
Returns:
An integer representing the cost of the transformation