|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.camel.component.xquery.XQueryBuilder
public abstract class XQueryBuilder
Creates an XQuery builder.
The XQueryExpression, as you would expect, can be executed repeatedly, as often as you want, in the same or in different threads.
| Constructor Summary | |
|---|---|
XQueryBuilder()
|
|
| Method Summary | ||
|---|---|---|
protected void |
addParameters(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
Map<String,Object> map)
|
|
protected void |
addParameters(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
Map<String,Object> map,
String parameterPrefix)
|
|
XQueryBuilder |
allowStAX()
Enables to allow using StAX. |
|
XQueryBuilder |
asBytes()
|
|
XQueryBuilder |
asBytesSource()
|
|
XQueryBuilder |
asDOM()
|
|
XQueryBuilder |
asDOMSource()
|
|
XQueryBuilder |
asList()
|
|
void |
assertMatches(String text,
org.apache.camel.Exchange exchange)
|
|
XQueryBuilder |
asString()
|
|
XQueryBuilder |
asStringSource()
|
|
protected void |
configureQuery(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
org.apache.camel.Exchange exchange)
Configures the dynamic context with exchange specific parameters |
|
protected net.sf.saxon.query.DynamicQueryContext |
createDynamicContext(org.apache.camel.Exchange exchange)
Creates a dynamic context for the given exchange |
|
protected abstract net.sf.saxon.query.XQueryExpression |
createQueryExpression(net.sf.saxon.query.StaticQueryContext staticQueryContext)
A factory method to create the XQuery expression |
|
Object |
evaluate(org.apache.camel.Exchange exchange)
|
|
|
evaluate(org.apache.camel.Exchange exchange,
Class<T> type)
|
|
byte[] |
evaluateAsBytes(org.apache.camel.Exchange exchange)
|
|
Object |
evaluateAsBytesSource(org.apache.camel.Exchange exchange)
|
|
Node |
evaluateAsDOM(org.apache.camel.Exchange exchange)
|
|
List |
evaluateAsList(org.apache.camel.Exchange exchange)
|
|
String |
evaluateAsString(org.apache.camel.Exchange exchange)
|
|
Object |
evaluateAsStringSource(org.apache.camel.Exchange exchange)
|
|
net.sf.saxon.Configuration |
getConfiguration()
|
|
net.sf.saxon.query.XQueryExpression |
getExpression()
|
|
net.sf.saxon.query.ModuleURIResolver |
getModuleURIResolver()
|
|
Map<String,Object> |
getParameters()
|
|
Properties |
getProperties()
|
|
ResultFormat |
getResultsFormat()
|
|
Class |
getResultType()
|
|
protected Source |
getSource(org.apache.camel.Exchange exchange,
Object body)
Converts the inbound body to a Source, if the body is not already a Source. |
|
net.sf.saxon.query.StaticQueryContext |
getStaticQueryContext()
|
|
protected void |
initialize(org.apache.camel.Exchange exchange)
Initializes this builder - Must be invoked before evaluation. |
|
boolean |
isAllowStAX()
|
|
protected boolean |
isInputStreamNeeded(org.apache.camel.Exchange exchange)
Checks whether we need an InputStream to access the message body. |
|
boolean |
isStripsAllWhiteSpace()
|
|
boolean |
matches(org.apache.camel.Exchange exchange)
|
|
protected boolean |
matches(org.apache.camel.Exchange exchange,
List results)
|
|
XQueryBuilder |
namespace(String prefix,
String uri)
|
|
XQueryBuilder |
parameter(String name,
Object value)
|
|
void |
process(org.apache.camel.Exchange exchange)
|
|
XQueryBuilder |
resultType(Class resultType)
|
|
void |
setAllowStAX(boolean allowStAX)
|
|
void |
setConfiguration(net.sf.saxon.Configuration configuration)
|
|
void |
setModuleURIResolver(net.sf.saxon.query.ModuleURIResolver moduleURIResolver)
|
|
void |
setNamespaces(Map<String,String> namespaces)
Configures the namespace context from the given DOM element |
|
void |
setParameters(Map<String,Object> parameters)
|
|
void |
setProperties(Properties properties)
|
|
void |
setResultsFormat(ResultFormat resultsFormat)
|
|
void |
setResultType(Class resultType)
|
|
void |
setStaticQueryContext(net.sf.saxon.query.StaticQueryContext staticQueryContext)
|
|
void |
setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)
|
|
XQueryBuilder |
stripsAllWhiteSpace()
|
|
XQueryBuilder |
stripsIgnorableWhiteSpace()
|
|
String |
toString()
|
|
static XQueryBuilder |
xquery(File file)
|
|
static XQueryBuilder |
xquery(File file,
String characterSet)
|
|
static XQueryBuilder |
xquery(InputStream in,
String characterSet)
|
|
static XQueryBuilder |
xquery(Reader reader)
|
|
static XQueryBuilder |
xquery(String queryText)
|
|
static XQueryBuilder |
xquery(URL url)
|
|
static XQueryBuilder |
xquery(URL url,
String characterSet)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XQueryBuilder()
| Method Detail |
|---|
public String toString()
toString in class Object
public void process(org.apache.camel.Exchange exchange)
throws Exception
process in interface org.apache.camel.ProcessorException
public <T> T evaluate(org.apache.camel.Exchange exchange,
Class<T> type)
evaluate in interface org.apache.camel.Expressionpublic Object evaluate(org.apache.camel.Exchange exchange)
public List evaluateAsList(org.apache.camel.Exchange exchange)
throws Exception
Exception
public Object evaluateAsStringSource(org.apache.camel.Exchange exchange)
throws Exception
Exception
public Object evaluateAsBytesSource(org.apache.camel.Exchange exchange)
throws Exception
Exception
public Node evaluateAsDOM(org.apache.camel.Exchange exchange)
throws Exception
Exception
public byte[] evaluateAsBytes(org.apache.camel.Exchange exchange)
throws Exception
Exception
public String evaluateAsString(org.apache.camel.Exchange exchange)
throws Exception
Exceptionpublic boolean matches(org.apache.camel.Exchange exchange)
matches in interface org.apache.camel.Predicate
public void assertMatches(String text,
org.apache.camel.Exchange exchange)
throws AssertionError
AssertionErrorpublic static XQueryBuilder xquery(String queryText)
public static XQueryBuilder xquery(Reader reader)
public static XQueryBuilder xquery(InputStream in,
String characterSet)
public static XQueryBuilder xquery(File file,
String characterSet)
throws IOException
IOException
public static XQueryBuilder xquery(URL url,
String characterSet)
throws IOException
IOException
public static XQueryBuilder xquery(File file)
throws IOException
IOException
public static XQueryBuilder xquery(URL url)
throws IOException
IOException
public XQueryBuilder parameter(String name,
Object value)
public XQueryBuilder namespace(String prefix,
String uri)
public XQueryBuilder resultType(Class resultType)
public XQueryBuilder asBytes()
public XQueryBuilder asBytesSource()
public XQueryBuilder asDOM()
public XQueryBuilder asDOMSource()
public XQueryBuilder asList()
public XQueryBuilder asString()
public XQueryBuilder asStringSource()
public XQueryBuilder stripsAllWhiteSpace()
public XQueryBuilder stripsIgnorableWhiteSpace()
public XQueryBuilder allowStAX()
Source.
public void setNamespaces(Map<String,String> namespaces)
setNamespaces in interface org.apache.camel.spi.NamespaceAware
public net.sf.saxon.query.XQueryExpression getExpression()
throws IOException,
net.sf.saxon.trans.XPathException
IOException
net.sf.saxon.trans.XPathExceptionpublic net.sf.saxon.Configuration getConfiguration()
public void setConfiguration(net.sf.saxon.Configuration configuration)
public net.sf.saxon.query.StaticQueryContext getStaticQueryContext()
throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathExceptionpublic void setStaticQueryContext(net.sf.saxon.query.StaticQueryContext staticQueryContext)
public Map<String,Object> getParameters()
public void setParameters(Map<String,Object> parameters)
public Properties getProperties()
public void setProperties(Properties properties)
public ResultFormat getResultsFormat()
public void setResultsFormat(ResultFormat resultsFormat)
public Class getResultType()
public void setResultType(Class resultType)
public net.sf.saxon.query.ModuleURIResolver getModuleURIResolver()
public void setModuleURIResolver(net.sf.saxon.query.ModuleURIResolver moduleURIResolver)
public boolean isStripsAllWhiteSpace()
public void setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)
public boolean isAllowStAX()
public void setAllowStAX(boolean allowStAX)
protected abstract net.sf.saxon.query.XQueryExpression createQueryExpression(net.sf.saxon.query.StaticQueryContext staticQueryContext)
throws net.sf.saxon.trans.XPathException,
IOException
net.sf.saxon.trans.XPathException
IOException
protected net.sf.saxon.query.DynamicQueryContext createDynamicContext(org.apache.camel.Exchange exchange)
throws Exception
Exceptionprotected boolean isInputStreamNeeded(org.apache.camel.Exchange exchange)
InputStream to access the message body.
Depending on the content in the message body, we may not need to convert
to InputStream.
exchange - the current exchange
InputStream beforehand converting to Source afterwards.
protected Source getSource(org.apache.camel.Exchange exchange,
Object body)
Source, if the body is not already a Source.
This implementation will prefer to source in the following order:
protected void configureQuery(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
org.apache.camel.Exchange exchange)
throws Exception
Exception
protected void addParameters(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
Map<String,Object> map)
protected void addParameters(net.sf.saxon.query.DynamicQueryContext dynamicQueryContext,
Map<String,Object> map,
String parameterPrefix)
protected boolean matches(org.apache.camel.Exchange exchange,
List results)
protected void initialize(org.apache.camel.Exchange exchange)
throws net.sf.saxon.trans.XPathException,
IOException
net.sf.saxon.trans.XPathException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||