Package org.bremersee.common.model
Enum MongoSearchLanguage
- java.lang.Object
-
- java.lang.Enum<MongoSearchLanguage>
-
- org.bremersee.common.model.MongoSearchLanguage
-
- All Implemented Interfaces:
Serializable
,Comparable<MongoSearchLanguage>
public enum MongoSearchLanguage extends Enum<MongoSearchLanguage>
Languages supported by MongoDB.- Author:
- Christian Bremer
- See Also:
- Reference
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DA
Danish.DE
German.EN
English.ES
Spanish.FI
Finnish.FR
French.HU
Hungarian.IT
Italian.NL
Dutch.NO
Norwegian.NONE
If you specify a language value ofnone
, then the text search uses simple tokenization with no list of stop words and no stemming.PT
Portuguese.RO
Romanian.RU
Russian.SV
Swedish.TR
Turkish.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MongoSearchLanguage
fromLocale(Locale locale, MongoSearchLanguage fallback)
From locale.static MongoSearchLanguage
fromValue(String text)
From two letter language code.static MongoSearchLanguage
fromValue(String text, MongoSearchLanguage fallback)
From two letter language code.Locale
toLocale()
To locale.String
toString()
static MongoSearchLanguage
valueOf(String name)
Returns the enum constant of this type with the specified name.static MongoSearchLanguage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final MongoSearchLanguage NONE
If you specify a language value ofnone
, then the text search uses simple tokenization with no list of stop words and no stemming.
-
DA
public static final MongoSearchLanguage DA
Danish.
-
DE
public static final MongoSearchLanguage DE
German.
-
EN
public static final MongoSearchLanguage EN
English.
-
ES
public static final MongoSearchLanguage ES
Spanish.
-
FI
public static final MongoSearchLanguage FI
Finnish.
-
FR
public static final MongoSearchLanguage FR
French.
-
HU
public static final MongoSearchLanguage HU
Hungarian.
-
IT
public static final MongoSearchLanguage IT
Italian.
-
NL
public static final MongoSearchLanguage NL
Dutch.
-
NO
public static final MongoSearchLanguage NO
Norwegian.
-
PT
public static final MongoSearchLanguage PT
Portuguese.
-
RO
public static final MongoSearchLanguage RO
Romanian.
-
RU
public static final MongoSearchLanguage RU
Russian.
-
SV
public static final MongoSearchLanguage SV
Swedish.
-
TR
public static final MongoSearchLanguage TR
Turkish.
-
-
Method Detail
-
values
public static MongoSearchLanguage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MongoSearchLanguage c : MongoSearchLanguage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MongoSearchLanguage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<MongoSearchLanguage>
-
toLocale
public Locale toLocale()
To locale.- Returns:
- the locale
-
fromValue
public static MongoSearchLanguage fromValue(String text)
From two letter language code.- Parameters:
text
- the text- Returns:
- the two letter language code
-
fromValue
public static MongoSearchLanguage fromValue(String text, MongoSearchLanguage fallback)
From two letter language code.- Parameters:
text
- the textfallback
- the fallback language- Returns:
- the two letter language code
-
fromLocale
public static MongoSearchLanguage fromLocale(Locale locale, MongoSearchLanguage fallback)
From locale.- Parameters:
locale
- the localefallback
- the fallback language- Returns:
- the two letter language code
-
-