Package org.apache.camel.model.language
Class XPathExpression.Builder
- java.lang.Object
-
- org.apache.camel.model.language.SingleInputExpressionDefinition.AbstractBuilder<T,E>
-
- org.apache.camel.model.language.XPathExpression.Builder
-
- All Implemented Interfaces:
LanguageBuilder<XPathExpression>
- Enclosing class:
- XPathExpression
public static class XPathExpression.Builder extends SingleInputExpressionDefinition.AbstractBuilder<T,E>
Builder
is a specific builder forXPathExpression
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathExpression.Builder
documentType(Class<?> documentType)
Class for document type to useXPathExpression.Builder
documentTypeName(String documentTypeName)
Name of class for document typeXPathExpression
end()
Ends the build of an expression.T
expression(String expression)
The expression value in your chosen language syntaxXPathExpression.Builder
factoryRef(String factoryRef)
References to a custom XPathFactory to lookup in the registryT
id(String id)
Sets the id of this nodeXPathExpression.Builder
logNamespaces(boolean logNamespaces)
Whether to log namespaces which can assist during troubleshootingXPathExpression.Builder
logNamespaces(String logNamespaces)
Whether to log namespaces which can assist during troubleshootingT
namespace(List<PropertyDefinition> namespace)
Injects the XML Namespaces of prefix -> uri mappingsT
namespaces(Map<String,String> namespaces)
Injects the XML Namespaces of prefix -> uri mappingsT
namespaces(org.apache.camel.support.builder.Namespaces namespaces)
Injects the XML Namespaces of prefix -> uri mappingsXPathExpression.Builder
objectModel(String objectModel)
The XPath object model to useXPathExpression.Builder
preCompile(boolean preCompile)
Whether to enable pre-compiling the xpath expression during initialization phase.XPathExpression.Builder
preCompile(String preCompile)
Whether to enable pre-compiling the xpath expression during initialization phase.T
predicate(org.apache.camel.Predicate predicate)
XPathExpression.Builder
resultType(Class<?> resultType)
Sets the class of the result type (type from output).XPathExpression.Builder
resultTypeName(String resultTypeName)
Sets the class name of the result type (type from output)XPathExpression.Builder
saxon(boolean saxon)
Whether to use Saxon.XPathExpression.Builder
saxon(String saxon)
Whether to use Saxon.XPathExpression.Builder
threadSafety(boolean threadSafety)
Whether to enable thread-safety for the returned result of the xpath expression.XPathExpression.Builder
threadSafety(String threadSafety)
Whether to enable thread-safety for the returned result of the xpath expression.T
trim(boolean trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaksT
trim(String trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaksXPathExpression.Builder
xpathFactory(XPathFactory xpathFactory)
-
Methods inherited from class org.apache.camel.model.language.SingleInputExpressionDefinition.AbstractBuilder
headerName, propertyName
-
-
-
-
Method Detail
-
documentType
public XPathExpression.Builder documentType(Class<?> documentType)
Class for document type to use The default value is org.w3c.dom.Document
-
resultType
public XPathExpression.Builder resultType(Class<?> resultType)
Sets the class of the result type (type from output). The default result type is NodeSet
-
xpathFactory
public XPathExpression.Builder xpathFactory(XPathFactory xpathFactory)
-
documentTypeName
public XPathExpression.Builder documentTypeName(String documentTypeName)
Name of class for document type The default value is org.w3c.dom.Document
-
resultTypeName
public XPathExpression.Builder resultTypeName(String resultTypeName)
Sets the class name of the result type (type from output) The default result type is NodeSet
-
saxon
public XPathExpression.Builder saxon(String saxon)
Whether to use Saxon.
-
saxon
public XPathExpression.Builder saxon(boolean saxon)
Whether to use Saxon.
-
factoryRef
public XPathExpression.Builder factoryRef(String factoryRef)
References to a custom XPathFactory to lookup in the registry
-
objectModel
public XPathExpression.Builder objectModel(String objectModel)
The XPath object model to use
-
logNamespaces
public XPathExpression.Builder logNamespaces(String logNamespaces)
Whether to log namespaces which can assist during troubleshooting
-
logNamespaces
public XPathExpression.Builder logNamespaces(boolean logNamespaces)
Whether to log namespaces which can assist during troubleshooting
-
threadSafety
public XPathExpression.Builder threadSafety(String threadSafety)
Whether to enable thread-safety for the returned result of the xpath expression. This applies to when using NODESET as the result type, and the returned set has multiple elements. In this situation there can be thread-safety issues if you process the NODESET concurrently such as from a Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing defensive copies of the nodes. It is recommended to turn this option on if you are using camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by turning this option on.
-
threadSafety
public XPathExpression.Builder threadSafety(boolean threadSafety)
Whether to enable thread-safety for the returned result of the xpath expression. This applies to when using NODESET as the result type, and the returned set has multiple elements. In this situation there can be thread-safety issues if you process the NODESET concurrently such as from a Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing defensive copies of the nodes. It is recommended to turn this option on if you are using camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by turning this option on.
-
preCompile
public XPathExpression.Builder preCompile(String preCompile)
Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.This can be used to turn off, for example in cases the compilation phase is desired at the starting phase, such as if the application is ahead of time compiled (for example with camel-quarkus) which would then load the xpath factory of the built operating system, and not a JVM runtime.
-
preCompile
public XPathExpression.Builder preCompile(boolean preCompile)
Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.This can be used to turn off, for example in cases the compilation phase is desired at the starting phase, such as if the application is ahead of time compiled (for example with camel-quarkus) which would then load the xpath factory of the built operating system, and not a JVM runtime.
-
end
public XPathExpression end()
Description copied from interface:LanguageBuilder
Ends the build of an expression.- Returns:
- the expression fully built.
-
namespaces
public T namespaces(org.apache.camel.support.builder.Namespaces namespaces)
Injects the XML Namespaces of prefix -> uri mappings- Parameters:
namespaces
- the XML namespaces
-
namespaces
public T namespaces(Map<String,String> namespaces)
Injects the XML Namespaces of prefix -> uri mappings- Parameters:
namespaces
- the XML namespaces with the key of prefixes and the value the URIs
-
namespace
public T namespace(List<PropertyDefinition> namespace)
Injects the XML Namespaces of prefix -> uri mappings
-
id
public T id(String id)
Sets the id of this node
-
trim
public T trim(String trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaks
-
trim
public T trim(boolean trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaks
-
expression
public T expression(String expression)
The expression value in your chosen language syntax
-
predicate
public T predicate(org.apache.camel.Predicate predicate)
-
-