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/01/01 13:55:46 UTC
cvs commit: xml-fop/src/java/org/apache/fop/fo FObjectNames.java
pbwest 2004/01/01 04:55:46
Modified: src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
FObjectNames.java
Log:
foLocalNames made private.
foLocalNamesLength().
getFOPkg() added.
Revision Changes Path
No revision
No revision
1.1.2.2 +26 -6 xml-fop/src/java/org/apache/fop/fo/Attic/FObjectNames.java
Index: FObjectNames.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FObjectNames.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- FObjectNames.java 5 Jul 2003 19:26:05 -0000 1.1.2.1
+++ FObjectNames.java 1 Jan 2004 12:55:46 -0000 1.1.2.2
@@ -149,7 +149,7 @@
* <tt>int</tt> constants must be kept in sync with this array, as the
* constants are used to index into the array.
*/
- public static final String[][] foLocalNames = {
+ private static final String[][] foLocalNames = {
{ "no-fo", "" } //0
,{ "basic-link", "fo.flow" } //1
,{ "bidi-override", "fo.flow" } //2
@@ -209,6 +209,11 @@
,{ "wrapper", "fo.flow" } //56
,{ "pcdata", "fo.flow" } //57
};
+
+ /**
+ * Publicly visible length of the private foLocaNames array.
+ */
+ public static final int foLocalNamesLength = foLocalNames.length;
/**
* A HashMap whose elements are an integer index value keyed by an
@@ -249,12 +254,27 @@
* @exception FOPException if the FO index is invalid.
*/
public static String getFOName(int foType)
- throws FOPException
+ throws FOPException
{
if (foType < 0 || foType > LAST_FO)
- throw new FOPException
- ("getFOName: type is invalid: " + foType);
+ throw new FOPException
+ ("getFOName: type is invalid: " + foType);
return foLocalNames[foType][NAMEX];
+ }
+
+ /**
+ * Get the FObject package name corresponding to the FO index.
+ * @param foType <tt>int</tt> index of the FO type.
+ * @return <tt>String</tt> package name of the FO.
+ * @exception FOPException if the FO index is invalid.
+ */
+ public static String getFOPkg(int foType)
+ throws FOPException
+ {
+ if (foType < 0 || foType > LAST_FO)
+ throw new FOPException
+ ("getFOPkg: type is invalid: " + foType);
+ return foLocalNames[foType][PACKAGEX];
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org