Trovit/src/main/java/org/openestate/io/trovit/TrovitUtils.java
public static String printCountryValue(String value) {
        value = StringUtils.trimToNull(value);
        if (value == null)
            throw new IllegalArgumentException("Can't print empty country value!");
        if (value.length() != 2 && value.length() != 3)
            throw new IllegalArgumentException("Can't print country value '" + value + "' because it is neither an ISO-2-Code nor an ISO-3-Code!");

        return StringUtils.upperCase(value, Locale.ENGLISH);
    }
public static String printCountryValue(String value) {
        value = StringUtils.trimToNull(value);
        if (value == null)
            throw new IllegalArgumentException("Can't print empty country value!");
        if (value.length() != 2 && value.length() != 3)
            throw new IllegalArgumentException("Can't print country value '" + value + "' because it is neither an ISO-2-Code nor an ISO-3-Code!");

        return StringUtils.upperCase(value, Locale.ENGLISH);
    }
public static String printCountryValue ( String value ) { value = StringUtils . trimToNull ( value ) ; if ( value == null ) throw new IllegalArgumentException ( "Can't print empty country value!" ) ; if ( value . length ( ) != 2 && value . length ( ) != 3 ) throw new IllegalArgumentException ( "Can't print country value '" + value + "' because it is neither an ISO-2-Code nor an ISO-3-Code!" ) ; return StringUtils . upperCase ( value , Locale . ENGLISH ) ; }
Write a {@link String} value for a country code into XML output.
<p>
The country has to be represendet by a ISO-Code wirh two or three
characters.

@param value value to write
@return XML string
@throws IllegalArgumentException if a validation error occurred
Write a { @link String } value for a country code into XML output . <p > The country has to be represendet by a ISO - Code wirh two or three characters .