Class TokenizerDefinition
java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenizerDefinition
- All Implemented Interfaces:
JsonpSerializable
,OpenTaggedUnion<TokenizerDefinition.Kind,
,Object> TaggedUnion<TokenizerDefinition.Kind,
Object>
@JsonpDeserializable
public class TokenizerDefinition
extends Object
implements OpenTaggedUnion<TokenizerDefinition.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTokenizerDefinition
(String kind, JsonData value) Build a custom plugin-definedTokenizerDefinition
, given its kind and some JSON data -
Method Summary
Modifier and TypeMethodDescription_custom()
Get the custom plugin-defined variant value.final String
Get the actual kind when_kind()
equalsTokenizerDefinition.Kind._Custom
(plugin-defined variant).final Object
_get()
boolean
Is this a customTokenizerDefinition
defined by a plugin?final TokenizerDefinition.Kind
_kind()
Get the of the kind of variant held by this object.Get thechar_group
variant value.Get theedge_ngram
variant value.Get theicu_tokenizer
variant value.boolean
Is this variant instance of kindchar_group
?boolean
Is this variant instance of kindedge_ngram
?boolean
Is this variant instance of kindicu_tokenizer
?boolean
Is this variant instance of kindkeyword
?boolean
Is this variant instance of kindkuromoji_tokenizer
?boolean
isLetter()
Is this variant instance of kindletter
?boolean
Is this variant instance of kindlowercase
?boolean
isNgram()
Is this variant instance of kindngram
?boolean
Is this variant instance of kindnori_tokenizer
?boolean
Is this variant instance of kindpath_hierarchy
?boolean
Is this variant instance of kindpattern
?boolean
Is this variant instance of kindstandard
?boolean
Is this variant instance of kinduax_url_email
?boolean
Is this variant instance of kindwhitespace
?keyword()
Get thekeyword
variant value.Get thekuromoji_tokenizer
variant value.letter()
Get theletter
variant value.Get thelowercase
variant value.ngram()
Get thengram
variant value.Get thenori_tokenizer
variant value.static TokenizerDefinition
Get thepath_hierarchy
variant value.pattern()
Get thepattern
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
standard()
Get thestandard
variant value.toString()
Get theuax_url_email
variant value.Get thewhitespace
variant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
TokenizerDefinition
-
TokenizerDefinition
Build a custom plugin-definedTokenizerDefinition
, given its kind and some JSON data
-
-
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,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<TokenizerDefinition.Kind,
Object>
-
of
public static TokenizerDefinition of(Function<TokenizerDefinition.Builder, ObjectBuilder<TokenizerDefinition>> fn) -
isCharGroup
public boolean isCharGroup()Is this variant instance of kindchar_group
? -
charGroup
Get thechar_group
variant value.- Throws:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
IllegalStateException
- if the current variant is not of thewhitespace
kind.
-
_isCustom
public boolean _isCustom()Is this a customTokenizerDefinition
defined by a plugin? -
_customKind
Get the actual kind when_kind()
equalsTokenizerDefinition.Kind._Custom
(plugin-defined variant).- Specified by:
_customKind
in interfaceOpenTaggedUnion<TokenizerDefinition.Kind,
Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
IllegalStateException
- if the current variant is notTokenizerDefinition.Kind._Custom
.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupTokenizerDefinitionDeserializer
protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer<TokenizerDefinition.Builder> op)
-