Package org.apache.camel.model.language
Class TokenizerExpression
java.lang.Object
org.apache.camel.model.language.ExpressionDefinition
org.apache.camel.model.language.SingleInputExpressionDefinition
org.apache.camel.model.language.TokenizerExpression
- All Implemented Interfaces:
org.apache.camel.Expression,org.apache.camel.ExpressionFactory,HasExpressionType,org.apache.camel.Predicate,org.apache.camel.PredicateFactory,org.apache.camel.spi.ExpressionFactoryAware,org.apache.camel.spi.PredicateFactoryAware
@Metadata(firstVersion="2.0.0",
label="language,core",
title="Tokenize")
public class TokenizerExpression
extends SingleInputExpressionDefinition
Tokenize text payloads using delimiter patterns.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilderis a specific builder forTokenizerExpression.Nested classes/interfaces inherited from class org.apache.camel.model.language.SingleInputExpressionDefinition
SingleInputExpressionDefinition.AbstractBuilder<T extends SingleInputExpressionDefinition.AbstractBuilder<T,E>, E extends SingleInputExpressionDefinition> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()getRegex()getToken()getXml()voidsetEndToken(String endToken) The end token to use as tokenizer if using start/end token pairs.voidTo group N parts together, for example to split big files into chunks of 1000 lines.voidsetGroupDelimiter(String groupDelimiter) Sets the delimiter to use when grouping.voidsetIncludeTokens(String includeTokens) Whether to include the tokens in the parts when using pairs.voidsetInheritNamespaceTagName(String inheritNamespaceTagName) To inherit namespaces from a root/parent tag name when using XML You can use simple language as the tag name to support dynamic names.voidIf the token is a regular expression pattern.voidsetSkipFirst(String skipFirst) To skip the very first elementvoidThe (start) token to use as tokenizer, for example you can use the new line token.voidWhether the input is XML messages.toString()Methods inherited from class org.apache.camel.model.language.SingleInputExpressionDefinition
getHeaderName, getPropertyName, setHeaderName, setPropertyNameMethods inherited from class org.apache.camel.model.language.ExpressionDefinition
createExpression, createPredicate, evaluate, getExpression, getExpressionFactory, getExpressionType, getExpressionValue, getId, getLabel, getLabel, getPredicate, getPredicateFactory, getTrim, init, initPredicate, matches, setExpression, setExpressionType, setExpressionValue, setId, setTrim
-
Constructor Details
-
TokenizerExpression
public TokenizerExpression() -
TokenizerExpression
-
-
Method Details
-
getLanguage
- Overrides:
getLanguagein classExpressionDefinition
-
getToken
-
setToken
The (start) token to use as tokenizer, for example you can use the new line token. You can use simple language as the token to support dynamic tokens. -
getEndToken
-
setEndToken
The end token to use as tokenizer if using start/end token pairs. You can use simple language as the token to support dynamic tokens. -
setRegex
If the token is a regular expression pattern. The default value is false -
getRegex
-
getInheritNamespaceTagName
-
setInheritNamespaceTagName
To inherit namespaces from a root/parent tag name when using XML You can use simple language as the tag name to support dynamic names. -
getXml
-
setXml
Whether the input is XML messages. This option must be set to true if working with XML payloads. -
getIncludeTokens
-
setIncludeTokens
Whether to include the tokens in the parts when using pairs. When including tokens then the endToken property must also be configured (to use pair mode). The default value is false -
getGroup
-
setGroup
To group N parts together, for example to split big files into chunks of 1000 lines. You can use simple language as the group to support dynamic group sizes. -
getGroupDelimiter
-
setGroupDelimiter
Sets the delimiter to use when grouping. If this has not been set then token will be used as the delimiter. -
getSkipFirst
-
setSkipFirst
To skip the very first element -
toString
- Overrides:
toStringin classExpressionDefinition
-