Selaa lähdekoodia

Added getCountry(PropertyValue)


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197668 13f79535-47bb-0310-9956-ffa450edef68
tags/Defoe_export
Peter Bernard West 20 vuotta sitten
vanhempi
commit
c0ebfaf6d7
1 muutettua tiedostoa jossa 17 lisäystä ja 1 poistoa
  1. 17
    1
      src/java/org/apache/fop/datatypes/CountryType.java

+ 17
- 1
src/java/org/apache/fop/datatypes/CountryType.java Näytä tiedosto

@@ -55,12 +55,28 @@ public class CountryType extends NCName {
}

/**
* @return the <tt>String</tt> country code.
* Gets the ISO 3166 country code
* @return the country code
*/
public String getCountry() {
return string;
}

/**
* Gets the ISO 3166 country code from a PropertyValue
* @param pv the property value
* @return the country code
* @exception PropertyException if the <code>PropertyValue</code> is not
* a <code>CountryType</code>
*/
public static String getCountry(PropertyValue pv)
throws PropertyException {
if (pv.getType() == PropertyValue.COUNTRY) {
return ((CountryType)pv).getCountry();
}
throw new PropertyException("PropertyValue not an COUNTRY type");
}

/**
* Validate the <i>CountryType</i> against the associated property.
*/

Loading…
Peruuta
Tallenna