Package org.apache.solr.schema
Class AbstractEnumField.EnumMapping
- java.lang.Object
-
- org.apache.solr.schema.AbstractEnumField.EnumMapping
-
- Enclosing class:
- AbstractEnumField
public static final class AbstractEnumField.EnumMapping extends Object
Models all the info contained in an enums config XML file- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static Integer
DEFAULT_VALUE
Map<Integer,String>
enumIntToStringMap
Map<String,Integer>
enumStringToIntMap
static String
PARAM_ENUM_NAME
static String
PARAM_ENUMS_CONFIG
-
Constructor Summary
Constructors Constructor Description EnumMapping(IndexSchema schema, FieldType fieldType, Map<String,String> args)
Takes in a FieldType and the initArgs Map used for that type, removing the keys that specify the enum.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
intValueToStringValue(Integer intVal)
Converting the (internal) integer value (indicating the sort order) to string (displayed) valueInteger
stringValueToIntValue(String stringVal)
Converting the string (displayed) value (internal) to integer value (indicating the sort order)
-
-
-
Field Detail
-
PARAM_ENUMS_CONFIG
public static final String PARAM_ENUMS_CONFIG
- See Also:
- Constant Field Values
-
PARAM_ENUM_NAME
public static final String PARAM_ENUM_NAME
- See Also:
- Constant Field Values
-
DEFAULT_VALUE
public static final Integer DEFAULT_VALUE
-
-
Constructor Detail
-
EnumMapping
public EnumMapping(IndexSchema schema, FieldType fieldType, Map<String,String> args)
Takes in a FieldType and the initArgs Map used for that type, removing the keys that specify the enum.- Parameters:
schema
- for opening resourcesfieldType
- Used for logging or error messagesargs
- the init args to consume the enum name + config file from
-
-