Class XQueryEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.support.ScheduledPollEndpoint
-
- org.apache.camel.support.DefaultPollingEndpoint
-
- org.apache.camel.support.ProcessorEndpoint
-
- org.apache.camel.component.xquery.XQueryEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.0.0", scheme="xquery", title="XQuery", syntax="xquery:resourceUri", category=TRANSFORMATION) public class XQueryEndpoint extends org.apache.camel.support.ProcessorEndpoint
Query and/or transform XML payloads using XQuery and Saxon.
-
-
Constructor Summary
Constructors Constructor Description XQueryEndpoint(String endpointUri, org.apache.camel.Component component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doInit()
protected void
doInitXQuery()
protected void
doStart()
protected void
doStop()
net.sf.saxon.Configuration
getConfiguration()
Map<String,Object>
getConfigurationProperties()
String
getHeaderName()
net.sf.saxon.lib.ModuleURIResolver
getModuleURIResolver()
Map<String,String>
getNamespacePrefixes()
Map<String,Object>
getParameters()
Properties
getProperties()
String
getResourceUri()
ResultFormat
getResultsFormat()
Class<?>
getResultType()
net.sf.saxon.query.StaticQueryContext
getStaticQueryContext()
boolean
isAllowStAX()
boolean
isStripsAllWhiteSpace()
void
setAllowStAX(boolean allowStAX)
Whether to allow using StAX modevoid
setConfiguration(net.sf.saxon.Configuration configuration)
To use a custom Saxon configurationvoid
setConfigurationProperties(Map<String,Object> configurationProperties)
To set custom Saxon configuration propertiesvoid
setHeaderName(String headerName)
To use a Camel Message header as the input source instead of Message body.void
setModuleURIResolver(net.sf.saxon.lib.ModuleURIResolver moduleURIResolver)
To use the customModuleURIResolver
void
setNamespacePrefixes(Map<String,String> namespacePrefixes)
Allows to control which namespace prefixes to use for a set of namespace mappingsvoid
setParameters(Map<String,Object> parameters)
Additional parametersvoid
setProperties(Properties properties)
Properties to configure the serialization parametersvoid
setResourceUri(String resourceUri)
The name of the template to load from classpath or file systemvoid
setResultsFormat(ResultFormat resultsFormat)
What output result to usevoid
setResultType(Class<?> resultType)
What output result to use defined as a classvoid
setStaticQueryContext(net.sf.saxon.query.StaticQueryContext staticQueryContext)
To use a custom Saxon StaticQueryContextvoid
setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)
Whether to strip all whitespaces-
Methods inherited from class org.apache.camel.support.ProcessorEndpoint
createPollingConsumer, createProcessor, createProducer, getProcessor, onExchange, setProcessor
-
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
XQueryEndpoint
public XQueryEndpoint(String endpointUri, org.apache.camel.Component component)
-
-
Method Detail
-
getResourceUri
public String getResourceUri()
-
setResourceUri
public void setResourceUri(String resourceUri)
The name of the template to load from classpath or file system
-
getConfiguration
public net.sf.saxon.Configuration getConfiguration()
-
setConfiguration
public void setConfiguration(net.sf.saxon.Configuration configuration)
To use a custom Saxon configuration
-
setConfigurationProperties
public void setConfigurationProperties(Map<String,Object> configurationProperties)
To set custom Saxon configuration properties
-
getStaticQueryContext
public net.sf.saxon.query.StaticQueryContext getStaticQueryContext()
-
setStaticQueryContext
public void setStaticQueryContext(net.sf.saxon.query.StaticQueryContext staticQueryContext)
To use a custom Saxon StaticQueryContext
-
setNamespacePrefixes
public void setNamespacePrefixes(Map<String,String> namespacePrefixes)
Allows to control which namespace prefixes to use for a set of namespace mappings
-
getResultsFormat
public ResultFormat getResultsFormat()
-
setResultsFormat
public void setResultsFormat(ResultFormat resultsFormat)
What output result to use
-
getProperties
public Properties getProperties()
-
setProperties
public void setProperties(Properties properties)
Properties to configure the serialization parameters
-
getResultType
public Class<?> getResultType()
-
setResultType
public void setResultType(Class<?> resultType)
What output result to use defined as a class
-
isStripsAllWhiteSpace
public boolean isStripsAllWhiteSpace()
-
setStripsAllWhiteSpace
public void setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)
Whether to strip all whitespaces
-
getModuleURIResolver
public net.sf.saxon.lib.ModuleURIResolver getModuleURIResolver()
-
setModuleURIResolver
public void setModuleURIResolver(net.sf.saxon.lib.ModuleURIResolver moduleURIResolver)
To use the customModuleURIResolver
-
isAllowStAX
public boolean isAllowStAX()
-
setAllowStAX
public void setAllowStAX(boolean allowStAX)
Whether to allow using StAX mode
-
getHeaderName
public String getHeaderName()
-
setHeaderName
public void setHeaderName(String headerName)
To use a Camel Message header as the input source instead of Message body.
-
doInit
protected void doInit() throws Exception
- Overrides:
doInit
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.ScheduledPollEndpoint
- Throws:
Exception
-
-