com.gisgraphy.helper
Enum FeatureClassCodeHelper

java.lang.Object
  extended by java.lang.Enum<FeatureClassCodeHelper>
      extended by com.gisgraphy.helper.FeatureClassCodeHelper
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FeatureClassCodeHelper>

public enum FeatureClassCodeHelper
extends java.lang.Enum<FeatureClassCodeHelper>

Provides some useful methods

Author:
David Masclet

Enum Constant Summary
P_PPL
          The city feature Code
P_PPLA
           
P_PPLA2
           
P_PPLA3
           
P_PPLA4
           
P_PPLC
           
P_PPLG
           
P_PPLL
           
P_PPLQ
           
P_PPLR
           
P_PPLS
           
P_PPLW
           
P_STLMT
           
 
Method Summary
static boolean is_Adm(java.lang.String featureClass, java.lang.String featureCode)
          Whether the feature code and the feature class are for Adm object It will return true if featureClass equals 'A' and featureCode is ADM1,ADM2,ADM3,ADM4. it is case sensitive and will retrun false for A.ADM.ADMD are not considered as ADM
static boolean isCity(java.lang.String featureClass, java.lang.String featureCode)
          Whether the feature code and the feature class are for City objects.
static boolean isCountry(java.lang.String featureClass, java.lang.String featureCode)
          Whether the feature code and the feature class are for Country object.
static FeatureClassCodeHelper valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FeatureClassCodeHelper[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

P_PPL

public static final FeatureClassCodeHelper P_PPL
The city feature Code


P_PPLA

public static final FeatureClassCodeHelper P_PPLA

P_PPLA2

public static final FeatureClassCodeHelper P_PPLA2

P_PPLA3

public static final FeatureClassCodeHelper P_PPLA3

P_PPLA4

public static final FeatureClassCodeHelper P_PPLA4

P_PPLC

public static final FeatureClassCodeHelper P_PPLC

P_PPLG

public static final FeatureClassCodeHelper P_PPLG

P_PPLL

public static final FeatureClassCodeHelper P_PPLL

P_PPLR

public static final FeatureClassCodeHelper P_PPLR

P_PPLS

public static final FeatureClassCodeHelper P_PPLS

P_STLMT

public static final FeatureClassCodeHelper P_STLMT

P_PPLQ

public static final FeatureClassCodeHelper P_PPLQ

P_PPLW

public static final FeatureClassCodeHelper P_PPLW
Method Detail

values

public static FeatureClassCodeHelper[] 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 (FeatureClassCodeHelper c : FeatureClassCodeHelper.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FeatureClassCodeHelper valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isCity

public static boolean isCity(java.lang.String featureClass,
                             java.lang.String featureCode)
Whether the feature code and the feature class are for City objects. This method is case sensitive : if you provide lower case feature Class or feature code it will return false.
If you provide null feature class or feature code it will return false.

Parameters:
featureClass - The feature class of the gisFeature
featureCode - The feature code of the gisFeature
Returns:
true if the featureClass="P" and the featurecode belongs to the FeatureClassCodeHelper Enum

isCountry

public static boolean isCountry(java.lang.String featureClass,
                                java.lang.String featureCode)
Whether the feature code and the feature class are for Country object. This method is case sensitive : if you provide lower case feature Class or Feature Code it will return false.
If you provide null featureClass or FeatureCode it will return false.

Parameters:
featureClass - The feature class to test
featureCode - The feature code to test
Returns:
true if the feature class and the feature code are for Country Object

is_Adm

public static boolean is_Adm(java.lang.String featureClass,
                             java.lang.String featureCode)
Whether the feature code and the feature class are for Adm object It will return true if featureClass equals 'A' and featureCode is ADM1,ADM2,ADM3,ADM4. it is case sensitive and will retrun false for A.ADM.ADMD are not considered as ADM

Parameters:
featureClass - The feature class to test
featureCode - The feature code to test
Returns:
true if the feature class and the feature code are for Adm Object


Copyright © 2010. All Rights Reserved.