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 XPathExtractor

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.module.xml.transformer.XPathExtractor

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

    public class XPathExtractor

extends AbstractTransformer

Simple transformer for using the JAXP XPath library to extract an XPath value from an XPath expression.

Author:
  Ryan Heaton

Nested Class Summary
`static class` | `XPathExtractor.ResultType` Result type.

Field Summary

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.Initialisable
`PHASE_NAME`

Constructor Summary
`XPathExtractor()`

Method Summary
`Object` | `doTransform(Object src, String encoding)`
`String` | `getExpression()`
`Map<String,String>` | `getNamespaces()` The prefix-to-namespace map.
`XPathExtractor.ResultType` | `getResultType()` Result type from this transformer.
`XPath` | `getXpath()` The XPath evaluator.
`void` | `initialise()` Template method where deriving classes can do any initialisation after the properties have been set on this transformer
`void` | `setExpression(String expression)`
`void` | `setNamespaces(Map<String,String> prefixToNamespaceMap)` The prefix-to-namespace map.
`void` | `setResultType(XPathExtractor.ResultType resultType)` Result type from this transformer.
`void` | `setXpath(XPath xPath)` The XPath evaluator.

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

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

Constructor Detail

### XPathExtractor

    public XPathExtractor()

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

### doTransform

    public Object doTransform(Object src,
                              String encoding)
                       throws TransformerException

  Specified by:
    `doTransform` in class `AbstractTransformer`
  Throws:
    `TransformerException`

### getExpression

    public String getExpression()

  Returns:
    Returns the expression.

### setExpression

    public void setExpression(String expression)

  Parameters:
    `expression` - The expression to set.

### getResultType

    public XPathExtractor.ResultType getResultType()

  Result type from this transformer.

  Returns:
    Result type from this transformer.

### setResultType

    public void setResultType(XPathExtractor.ResultType resultType)

  Result type from this transformer.

  Parameters:
    `resultType` - Result type from this transformer.

### getXpath

    public XPath getXpath()

  The XPath evaluator.

  Returns:
    The XPath evaluator.

### setXpath

    public void setXpath(XPath xPath)

  The XPath evaluator.

  Parameters:
    `xPath` - The XPath evaluator.

### getNamespaces

    public Map<String,String> getNamespaces()

  The prefix-to-namespace map.

  Returns:
    The prefix-to-namespace map.

### setNamespaces

    public void setNamespaces(Map<String,String> prefixToNamespaceMap)

  The prefix-to-namespace map.

  Parameters:
    `prefixToNamespaceMap` - The prefix-to-namespace map.

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.