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.routing
Class XmlMessageSplitter

    java.lang.Object
      org.mule.routing.outbound.AbstractOutboundRouter
          org.mule.routing.outbound.FilteringOutboundRouter
              org.mule.routing.outbound.AbstractMessageSplitter
                  org.mule.routing.outbound.AbstractRoundRobinMessageSplitter
                      org.mule.module.xml.routing.XmlMessageSplitter

All Implemented Interfaces:
  FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable

Direct Known Subclasses:
  FilterBasedXmlMessageSplitter

    public class XmlMessageSplitter

extends AbstractRoundRobinMessageSplitter

`XmlMessageSplitter` will split a DOM4J document into nodes based on the "splitExpression" property.

Optionally, you can specify a `namespaces` property map that contain prefix/namespace mappings. Mind if you have a default namespace declared you should map it to some namespace, and reference it in the `splitExpression` property.

The splitter can optionally validate against an XML schema. By default schema validation is turned off.

You may reference an external schema from the classpath by using the `externalSchemaLocation` property.

Note that each part returned is actually returned as a new Document.

Field Summary
`static String` | `APACHE_XML_FEATURES_VALIDATION_SCHEMA`
`static String` | `APACHE_XML_FEATURES_VALIDATION_SCHEMA_FULL_CHECKING`
`protected String` | `externalSchemaLocation`
`static String` | `JAXP_PROPERTIES_SCHEMA_LANGUAGE`
`static String` | `JAXP_PROPERTIES_SCHEMA_LANGUAGE_VALUE`
`static String` | `JAXP_PROPERTIES_SCHEMA_SOURCE`
`protected NamespaceManager` | `namespaceManager`
`protected Map<?,?>` | `namespaces`
`protected String` | `splitExpression`
`protected boolean` | `validateSchema`

Fields inherited from class org.mule.routing.outbound.FilteringOutboundRouter
`expressionManager`

Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter
`enableCorrelation, flowConstruct, initialised, logger, magicProperties, muleContext, replyTo, resultsHandler, routes, started, transactionConfig`

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

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

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

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

Constructor Summary
`XmlMessageSplitter()`

Method Summary
`String` | `getExternalSchemaLocation()`
`Map<?,?>` | `getNamespaces()`
`String` | `getSplitExpression()`
`void` | `initialise()` Method used to perform any initialisation work.
`boolean` | `isValidateSchema()`
`protected void` | `setDoSchemaValidation(org.dom4j.io.SAXReader reader, boolean validate)`
`void` | `setExternalSchemaLocation(String externalSchemaLocation)` Set classpath location of the XSD to check against.
`void` | `setNamespaces(Map<?,?> namespaces)`
`void` | `setSplitExpression(String splitExpression)`
`void` | `setValidateSchema(boolean validateSchema)`
`protected List` | `splitMessage(MuleMessage message)` Template method can be used to split the message up before the getMessagePart method is called .

Methods inherited from class org.mule.routing.outbound.AbstractRoundRobinMessageSplitter
`getMessageParts, isDeterministic, isDisableRoundRobin, isFailIfNoMatch, setDeterministic, setDisableRoundRobin, setFailIfNoMatch`

Methods inherited from class org.mule.routing.outbound.AbstractMessageSplitter
`route`

Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter
`addRoute, getFilter, getRoute, getTransformers, isMatch, isTransformBeforeMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates`

Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter
`dispose, getEnableCorrelation, getMuleContext, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setFlowConstruct, setMessageProcessors, setMessageProperties, setMuleContext, setReplyTo, setResultsHandler, setRouterStatistics, setRoutes, setTransactionConfig, start, stop`

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

Methods inherited from interface org.mule.api.processor.MessageRouter
`addRoute, removeRoute`

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

Field Detail

### APACHE_XML_FEATURES_VALIDATION_SCHEMA

    public static final String APACHE_XML_FEATURES_VALIDATION_SCHEMA

See Also:
  Constant Field Values

### APACHE_XML_FEATURES_VALIDATION_SCHEMA_FULL_CHECKING

    public static final String APACHE_XML_FEATURES_VALIDATION_SCHEMA_FULL_CHECKING

See Also:
  Constant Field Values

### JAXP_PROPERTIES_SCHEMA_SOURCE

    public static final String JAXP_PROPERTIES_SCHEMA_SOURCE

See Also:
  Constant Field Values

### JAXP_PROPERTIES_SCHEMA_LANGUAGE

    public static final String JAXP_PROPERTIES_SCHEMA_LANGUAGE

See Also:
  Constant Field Values

### JAXP_PROPERTIES_SCHEMA_LANGUAGE_VALUE

    public static final String JAXP_PROPERTIES_SCHEMA_LANGUAGE_VALUE

See Also:
  Constant Field Values

### splitExpression

    protected volatile String splitExpression

### namespaces

    protected volatile Map<?,?> namespaces

### namespaceManager

    protected NamespaceManager namespaceManager

### validateSchema

    protected volatile boolean validateSchema

### externalSchemaLocation

    protected volatile String externalSchemaLocation

Constructor Detail

### XmlMessageSplitter

    public XmlMessageSplitter()

Method Detail

### setSplitExpression

    public void setSplitExpression(String splitExpression)

### setNamespaces

    public void setNamespaces(Map<?,?> namespaces)

### getNamespaces

    public Map<?,?> getNamespaces()

### getSplitExpression

    public String getSplitExpression()

### isValidateSchema

    public boolean isValidateSchema()

### setValidateSchema

    public void setValidateSchema(boolean validateSchema)

### getExternalSchemaLocation

    public String getExternalSchemaLocation()

### setExternalSchemaLocation

    public void setExternalSchemaLocation(String externalSchemaLocation)

  Set classpath location of the XSD to check against. If the resource cannot be found, an exception will be thrown at runtime.

  Parameters:
    `externalSchemaLocation` - location of XSD

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

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

### splitMessage

    protected List splitMessage(MuleMessage message)

  Template method can be used to split the message up before the getMessagePart method is called .

  Overrides:
    `splitMessage` in class `AbstractRoundRobinMessageSplitter`
  Parameters:
    `message` - the message being routed
  Returns:
    a list of payload objects or `MuleMessage` objects. Usually, it is sufficient just to return payload objects

### setDoSchemaValidation

    protected void setDoSchemaValidation(org.dom4j.io.SAXReader reader,
                                         boolean validate)
                                  throws Exception

  Throws:
    `Exception`

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.