|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gisgraphy.domain.geoloc.entity.GisFeature
com.gisgraphy.domain.geoloc.entity.Country
public class Country
A Country (as defined by ISO 3166). A country always has an ISO 3166 alpha-2, alpha-3 and numeric code, but may, or may not have other names (FIPS, etc). The list of countries has been imported from Geonames Country List. Codes are written in upper case !
Field Summary |
---|
Fields inherited from class com.gisgraphy.domain.geoloc.entity.GisFeature |
---|
countryDao, LOCATION_COLUMN_NAME, logger |
Constructor Summary | |
---|---|
Country()
Default constructor (Needed by CGLib) |
|
Country(GisFeature gisFeature)
Constructor that populate the Country with the gisFeature fields |
|
Country(java.lang.String iso3166Alpha2Code,
java.lang.String iso3166Alpha3Code,
int iso3166NumericCode)
Construct a country with the iso 3166 alpha-2 code, iso 3166 alpha-3 code, and iso 3166 numeric code |
Method Summary | |
---|---|
void |
addSpokenLanguage(Language lang)
Add a spoken language to the country. |
void |
addSpokenLanguages(java.util.List<Language> languages)
|
int |
compareTo(Country country)
compare the name of the country |
boolean |
equals(java.lang.Object obj)
|
java.lang.Double |
getArea()
Country area in square Km |
java.lang.String |
getCapitalName()
Get the capital for this country |
java.lang.String |
getContinent()
Returns The name of the continent this country belongs to |
java.util.Currency |
getCurrency()
Returns the ISO 4217 Currency from the currency code. |
java.lang.String |
getCurrencyCode()
ISO 4217 currency code when possible. |
java.lang.String |
getCurrencyName()
Returns The name of the currency for this country. |
java.lang.String |
getEquivalentFipsCode()
This field is not supported yet. |
java.lang.String |
getFipsCode()
The FIPS 10.4 country code. |
java.lang.String |
getIso3166Alpha2Code()
The ISO 3166 alpha-2 letter code(should be in upper case). |
java.lang.String |
getIso3166Alpha3Code()
The ISO 3166 alpha-3 letter code (should be in upper case) |
int |
getIso3166NumericCode()
|
java.lang.String |
getPhonePrefix()
The Phone Prefix (e.g : 33..) without '+' |
java.lang.String |
getPostalCodeMask()
|
java.lang.String |
getPostalCodeRegex()
Returns The regexp that every Zipcode for this country matches. it is useful to test if a zipcode is valid. this field is imported from file and is not tested. |
java.util.List<Language> |
getSpokenLanguages()
All language spoken in this Country. |
java.lang.String |
getTld()
Returns the top level domain for this country with the starting point. |
int |
hashCode()
|
void |
setArea(java.lang.Double area)
|
void |
setCapitalName(java.lang.String capitalName)
|
void |
setContinent(java.lang.String continent)
|
void |
setCurrencyCode(java.lang.String currencyCode)
Set the currency code for this country |
void |
setCurrencyName(java.lang.String currencyName)
|
void |
setEquivalentFipsCode(java.lang.String equivalentFipsCode)
|
void |
setFipsCode(java.lang.String fipsCode)
|
void |
setIso3166Alpha2Code(java.lang.String isoCode)
Set the iso3166 alpha-2 code. |
void |
setIso3166Alpha3Code(java.lang.String iso3166Alpha3Code)
Note : The code will be automaticaly uppercased |
void |
setIso3166NumericCode(int iso3166NumericCode)
|
void |
setPhonePrefix(java.lang.String phonePrefix)
|
void |
setPostalCodeMask(java.lang.String postalCodeMask)
|
void |
setPostalCodeRegex(java.lang.String postalCodeRegex)
|
void |
setSpokenLanguages(java.util.List<Language> languages)
|
void |
setTld(java.lang.String tld)
|
Methods inherited from class com.gisgraphy.domain.geoloc.entity.GisFeature |
---|
addAlternateName, addAlternateNames, addZipCode, addZipCodes, distanceTo, getAdm, getAdm1Code, getAdm1Name, getAdm2Code, getAdm2Name, getAdm3Code, getAdm3Name, getAdm4Code, getAdm4Name, getAlternateNames, getAsciiName, getCountry, getCountryCode, getElevation, getFeatureClass, getFeatureCode, getFeatureId, getFullyQualifiedName, getFullyQualifiedName, getGtopo30, getId, getLatitude, getLocation, getLongitude, getModificationDate, getName, getPopulation, getSource, getTimezone, getZipCodes, isAdm, isCity, isCountry, isFullTextSearchable, populate, setAdm, setAdm1Code, setAdm1Name, setAdm2Code, setAdm2Name, setAdm3Code, setAdm3Name, setAdm4Code, setAdm4Name, setAlternateNames, setAsciiName, setCountryCode, setElevation, setFeatureClass, setFeatureCode, setFeatureId, setGtopo30, setId, setLocation, setModificationDate, setName, setPopulation, setSource, setTimezone, setZipCodes, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Country(GisFeature gisFeature)
Country
with the gisFeature fields
gisFeature
- The gisFeature from which we want to populate the
Countrypublic Country()
public Country(java.lang.String iso3166Alpha2Code, java.lang.String iso3166Alpha3Code, int iso3166NumericCode)
iso3166Alpha2Code
- The iso 3166 alpha 2 code for this Countryiso3166Alpha3Code
- The iso 3166 alpha3 code for this Countryiso3166NumericCode
- The iso 3166 numeric code for this Country NOTE : The
iso3166AlphaX codes will be automatically uppercasedMethod Detail |
---|
public void addSpokenLanguage(Language lang)
lang
- public boolean equals(java.lang.Object obj)
equals
in class GisFeature
public java.lang.Double getArea()
public java.util.Currency getCurrency()
Currency.getInstance(java.util.Locale)
Important : some
currencies are NOT recognized by
Currency.getInstance(java.util.Locale)
.
public java.lang.String getCurrencyCode()
public java.lang.String getEquivalentFipsCode()
public java.lang.String getFipsCode()
public java.lang.String getIso3166Alpha2Code()
public java.lang.String getIso3166Alpha3Code()
public int getIso3166NumericCode()
public java.lang.String getPhonePrefix()
public java.lang.String getPostalCodeMask()
public java.util.List<Language> getSpokenLanguages()
Language
spoken in this CountryLanguage
public int hashCode()
hashCode
in class GisFeature
public void setArea(java.lang.Double area)
area
- getArea()
public void setCurrencyCode(java.lang.String currencyCode)
currencyCode
- The currencyCode to setgetCurrencyCode()
public void setEquivalentFipsCode(java.lang.String equivalentFipsCode)
equivalentFipsCode
- getEquivalentFipsCode()
public void setFipsCode(java.lang.String fipsCode)
fipsCode
- The fipsCode to set.getFipsCode()
public void setIso3166Alpha2Code(java.lang.String isoCode)
isoCode
- The iso3166 alpha-2 code to set in upper case.getIso3166Alpha2Code()
public void setIso3166Alpha3Code(java.lang.String iso3166Alpha3Code)
iso3166Alpha3Code
- The iso3166Alpha3Code to set (in upper case).getIso3166Alpha3Code()
public void setIso3166NumericCode(int iso3166NumericCode)
iso3166NumericCode
- The iso 3166 numeric code to set.getIso3166NumericCode()
public void setPhonePrefix(java.lang.String phonePrefix)
phonePrefix
- getPhonePrefix()
public void setPostalCodeMask(java.lang.String postalCodeMask)
postalCodeMask
- getPostalCodeMask()
public void setSpokenLanguages(java.util.List<Language> languages)
languages
- getSpokenLanguages()
public void addSpokenLanguages(java.util.List<Language> languages)
languages
- getSpokenLanguages()
public java.lang.String getCapitalName()
public void setCapitalName(java.lang.String capitalName)
getCapitalName()
public java.lang.String getContinent()
public void setContinent(java.lang.String continent)
getContinent()
public java.lang.String getCurrencyName()
public void setCurrencyName(java.lang.String currencyName)
getCurrencyName()
public java.lang.String getPostalCodeRegex()
getPostalCodeMask()
public void setPostalCodeRegex(java.lang.String postalCodeRegex)
getPostalCodeRegex()
public java.lang.String getTld()
public void setTld(java.lang.String tld)
getTld()
public int compareTo(Country country)
compareTo
in interface java.lang.Comparable<Country>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |