Package net.sf.basedb.core
Enum Class FeatureIdentificationMethod
- All Implemented Interfaces:
Serializable
,Comparable<FeatureIdentificationMethod>
,Constable
This enumeration defines constants that are used to specify
which method to use for identifying features on an array design.
- Version:
- 2.6
- Author:
- Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUse coordinates (block, metaGridX, metaGridY, row, column)Use the external feature ID.None, because the array design is a file-only platform.Use position number. -
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
If the feature identifiers may be affect by case sensitivity at the database level or not.private final String
Returned by the toString method.private final int
The integer value of this method.private static final Map<Integer,
FeatureIdentificationMethod> Maps an integer to a location. -
Constructor Summary
ModifierConstructorDescriptionprivate
FeatureIdentificationMethod
(int value, boolean caseInsensitive, String displayValue) Creates a new feature identification method. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return TRUE if this identification method can be case insensitive.static FeatureIdentificationMethod
fromValue
(int value) Get theFeatureIdentificationMethod
object when you know the integer code.(package private) abstract Object
getIdentifier
(FeatureData feature) Get the feature identifier for this method.(package private) abstract Object
getIdentifier
(RawData raw, String externalFeatureId) Get a feature identifier using this methodint
getValue()
Get the integer value that is used when storing the feature identification method to the database.toString()
static FeatureIdentificationMethod
Returns the enum constant of this class with the specified name.static FeatureIdentificationMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
None, because the array design is a file-only platform. -
COORDINATES
Use coordinates (block, metaGridX, metaGridY, row, column) -
POSITION
Use position number. -
FEATURE_ID
Use the external feature ID.
-
-
Field Details
-
valueMapping
Maps an integer to a location. -
value
private final int valueThe integer value of this method. -
displayValue
Returned by the toString method. -
caseInsensitive
private final boolean caseInsensitiveIf the feature identifiers may be affect by case sensitivity at the database level or not.
-
-
Constructor Details
-
FeatureIdentificationMethod
Creates a new feature identification method. Used internal only.- Parameters:
value
- The integer value of this location.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<FeatureIdentificationMethod>
-
fromValue
Get theFeatureIdentificationMethod
object when you know the integer code.- Parameters:
value
- The integer value.- Returns:
- The feature identification method for the integer value.
-
getValue
public int getValue()Get the integer value that is used when storing the feature identification method to the database.- Returns:
- The integer value for this method.
-
caseInsensitive
public boolean caseInsensitive()Return TRUE if this identification method can be case insensitive. Ie. because the identifier is a string object. In this case we must check if the database is case sensitive or not. If FALSE, case is not in issue, ie. because the identifier is not a string object.- See Also:
-
getIdentifier
Get the feature identifier for this method.- Parameters:
feature
- The feature to get the identifier for
-
getIdentifier
Get a feature identifier using this method- Parameters:
raw
- The raw data to pick coordinates/position fromexternalFeatureId
- The external feature ID, null can be used if not needed by this particular identification method
-