Class TokenizerDefinition
java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenizerDefinition
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>
@JsonpDeserializable public class TokenizerDefinition extends java.lang.Object implements TaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TokenizerDefinition.Builder
static class
TokenizerDefinition.Kind
TokenizerDefinition
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TokenizerDefinition>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description TokenizerDefinition(TokenizerDefinitionVariant value)
-
Method Summary
Modifier and Type Method Description TokenizerDefinitionVariant
_get()
TokenizerDefinition.Kind
_kind()
Get the of the kind of variant held by this object.CharGroupTokenizer
charGroup()
Get thechar_group
variant value.EdgeNGramTokenizer
edgeNgram()
Get theedge_ngram
variant value.IcuTokenizer
icuTokenizer()
Get theicu_tokenizer
variant value.boolean
isCharGroup()
Is this variant instance of kindchar_group
?boolean
isEdgeNgram()
Is this variant instance of kindedge_ngram
?boolean
isIcuTokenizer()
Is this variant instance of kindicu_tokenizer
?boolean
isKeyword()
Is this variant instance of kindkeyword
?boolean
isKuromojiTokenizer()
Is this variant instance of kindkuromoji_tokenizer
?boolean
isLetter()
Is this variant instance of kindletter
?boolean
isLowercase()
Is this variant instance of kindlowercase
?boolean
isNgram()
Is this variant instance of kindngram
?boolean
isNoriTokenizer()
Is this variant instance of kindnori_tokenizer
?boolean
isPathHierarchy()
Is this variant instance of kindpath_hierarchy
?boolean
isPattern()
Is this variant instance of kindpattern
?boolean
isStandard()
Is this variant instance of kindstandard
?boolean
isUaxUrlEmail()
Is this variant instance of kinduax_url_email
?boolean
isWhitespace()
Is this variant instance of kindwhitespace
?KeywordTokenizer
keyword()
Get thekeyword
variant value.KuromojiTokenizer
kuromojiTokenizer()
Get thekuromoji_tokenizer
variant value.LetterTokenizer
letter()
Get theletter
variant value.LowercaseTokenizer
lowercase()
Get thelowercase
variant value.NGramTokenizer
ngram()
Get thengram
variant value.NoriTokenizer
noriTokenizer()
Get thenori_tokenizer
variant value.static TokenizerDefinition
of(java.util.function.Function<TokenizerDefinition.Builder,ObjectBuilder<TokenizerDefinition>> fn)
PathHierarchyTokenizer
pathHierarchy()
Get thepath_hierarchy
variant value.PatternTokenizer
pattern()
Get thepattern
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupTokenizerDefinitionDeserializer(ObjectDeserializer<TokenizerDefinition.Builder> op)
StandardTokenizer
standard()
Get thestandard
variant value.UaxEmailUrlTokenizer
uaxUrlEmail()
Get theuax_url_email
variant value.WhitespaceTokenizer
whitespace()
Get thewhitespace
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
TokenizerDefinition
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>
- Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>
-
of
public static TokenizerDefinition of(java.util.function.Function<TokenizerDefinition.Builder,ObjectBuilder<TokenizerDefinition>> fn) -
isCharGroup
public boolean isCharGroup()Is this variant instance of kindchar_group
? -
charGroup
Get thechar_group
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thechar_group
kind.
-
isEdgeNgram
public boolean isEdgeNgram()Is this variant instance of kindedge_ngram
? -
edgeNgram
Get theedge_ngram
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theedge_ngram
kind.
-
isIcuTokenizer
public boolean isIcuTokenizer()Is this variant instance of kindicu_tokenizer
? -
icuTokenizer
Get theicu_tokenizer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_tokenizer
kind.
-
isKeyword
public boolean isKeyword()Is this variant instance of kindkeyword
? -
keyword
Get thekeyword
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekeyword
kind.
-
isKuromojiTokenizer
public boolean isKuromojiTokenizer()Is this variant instance of kindkuromoji_tokenizer
? -
kuromojiTokenizer
Get thekuromoji_tokenizer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekuromoji_tokenizer
kind.
-
isLetter
public boolean isLetter()Is this variant instance of kindletter
? -
letter
Get theletter
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theletter
kind.
-
isLowercase
public boolean isLowercase()Is this variant instance of kindlowercase
? -
lowercase
Get thelowercase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelowercase
kind.
-
isNgram
public boolean isNgram()Is this variant instance of kindngram
? -
ngram
Get thengram
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thengram
kind.
-
isNoriTokenizer
public boolean isNoriTokenizer()Is this variant instance of kindnori_tokenizer
? -
noriTokenizer
Get thenori_tokenizer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thenori_tokenizer
kind.
-
isPathHierarchy
public boolean isPathHierarchy()Is this variant instance of kindpath_hierarchy
? -
pathHierarchy
Get thepath_hierarchy
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepath_hierarchy
kind.
-
isPattern
public boolean isPattern()Is this variant instance of kindpattern
? -
pattern
Get thepattern
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepattern
kind.
-
isStandard
public boolean isStandard()Is this variant instance of kindstandard
? -
standard
Get thestandard
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thestandard
kind.
-
isUaxUrlEmail
public boolean isUaxUrlEmail()Is this variant instance of kinduax_url_email
? -
uaxUrlEmail
Get theuax_url_email
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theuax_url_email
kind.
-
isWhitespace
public boolean isWhitespace()Is this variant instance of kindwhitespace
? -
whitespace
Get thewhitespace
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thewhitespace
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupTokenizerDefinitionDeserializer
protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer<TokenizerDefinition.Builder> op)
-