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.AbstractMessageTransformer
              org.mule.module.xml.transformer.AbstractXmlTransformer
                  org.mule.module.xml.transformer.XQueryTransformer

All Implemented Interfaces:
  MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, NamedObject, MessageProcessor, MessageTransformer, Transformer, EndpointAware

    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
`encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, 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()` Template method where deriving classes can do any clean up any resources or state before the object is disposed.
`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` | `transformMessage(MuleMessage message, String outputEncoding)` Transform the message

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.AbstractMessageTransformer
`checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transform`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, onNotification, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceType`

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

Methods inherited from interface org.mule.api.transformer.Transformer
`getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform`

Methods inherited from interface org.mule.api.processor.MessageProcessor
`process`

Methods inherited from interface org.mule.api.NamedObject
`getName, setName`

Methods inherited from interface org.mule.api.context.MuleContextAware
`setMuleContext`

Methods inherited from interface org.mule.endpoint.EndpointAware
`setEndpoint`

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 class: `AbstractTransformer`
  Template method where deriving classes can do any clean up any resources or state before the object is disposed.

  Specified by:
    `dispose` in interface `Disposable`
  Overrides:
    `dispose` in class `AbstractTransformer`

### transformMessage

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

  Description copied from class: `AbstractMessageTransformer`
  Transform the message

  Specified by:
    `transformMessage` in class `AbstractMessageTransformer`
  Returns:
  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 Exception

  Returns the InputSource corresponding to xqueryFile or xquery

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

### 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-2010 MuleSoft, Inc.. All Rights Reserved.