You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2004/05/30 08:31:48 UTC
cvs commit: xml-fop/src/java/org/apache/fop/datatypes CountryType.java
pbwest 2004/05/29 23:31:48
Modified: src/java/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
CountryType.java
Log:
Added getCountry(PropertyValue)
Revision Changes Path
No revision
No revision
1.1.2.3 +20 -4 xml-fop/src/java/org/apache/fop/datatypes/Attic/CountryType.java
Index: CountryType.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Attic/CountryType.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- CountryType.java 19 Feb 2004 03:11:55 -0000 1.1.2.2
+++ CountryType.java 30 May 2004 06:31:48 -0000 1.1.2.3
@@ -55,10 +55,26 @@
}
/**
- * @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");
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org