Enum FeatureIdentificationMethod

    • Field Detail

      • value

        private final int value
        The integer value of this method.
      • displayValue

        private final String displayValue
        Returned by the toString method.
      • caseInsensitive

        private final boolean caseInsensitive
        If the feature identifiers may be affect by case sensitivity at the database level or not.
    • Constructor Detail

      • FeatureIdentificationMethod

        private FeatureIdentificationMethod​(int value,
                                            boolean caseInsensitive,
                                            String displayValue)
        Creates a new feature identification method. Used internal only.
        Parameters:
        value - The integer value of this location.
    • Method Detail

      • values

        public static FeatureIdentificationMethod[] 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 (FeatureIdentificationMethod c : FeatureIdentificationMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FeatureIdentificationMethod 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 name
        NullPointerException - if the argument is null
      • fromValue

        public static FeatureIdentificationMethod fromValue​(int value)
        Get the FeatureIdentificationMethod 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:
        DbEngine.caseInsensitiveComparison()
      • getIdentifier

        abstract Object getIdentifier​(FeatureData feature)
        Get the feature identifier for this method.
        Parameters:
        feature - The feature to get the identifier for
      • getIdentifier

        abstract Object getIdentifier​(RawData raw,
                                      String externalFeatureId)
        Get a feature identifier using this method
        Parameters:
        raw - The raw data to pick coordinates/position from
        externalFeatureId - The external feature ID, null can be used if not needed by this particular identification method