www.element4solution.com

e4s.application
Class CountryCode

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4String
          extended by e4s.application.CountryCode
All Implemented Interfaces:
java.lang.Comparable

public class CountryCode
extends E4String

ISO Country-Code datatype and definitions.

See Also:
E4ApplObj_Intf.getCountryCode(), E4ModuleImplementation.getCountryCode(), E4ServletImplementation_Intf.getCountryCode(), T_E4S_CLIENT_Sel.get_COUNTRY(), Language, http://sourceforge.net/projects/flags/ http://www.w3.org/WAI/ER/IG/ert/iso639.htm http://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste http://earth-info.nga.mil/gns/html/namefiles.htm

Nested Class Summary
static class CountryCode.COUNTRY
           
 
Field Summary
static E4DBColumnType _DATATYPE
           
static int LEN
           
 
Fields inherited from class e4s.util.E4String
CLASSNAME, m_maxsize, m_nullable, m_string
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
CountryCode()
           
CountryCode(char[] initval)
           
CountryCode(E4String initval)
           
CountryCode(java.lang.String initval)
           
CountryCode(java.lang.StringBuffer initval)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
static CountryCode findISO3166A3(java.lang.String codeA3)
          Get the associated 3character ISO3166 code for a specified country code.
static CountryCode.COUNTRY[] getCountries()
          Get an array of country definitions - including ISO code, name and flag if defined.
 java.lang.String getCountryCode()
          Get the county code, same as E4String.getString().
static E4SelectValues getCountrySelection()
          Get a country selection (all countries)
static E4SelectValues getCountrySelection(boolean euOnly)
           
static E4SelectValues getCountrySelection(CountryCode[] filtered)
          Get a country selection for all the countries listed in the specified array.
 IMG getFlag()
          Get the flag associated with this country code.
static IMG getFlag(CountryCode code)
          Get the associated english name for a country code.
static java.lang.String getISO3166A3(CountryCode code)
          Get the associated 3character ISO3166 code for a specified country code.
 E4Label_Intf getName()
          Get the name associated with this country code.
static E4Label_Intf getName(CountryCode code)
          Get the associated english name for a country code.
static E4DBTypeUsage[] getUsage()
          Returns null, only for compatibility reasons.
static void init()
           
 boolean isValid()
           
 boolean memberEU()
          Check, if the country is political member of European Union.
static boolean memberEU(CountryCode code)
          Get a country selection
static CountryCode newInstance(java.lang.String string)
          Make an instance of a country code or return null if the specified value is null.
 
Methods inherited from class e4s.util.E4String
_equals, charAt, clone, compareTo, compareTo, compareTo, compareToIgnoreCase, compareToIgnoreCase, concat, concat, concat, concat, concat, cut, cut, endsWith, endsWith, equals, equals, equalsIgnoreCase, equalsIgnoreCase, fixed, fixedRight, getMaxSize, getNullable, getString, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, left, left, length, matches, matchesIgnoreCase, regionMatches, regionMatches, regionMatches, regionMatches, remove, removeSpaces, removeSpaces, replace, replace, replace, replace, replace, replaceIgnoreCase, right, right, setMaxSize, setNullable, setString, startsWith, startsWith, startsWith, startsWith, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trim, validate
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LEN

public static final int LEN
See Also:
Constant Field Values

_DATATYPE

public static final E4DBColumnType _DATATYPE
Constructor Detail

CountryCode

public CountryCode()

CountryCode

public CountryCode(java.lang.String initval)

CountryCode

public CountryCode(E4String initval)

CountryCode

public CountryCode(java.lang.StringBuffer initval)

CountryCode

public CountryCode(char[] initval)
Method Detail

getName

public static E4Label_Intf getName(CountryCode code)
Get the associated english name for a country code.

Parameters:
code - the country-code which name is required

getISO3166A3

public static java.lang.String getISO3166A3(CountryCode code)
Get the associated 3character ISO3166 code for a specified country code.

Parameters:
code - the country-code which name is required

findISO3166A3

public static CountryCode findISO3166A3(java.lang.String codeA3)
Get the associated 3character ISO3166 code for a specified country code.

Parameters:
code - the country-code which name is required

getFlag

public static IMG getFlag(CountryCode code)
Get the associated english name for a country code.

Parameters:
code - the country-code which name is required

getCountrySelection

public static E4SelectValues getCountrySelection()
Get a country selection (all countries)

Returns:
a Vector of E4SelectValues.OPTION elements.
See Also:
getCountrySelection(boolean)

getCountrySelection

public static E4SelectValues getCountrySelection(CountryCode[] filtered)
Get a country selection for all the countries listed in the specified array.

Parameters:
filtered - an array of countries
Returns:
a Vector of E4SelectValues.OPTION elements.
See Also:
getCountrySelection(boolean), getCountrySelection()

getCountrySelection

public static E4SelectValues getCountrySelection(boolean euOnly)

memberEU

public static boolean memberEU(CountryCode code)
Get a country selection


init

public static void init()

getUsage

public static E4DBTypeUsage[] getUsage()
Returns null, only for compatibility reasons.

Returns:
null (always).

getCountryCode

public java.lang.String getCountryCode()
Get the county code, same as E4String.getString().

Returns:
the country code, e.g. "AT" for Austria.

getName

public E4Label_Intf getName()
Get the name associated with this country code.

Returns:
the name

memberEU

public boolean memberEU()
Check, if the country is political member of European Union.

Returns:
true, if the country is member of EU

getFlag

public IMG getFlag()
Get the flag associated with this country code. Note, not all Countries will have a valid flag definition.

Returns:
the flag (or null if not available)
See Also:
E4Images

getCountries

public static CountryCode.COUNTRY[] getCountries()
Get an array of country definitions - including ISO code, name and flag if defined.

Returns:
the array with countries

newInstance

public static CountryCode newInstance(java.lang.String string)
Make an instance of a country code or return null if the specified value is null.

Parameters:
string - the value
Returns:
null or a new CountryCode

isValid

public boolean isValid()

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com