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 for XPathExpression
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondocumentType
(Class<?> documentType) Class for document type to usedocumentTypeName
(String documentTypeName) Name of class for document typeend()
Ends the build of an expression.expression
(String expression) The expression value in your chosen language syntaxfactoryRef
(String factoryRef) References to a custom XPathFactory to lookup in the registrySets the id of this nodelogNamespaces
(boolean logNamespaces) Whether to log namespaces which can assist during troubleshootinglogNamespaces
(String logNamespaces) Whether to log namespaces which can assist during troubleshootingnamespace
(List<PropertyDefinition> namespace) Injects the XML Namespaces of prefix -> uri mappingsnamespaces
(Map<String, String> namespaces) Injects the XML Namespaces of prefix -> uri mappingsnamespaces
(org.apache.camel.support.builder.Namespaces namespaces) Injects the XML Namespaces of prefix -> uri mappingsobjectModel
(String objectModel) The XPath object model to usepreCompile
(boolean preCompile) Whether to enable pre-compiling the xpath expression during initialization phase.preCompile
(String preCompile) Whether to enable pre-compiling the xpath expression during initialization phase.predicate
(org.apache.camel.Predicate predicate) resultType
(Class<?> resultType) Sets the class of the result type (type from output).resultTypeName
(String resultTypeName) Sets the class name of the result type (type from output)saxon
(boolean saxon) Whether to use Saxon.Whether to use Saxon.threadSafety
(boolean threadSafety) Whether to enable thread-safety for the returned result of the xpath expression.threadSafety
(String threadSafety) Whether to enable thread-safety for the returned result of the xpath expression.trim
(boolean trim) Whether to trim the value to remove leading and trailing whitespaces and line breaksWhether to trim the value to remove leading and trailing whitespaces and line breaksxpathFactory
(XPathFactory xpathFactory) Methods inherited from class org.apache.camel.model.language.SingleInputExpressionDefinition.AbstractBuilder
headerName, propertyName
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
documentType
Class for document type to use The default value is org.w3c.dom.Document -
resultType
Sets the class of the result type (type from output). The default result type is NodeSet -
xpathFactory
-
documentTypeName
Name of class for document type The default value is org.w3c.dom.Document -
resultTypeName
Sets the class name of the result type (type from output) The default result type is NodeSet -
saxon
Whether to use Saxon. -
saxon
Whether to use Saxon. -
factoryRef
References to a custom XPathFactory to lookup in the registry -
objectModel
The XPath object model to use -
logNamespaces
Whether to log namespaces which can assist during troubleshooting -
logNamespaces
Whether to log namespaces which can assist during troubleshooting -
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
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
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
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
Description copied from interface:LanguageBuilder
Ends the build of an expression.- Returns:
- the expression fully built.
-
namespaces
Injects the XML Namespaces of prefix -> uri mappings- Parameters:
namespaces
- the XML namespaces
-
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
Injects the XML Namespaces of prefix -> uri mappings -
id
Sets the id of this node -
trim
Whether to trim the value to remove leading and trailing whitespaces and line breaks -
trim
Whether to trim the value to remove leading and trailing whitespaces and line breaks -
expression
The expression value in your chosen language syntax -
predicate
-