Package org.gbif.api.vocabulary
Enum Country
- java.lang.Object
-
- java.lang.Enum<Country>
-
- org.gbif.api.vocabulary.Country
-
- All Implemented Interfaces:
Serializable,Comparable<Country>
public enum Country extends Enum<Country>
An enumeration for all current ISO 3166-1 Alpha-2 and Alpha-3 country codes.
Formerly used codes are not included.
All unused user assigned codes (e.g. XX and QS) are mapped to the single enum USER_DEFINED.
Titles are taken from the ISO standard short name in all cases.
GBIF Regions are based on IPBES regions, also available as a CSV list.
The source for GBIF Regions is the participant entities in the GBIF Directory, which are synchronized with
Nodes in the Registry. They are also recorded here, to provide regions for countries/territories that are not GBIF members.The regions follow IPBES regions, except for Antarctic territories, as there was no IPBES report for these.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCountry.IsoDeserializerDeserializes the value from a 2-letter ISO format.static classCountry.IsoSerializerSerializes the value in a 2-letter ISO format.static classCountry.TitleDeserializerDeserializes the value from an English country title exactly as given by the enumeration.static classCountry.TitleSerializerSerializes the value as the English country title.
-
Enum Constant Summary
Enum Constants Enum Constant Description AFGHANISTANAfghanistan.ALAND_ISLANDSÅland Islands.ALBANIAAlbania.ALGERIAAlgeria.AMERICAN_SAMOAAmerican Samoa.ANDORRAAndorra.ANGOLAAngola.ANGUILLAAnguilla.ANTARCTICAAntarctica.ANTIGUA_BARBUDAAntigua and Barbuda.ARGENTINAArgentina.ARMENIAArmenia.ARUBAAruba.AUSTRALIAAustralia.AUSTRIAAustria.AZERBAIJANAzerbaijan.BAHAMASBahamas.BAHRAINBahrain.BANGLADESHBangladesh.BARBADOSBarbados.BELARUSBelarus.BELGIUMBelgium.BELIZEBelize.BENINBenin.BERMUDABermuda.BHUTANBhutan.BOLIVIABolivia (Plurinational State of).BONAIRE_SINT_EUSTATIUS_SABABonaire, Sint Eustatius and Saba.BOSNIA_HERZEGOVINABosnia and Herzegovina.BOTSWANABotswana.BOUVET_ISLANDBouvet Island.BRAZILBrazil.BRITISH_INDIAN_OCEAN_TERRITORYBritish Indian Ocean Territory.BRUNEI_DARUSSALAMBrunei Darussalam.BULGARIABulgaria.BURKINA_FASOBurkina Faso.BURUNDIBurundi.CAMBODIACambodia.CAMEROONCameroon.CANADACanada.CAPE_VERDECabo Verde.CAYMAN_ISLANDSCayman Islands.CENTRAL_AFRICAN_REPUBLICCentral African Republic.CHADChad.CHILEChile.CHINAChina.CHRISTMAS_ISLANDChristmas Island.COCOS_ISLANDSCocos (Keeling) Islands.COLOMBIAColombia.COMOROSComoros.CONGOCongo, Republic of the.CONGO_DEMOCRATIC_REPUBLICCongo, Democratic Republic of the.COOK_ISLANDSCook Islands.COSTA_RICACosta Rica.CÔTE_DIVOIRECôte d’Ivoire.CROATIACroatia.CUBACuba.CURAÇAOCuraçao.CYPRUSCyprus.CZECH_REPUBLICCzechia.DENMARKDenmark.DJIBOUTIDjibouti.DOMINICADominica.DOMINICAN_REPUBLICDominican Republic.ECUADOREcuador.EGYPTEgypt.EL_SALVADOREl Salvador.EQUATORIAL_GUINEAEquatorial Guinea.ERITREAEritrea.ESTONIAEstonia.ETHIOPIAEthiopia.FALKLAND_ISLANDSFalkland Islands (Malvinas).FAROE_ISLANDSFaroe Islands.FIJIFiji.FINLANDFinland.FRANCEFrance.FRENCH_GUIANAFrench Guiana.FRENCH_POLYNESIAFrench Polynesia.FRENCH_SOUTHERN_TERRITORIESFrench Southern Territories.GABONGabon.GAMBIAGambia.GEORGIAGeorgia.GERMANYGermany.GHANAGhana.GIBRALTARGibraltar.GREECEGreece.GREENLANDGreenland.GRENADAGrenada.GUADELOUPEGuadeloupe.GUAMGuam.GUATEMALAGuatemala.GUERNSEYGuernsey.GUINEAGuinea.GUINEA_BISSAUGuinea-Bissau.GUYANAGuyana.HAITIHaiti.HEARD_MCDONALD_ISLANDSHeard Island and McDonald Islands.HONDURASHonduras.HONG_KONGHong Kong.HUNGARYHungary.ICELANDIceland.INDIAIndia.INDONESIAIndonesia.INTERNATIONAL_WATERSTaken from {@link UN/LOCODE}IRANIran (Islamic Republic of).IRAQIraq.IRELANDIreland.ISLE_OF_MANIsle of Man.ISRAELIsrael.ITALYItaly.JAMAICAJamaica.JAPANJapan.JERSEYJersey.JORDANJordan.KAZAKHSTANKazakhstan.KENYAKenya.KIRIBATIKiribati.KOREA_NORTHKorea (Democratic People’s Republic of).KOREA_SOUTHKorea, Republic of.KOSOVOKosovo.KUWAITKuwait.KYRGYZSTANKyrgyzstan.LAOLao People’s Democratic Republic.LATVIALatvia.LEBANONLebanon.LESOTHOLesotho.LIBERIALiberia.LIBYALibya.LIECHTENSTEINLiechtenstein.LITHUANIALithuania.LUXEMBOURGLuxembourg.MACAOMacao.MACEDONIANorth Macedonia.MADAGASCARMadagascar.MALAWIMalawi.MALAYSIAMalaysia.MALDIVESMaldives.MALIMali.MALTAMalta.MARSHALL_ISLANDSMarshall Islands.MARTINIQUEMartinique.MAURITANIAMauritania.MAURITIUSMauritius.MAYOTTEMayotte.MEXICOMexico.MICRONESIAMicronesia (Federated States of).MOLDOVAMoldova, Republic of.MONACOMonaco.MONGOLIAMongolia.MONTENEGROMontenegro.MONTSERRATMontserrat.MOROCCOMorocco.MOZAMBIQUEMozambique.MYANMARMyanmar.NAMIBIANamibia.NAURUNauru.NEPALNepal.NETHERLANDSNetherlands.NEW_CALEDONIANew Caledonia.NEW_ZEALANDNew Zealand.NICARAGUANicaragua.NIGERNiger.NIGERIANigeria.NIUENiue.NORFOLK_ISLANDNorfolk Island.NORTHERN_MARIANA_ISLANDSNorthern Mariana Islands.NORWAYNorway.OMANOman.PAKISTANPakistan.PALAUPalau.PALESTINIAN_TERRITORYPalestine, State of.PANAMAPanama.PAPUA_NEW_GUINEAPapua New Guinea.PARAGUAYParaguay.PERUPeru.PHILIPPINESPhilippines.PITCAIRNPitcairn.POLANDPoland.PORTUGALPortugal.PUERTO_RICOPuerto Rico.QATARQatar.RÉUNIONRéunion.ROMANIARomania.RUSSIAN_FEDERATIONRussian Federation.RWANDARwanda.SAINT_BARTHÉLEMYSaint Barthélemy.SAINT_HELENA_ASCENSION_TRISTAN_DA_CUNHASaint Helena, Ascension and Tristan da Cunha.SAINT_KITTS_NEVISSaint Kitts and Nevis.SAINT_LUCIASaint Lucia.SAINT_MARTIN_FRENCHSaint Martin (French part).SAINT_PIERRE_MIQUELONSaint Pierre and Miquelon.SAINT_VINCENT_GRENADINESSaint Vincent and the Grenadines.SAMOASamoa.SAN_MARINOSan Marino.SAO_TOME_PRINCIPESao Tome and Principe.SAUDI_ARABIASaudi Arabia.SENEGALSenegal.SERBIASerbia.SEYCHELLESSeychelles.SIERRA_LEONESierra Leone.SINGAPORESingapore.SINT_MAARTENSint Maarten (Dutch part).SLOVAKIASlovakia.SLOVENIASlovenia.SOLOMON_ISLANDSSolomon Islands.SOMALIASomalia.SOUTH_AFRICASouth Africa.SOUTH_GEORGIA_SANDWICH_ISLANDSSouth Georgia and the South Sandwich Islands.SOUTH_SUDANSouth Sudan.SPAINSpain.SRI_LANKASri Lanka.SUDANSudan.SURINAMESuriname.SVALBARD_JAN_MAYENSvalbard and Jan Mayen.SWAZILANDSwaziland.SWEDENSweden.SWITZERLANDSwitzerland.SYRIASyrian Arab Republic.TAIWANTaiwan, Province of China.TAJIKISTANTajikistan.TANZANIATanzania, United Republic of.THAILANDThailand.TIMOR_LESTETimor-Leste.TOGOTogo.TOKELAUTokelau.TONGATonga.TRINIDAD_TOBAGOTrinidad and Tobago.TUNISIATunisia.TURKEYTürkiye.TURKMENISTANTurkmenistan.TURKS_CAICOS_ISLANDSTurks and Caicos Islands.TUVALUTuvalu.UGANDAUganda.UKRAINEUkraine.UNITED_ARAB_EMIRATESUnited Arab Emirates.UNITED_KINGDOMUnited Kingdom of Great Britain and Northern Ireland.UNITED_STATESUnited States of America.UNITED_STATES_OUTLYING_ISLANDSUnited States Minor Outlying Islands.UNKNOWNUnknown or Invalid territory.URUGUAYUruguay.USER_DEFINEDBucket for all user defined codes not managed by GBIF.UZBEKISTANUzbekistan.VANUATUVanuatu.VATICANHoly See.VENEZUELAVenezuela (Bolivarian Republic of).VIETNAMViet Nam.VIRGIN_ISLANDSVirgin Islands, (U.S.).VIRGIN_ISLANDS_BRITISHVirgin Islands (British).WALLIS_FUTUNAWallis and Futuna.WESTERN_SAHARAWestern Sahara.YEMENYemen.ZAMBIAZambia.ZIMBABWEZimbabwe.
-
Field Summary
Fields Modifier and Type Field Description static Set<String>CUSTOM_CODESA set of all 2- and 3-letter codes that are reserved by ISO for custom application specific usages.static List<Country>OFFICIAL_COUNTRIES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CountryfromIsoCode(String code)GbifRegiongetGbifRegion()StringgetIso2LetterCode()StringgetIso3LetterCode()IntegergetIsoNumericalCode()StringgetTitle()static booleanisCustomCode(String code)booleanisOfficial()Note this includes Kosovo (XK).static CountryvalueOf(String name)Returns the enum constant of this type with the specified name.static Country[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AFGHANISTAN
public static final Country AFGHANISTAN
Afghanistan.
-
ALAND_ISLANDS
public static final Country ALAND_ISLANDS
Åland Islands.
-
AMERICAN_SAMOA
public static final Country AMERICAN_SAMOA
American Samoa.
-
ANTARCTICA
public static final Country ANTARCTICA
Antarctica.
-
ANTIGUA_BARBUDA
public static final Country ANTIGUA_BARBUDA
Antigua and Barbuda.
-
AZERBAIJAN
public static final Country AZERBAIJAN
Azerbaijan.
-
BANGLADESH
public static final Country BANGLADESH
Bangladesh.
-
BONAIRE_SINT_EUSTATIUS_SABA
public static final Country BONAIRE_SINT_EUSTATIUS_SABA
Bonaire, Sint Eustatius and Saba.
-
BOSNIA_HERZEGOVINA
public static final Country BOSNIA_HERZEGOVINA
Bosnia and Herzegovina.
-
BOUVET_ISLAND
public static final Country BOUVET_ISLAND
Bouvet Island.
-
BRITISH_INDIAN_OCEAN_TERRITORY
public static final Country BRITISH_INDIAN_OCEAN_TERRITORY
British Indian Ocean Territory.
-
BRUNEI_DARUSSALAM
public static final Country BRUNEI_DARUSSALAM
Brunei Darussalam.
-
BURKINA_FASO
public static final Country BURKINA_FASO
Burkina Faso.
-
CAPE_VERDE
public static final Country CAPE_VERDE
Cabo Verde.
-
CAYMAN_ISLANDS
public static final Country CAYMAN_ISLANDS
Cayman Islands.
-
CENTRAL_AFRICAN_REPUBLIC
public static final Country CENTRAL_AFRICAN_REPUBLIC
Central African Republic.
-
CHRISTMAS_ISLAND
public static final Country CHRISTMAS_ISLAND
Christmas Island.
-
COCOS_ISLANDS
public static final Country COCOS_ISLANDS
Cocos (Keeling) Islands.
-
CONGO_DEMOCRATIC_REPUBLIC
public static final Country CONGO_DEMOCRATIC_REPUBLIC
Congo, Democratic Republic of the.
-
COOK_ISLANDS
public static final Country COOK_ISLANDS
Cook Islands.
-
COSTA_RICA
public static final Country COSTA_RICA
Costa Rica.
-
CÔTE_DIVOIRE
public static final Country CÔTE_DIVOIRE
Côte d’Ivoire.
-
CZECH_REPUBLIC
public static final Country CZECH_REPUBLIC
Czechia.
-
DOMINICAN_REPUBLIC
public static final Country DOMINICAN_REPUBLIC
Dominican Republic.
-
EL_SALVADOR
public static final Country EL_SALVADOR
El Salvador.
-
EQUATORIAL_GUINEA
public static final Country EQUATORIAL_GUINEA
Equatorial Guinea.
-
FALKLAND_ISLANDS
public static final Country FALKLAND_ISLANDS
Falkland Islands (Malvinas).
-
FAROE_ISLANDS
public static final Country FAROE_ISLANDS
Faroe Islands.
-
FRENCH_GUIANA
public static final Country FRENCH_GUIANA
French Guiana.
-
FRENCH_POLYNESIA
public static final Country FRENCH_POLYNESIA
French Polynesia.
-
FRENCH_SOUTHERN_TERRITORIES
public static final Country FRENCH_SOUTHERN_TERRITORIES
French Southern Territories.
-
GUADELOUPE
public static final Country GUADELOUPE
Guadeloupe.
-
GUINEA_BISSAU
public static final Country GUINEA_BISSAU
Guinea-Bissau.
-
HEARD_MCDONALD_ISLANDS
public static final Country HEARD_MCDONALD_ISLANDS
Heard Island and McDonald Islands.
-
ISLE_OF_MAN
public static final Country ISLE_OF_MAN
Isle of Man.
-
KAZAKHSTAN
public static final Country KAZAKHSTAN
Kazakhstan.
-
KOREA_NORTH
public static final Country KOREA_NORTH
Korea (Democratic People’s Republic of).
-
KOREA_SOUTH
public static final Country KOREA_SOUTH
Korea, Republic of.
-
KYRGYZSTAN
public static final Country KYRGYZSTAN
Kyrgyzstan.
-
LIECHTENSTEIN
public static final Country LIECHTENSTEIN
Liechtenstein.
-
LUXEMBOURG
public static final Country LUXEMBOURG
Luxembourg.
-
MADAGASCAR
public static final Country MADAGASCAR
Madagascar.
-
MARSHALL_ISLANDS
public static final Country MARSHALL_ISLANDS
Marshall Islands.
-
MARTINIQUE
public static final Country MARTINIQUE
Martinique.
-
MAURITANIA
public static final Country MAURITANIA
Mauritania.
-
MICRONESIA
public static final Country MICRONESIA
Micronesia (Federated States of).
-
MONTENEGRO
public static final Country MONTENEGRO
Montenegro.
-
MONTSERRAT
public static final Country MONTSERRAT
Montserrat.
-
MOZAMBIQUE
public static final Country MOZAMBIQUE
Mozambique.
-
NETHERLANDS
public static final Country NETHERLANDS
Netherlands.
-
NEW_CALEDONIA
public static final Country NEW_CALEDONIA
New Caledonia.
-
NEW_ZEALAND
public static final Country NEW_ZEALAND
New Zealand.
-
NORFOLK_ISLAND
public static final Country NORFOLK_ISLAND
Norfolk Island.
-
NORTHERN_MARIANA_ISLANDS
public static final Country NORTHERN_MARIANA_ISLANDS
Northern Mariana Islands.
-
PALESTINIAN_TERRITORY
public static final Country PALESTINIAN_TERRITORY
Palestine, State of.
-
PAPUA_NEW_GUINEA
public static final Country PAPUA_NEW_GUINEA
Papua New Guinea.
-
PHILIPPINES
public static final Country PHILIPPINES
Philippines.
-
PUERTO_RICO
public static final Country PUERTO_RICO
Puerto Rico.
-
RUSSIAN_FEDERATION
public static final Country RUSSIAN_FEDERATION
Russian Federation.
-
SAINT_BARTHÉLEMY
public static final Country SAINT_BARTHÉLEMY
Saint Barthélemy.
-
SAINT_HELENA_ASCENSION_TRISTAN_DA_CUNHA
public static final Country SAINT_HELENA_ASCENSION_TRISTAN_DA_CUNHA
Saint Helena, Ascension and Tristan da Cunha.
-
SAINT_KITTS_NEVIS
public static final Country SAINT_KITTS_NEVIS
Saint Kitts and Nevis.
-
SAINT_LUCIA
public static final Country SAINT_LUCIA
Saint Lucia.
-
SAINT_MARTIN_FRENCH
public static final Country SAINT_MARTIN_FRENCH
Saint Martin (French part).
-
SAINT_PIERRE_MIQUELON
public static final Country SAINT_PIERRE_MIQUELON
Saint Pierre and Miquelon.
-
SAINT_VINCENT_GRENADINES
public static final Country SAINT_VINCENT_GRENADINES
Saint Vincent and the Grenadines.
-
SAN_MARINO
public static final Country SAN_MARINO
San Marino.
-
SAO_TOME_PRINCIPE
public static final Country SAO_TOME_PRINCIPE
Sao Tome and Principe.
-
SAUDI_ARABIA
public static final Country SAUDI_ARABIA
Saudi Arabia.
-
SEYCHELLES
public static final Country SEYCHELLES
Seychelles.
-
SIERRA_LEONE
public static final Country SIERRA_LEONE
Sierra Leone.
-
SINT_MAARTEN
public static final Country SINT_MAARTEN
Sint Maarten (Dutch part).
-
SOLOMON_ISLANDS
public static final Country SOLOMON_ISLANDS
Solomon Islands.
-
SOUTH_AFRICA
public static final Country SOUTH_AFRICA
South Africa.
-
SOUTH_GEORGIA_SANDWICH_ISLANDS
public static final Country SOUTH_GEORGIA_SANDWICH_ISLANDS
South Georgia and the South Sandwich Islands.
-
SOUTH_SUDAN
public static final Country SOUTH_SUDAN
South Sudan.
-
SVALBARD_JAN_MAYEN
public static final Country SVALBARD_JAN_MAYEN
Svalbard and Jan Mayen.
-
SWITZERLAND
public static final Country SWITZERLAND
Switzerland.
-
TAJIKISTAN
public static final Country TAJIKISTAN
Tajikistan.
-
TIMOR_LESTE
public static final Country TIMOR_LESTE
Timor-Leste.
-
TRINIDAD_TOBAGO
public static final Country TRINIDAD_TOBAGO
Trinidad and Tobago.
-
TURKMENISTAN
public static final Country TURKMENISTAN
Turkmenistan.
-
TURKS_CAICOS_ISLANDS
public static final Country TURKS_CAICOS_ISLANDS
Turks and Caicos Islands.
-
UNITED_ARAB_EMIRATES
public static final Country UNITED_ARAB_EMIRATES
United Arab Emirates.
-
UNITED_KINGDOM
public static final Country UNITED_KINGDOM
United Kingdom of Great Britain and Northern Ireland.
-
UNITED_STATES
public static final Country UNITED_STATES
United States of America.
-
UNITED_STATES_OUTLYING_ISLANDS
public static final Country UNITED_STATES_OUTLYING_ISLANDS
United States Minor Outlying Islands.
-
UZBEKISTAN
public static final Country UZBEKISTAN
Uzbekistan.
-
VIRGIN_ISLANDS_BRITISH
public static final Country VIRGIN_ISLANDS_BRITISH
Virgin Islands (British).
-
VIRGIN_ISLANDS
public static final Country VIRGIN_ISLANDS
Virgin Islands, (U.S.).
-
WALLIS_FUTUNA
public static final Country WALLIS_FUTUNA
Wallis and Futuna.
-
WESTERN_SAHARA
public static final Country WESTERN_SAHARA
Western Sahara.
-
USER_DEFINED
public static final Country USER_DEFINED
Bucket for all user defined codes not managed by GBIF. User-assigned code elements are codes at the disposal of users who need to add further names of countries, territories, or other geographical entities to their in-house application of ISO 3166-1, and the ISO 3166/MA will never use these codes in the updating process of the standard. The following codes can be user-assigned: Alpha-2: AA, QM to QZ, XA to XZ, and ZZ Alpha-3: AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ Numeric: 900 to 999
-
KOSOVO
public static final Country KOSOVO
Kosovo. User-assigned temporary code, XK and XKX are the same as used by several other international organizations. 902 is assigned by GBIF, but these codes aren't used anywhere.
-
INTERNATIONAL_WATERS
public static final Country INTERNATIONAL_WATERS
Taken from {@link UN/LOCODE}
-
UNKNOWN
public static final Country UNKNOWN
Unknown or Invalid territory.See {@link Unicode Common Locale Data Repository}
-
-
Field Detail
-
CUSTOM_CODES
public static final Set<String> CUSTOM_CODES
A set of all 2- and 3-letter codes that are reserved by ISO for custom application specific usages. The following codes can be user-assigned: Alpha-2: AA, QM to QZ, XA to XZ, and ZZ Alpha-3: AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ
-
OFFICIAL_COUNTRIES
public static final List<Country> OFFICIAL_COUNTRIES
-
-
Method Detail
-
values
public static Country[] 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 (Country c : Country.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Country 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
-
isCustomCode
public static boolean isCustomCode(String code)
-
fromIsoCode
public static Country fromIsoCode(String code)
- Parameters:
code- the case-insensitive 2- or 3-letter codes- Returns:
- the matching country or null
-
getTitle
public String getTitle()
- Returns:
- the country name in the English language as maintained by ISO.
-
getIso2LetterCode
public String getIso2LetterCode()
- Returns:
- the 2-letter ISO 3166-1 ALPHA2 code in upper case.
-
getIso3LetterCode
public String getIso3LetterCode()
- Returns:
- the 3-letter ISO 3166-1 ALPHA3 code in upper case.
-
getIsoNumericalCode
public Integer getIsoNumericalCode()
- Returns:
- the numerical ISO 3166-1 code.
-
getGbifRegion
public GbifRegion getGbifRegion()
- Returns:
- the
GbifRegionassociated with thisCountry.
-
isOfficial
public boolean isOfficial()
Note this includes Kosovo (XK).- Returns:
- true if it's an ISO 3166-1 alpha2 code officially used by GBIF.
-
-