Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.xml.transformer
Class XQueryTransformer

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.transformer.AbstractMessageAwareTransformer
              org.mule.module.xml.transformer.AbstractXmlTransformer
                  org.mule.module.xml.transformer.XQueryTransformer

All Implemented Interfaces:
  MuleContextAware, Disposable, Initialisable, NamedObject, BaseTransformer, Transformer

    public class XQueryTransformer

extends AbstractXmlTransformer
implements Disposable

The XQuery Module gives users the ability to perform XQuery transformations on XML messages in Mule

Nested Class Summary
`protected class` | `XQueryTransformer.PooledXQueryTransformerFactory`

Nested classes/interfaces inherited from class org.mule.module.xml.transformer.AbstractXmlTransformer
`AbstractXmlTransformer.ResultHolder`

Field Summary
`protected net.sf.saxon.Configuration` | `configuration`
`static String` | `SOURCE_DOCUMENT_NAMESPACE`
`protected GenericObjectPool` | `transformerPool`

Fields inherited from class org.mule.transformer.AbstractTransformer
`DEFAULT_TRUNCATE_LENGTH, endpoint, logger, muleContext, name, returnClass, sourceTypes`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`XQueryTransformer()`
`XQueryTransformer(String xqueryFile)`

Method Summary
`protected void` | `bindDocument(Object src, net.sf.saxon.javax.xml.xquery.XQPreparedExpression transformer)` Returns the InputSource corresponding to xqueryFile or xquery
`protected void` | `bindParameters(net.sf.saxon.javax.xml.xquery.XQPreparedExpression transformer, MuleMessage message)`
`Object` | `clone()`
`void` | `dispose()` A lifecycle method where implementor should free up any resources.
`protected Object` | `evaluateTransformParameter(String name, Object value, MuleMessage message)` Returns the value to be set for the parameter.
`net.sf.saxon.javax.xml.xquery.XQCommonHandler` | `getCommonHandler()`
`net.sf.saxon.Configuration` | `getConfiguration()`
`Map` | `getContextProperties()` Gets the parameters to be used when applying the transformation
`int` | `getMaxActiveTransformers()`
`int` | `getMaxIdleTransformers()`
`String` | `getXquery()`
`String` | `getXqueryFile()`
`void` | `initialise()` Template method where deriving classes can do any initialisation after the properties have been set on this transformer
`void` | `setCommonHandler(net.sf.saxon.javax.xml.xquery.XQCommonHandler commonHandler)`
`void` | `setConfiguration(net.sf.saxon.Configuration configuration)`
`void` | `setContextProperties(Map contextProperties)` Sets the parameters to be used when applying the transformation
`void` | `setMaxActiveTransformers(int maxActiveTransformers)` Sets the the current maximum number of active transformer objects allowed in the pool
`void` | `setMaxIdleTransformers(int maxIdleTransformers)` Sets the the current maximum number of idle transformer objects allowed in the pool
`void` | `setXquery(String xquery)`
`void` | `setXqueryFile(String xqueryFile)`
`Object` | `transform(MuleMessage message, String outputEncoding)`

Methods inherited from class org.mule.module.xml.transformer.AbstractXmlTransformer
`convertToBytes, convertToText, convertToText, getOutputEncoding, getResultHolder, getXMLInputFactory, getXMLOutputFactory, isUseStaxSource, setOutputEncoding, setUseStaxSource, setXMLInputFactory, setXMLOutputFactory, writeToStream`

Methods inherited from class org.mule.transformer.AbstractMessageAwareTransformer
`doTransform, isSourceTypeSupported`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, generateTransformerName, getEncoding, getEndpoint, getName, getReturnClass, getSourceTypes, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setMuleContext, setName, setReturnClass, toString, transform, transform, unregisterSourceType`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### SOURCE_DOCUMENT_NAMESPACE

    public static final String SOURCE_DOCUMENT_NAMESPACE

See Also:
  Constant Field Values

### transformerPool

    protected final GenericObjectPool transformerPool

### configuration

    protected net.sf.saxon.Configuration configuration

Constructor Detail

### XQueryTransformer

    public XQueryTransformer()

### XQueryTransformer

    public XQueryTransformer(String xqueryFile)

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from class: `AbstractTransformer`
  Template method where deriving classes can do any initialisation after the properties have been set on this transformer

  Specified by:
    `initialise` in interface `Initialisable`
  Overrides:
    `initialise` in class `AbstractTransformer`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### dispose

    public void dispose()

  Description copied from interface: `Disposable`
  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

  Specified by:
    `dispose` in interface `Disposable`

### transform

    public Object transform(MuleMessage message,
                            String outputEncoding)
                     throws TransformerException

  Specified by:
    `transform` in class `AbstractMessageAwareTransformer`
  Throws:
    `TransformerException`

### bindParameters

    protected void bindParameters(net.sf.saxon.javax.xml.xquery.XQPreparedExpression transformer,
                                  MuleMessage message)
                           throws net.sf.saxon.javax.xml.xquery.XQException,
                                  TransformerException

  Throws:
    `net.sf.saxon.javax.xml.xquery.XQException`
    `TransformerException`

### bindDocument

    protected void bindDocument(Object src,
                                net.sf.saxon.javax.xml.xquery.XQPreparedExpression transformer)
                         throws net.sf.saxon.javax.xml.xquery.XQException,
                                TransformerException

  Returns the InputSource corresponding to xqueryFile or xquery

  Parameters:
    `src` -
    `transformer` -
  Throws:
    `net.sf.saxon.javax.xml.xquery.XQException`
    `org.mule.umo.transformer.TransformerException`
    `TransformerException`

### getConfiguration

    public net.sf.saxon.Configuration getConfiguration()

### setConfiguration

    public void setConfiguration(net.sf.saxon.Configuration configuration)

### getXqueryFile

    public String getXqueryFile()

  Returns:
    Returns the xqueryFile.

### setXqueryFile

    public void setXqueryFile(String xqueryFile)

  Parameters:
    `xqueryFile` - The xqueryFile to set.

### getXquery

    public String getXquery()

### setXquery

    public void setXquery(String xquery)

### getCommonHandler

    public net.sf.saxon.javax.xml.xquery.XQCommonHandler getCommonHandler()

### setCommonHandler

    public void setCommonHandler(net.sf.saxon.javax.xml.xquery.XQCommonHandler commonHandler)

### getMaxActiveTransformers

    public int getMaxActiveTransformers()

  Returns:
    The current maximum number of allowable active transformer objects in the pool

### setMaxActiveTransformers

    public void setMaxActiveTransformers(int maxActiveTransformers)

  Sets the the current maximum number of active transformer objects allowed in the pool

  Parameters:
    `maxActiveTransformers` - New maximum size to set

### getMaxIdleTransformers

    public int getMaxIdleTransformers()

  Returns:
    The current maximum number of allowable idle transformer objects in the pool

### setMaxIdleTransformers

    public void setMaxIdleTransformers(int maxIdleTransformers)

  Sets the the current maximum number of idle transformer objects allowed in the pool

  Parameters:
    `maxIdleTransformers` - New maximum size to set

### getContextProperties

    public Map getContextProperties()

  Gets the parameters to be used when applying the transformation

  Returns:
    a map of the parameter names and associated values
  See Also:
    `Transformer.setParameter(java.lang.String, java.lang.Object)`

### setContextProperties

    public void setContextProperties(Map contextProperties)

  Sets the parameters to be used when applying the transformation

  Parameters:
    `contextProperties` - a map of the parameter names and associated values
  See Also:
    `Transformer.setParameter(java.lang.String, java.lang.Object)`

### evaluateTransformParameter

    protected Object evaluateTransformParameter(String name,
                                                Object value,
                                                MuleMessage message)
                                         throws TransformerException

  Returns the value to be set for the parameter. This method is called for each parameter before it is set on the transformer. The purpose of this method is to allow dynamic parameters related to the event (usually message properties) to be used. Any expression using the Mule expression syntax can be used.

  For example: If the current event's message has a property named "myproperty", to pass this in you would set the transform parameter's value to be "#[mule.message:header(myproperty)]".

  This method may be overloaded by a sub class to provide a different dynamic parameter implementation.

  Parameters:
    `name` - the name of the parameter
    `value` - the value of the paramter
  Returns:
    the object to be set as the parameter value
  Throws:
    `TransformerException`

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.