[FOray-commit] SF.net SVN: foray: [8543] trunk/foray/foray-fotree/src/java/org/foray/ fotree
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-01-29 01:02:12
|
Revision: 8543
http://svn.sourceforge.net/foray/?rev=8543&view=rev
Author: victormote
Date: 2007-01-28 17:02:13 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to aXSL changes limiting the visibility of the enumeration arrays.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -36,6 +36,7 @@
import org.foray.fotree.PropertyList;
import org.foray.fotree.xml.PropertyMakerXML;
+import org.axsl.common.FoObject;
import org.axsl.common.FoProperty;
import org.axsl.foR.FOTreeException;
@@ -95,7 +96,7 @@
}
public byte enumerateElement(final String localName) {
- return ObjectMakerFO.enumerateObjectName(localName);
+ return FoObject.xslValueOf(localName);
}
public short enumerateAttribute(final String attributeName) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -94,8 +94,6 @@
import org.xml.sax.Locator;
-import java.util.Arrays;
-
/**
* Factory class for creating objects in the "fo:" (Formatting Objects)
* namespace.
@@ -108,19 +106,9 @@
*/
private ObjectMakerFO() { }
- /**
- * Converts an object name to its integral equivalent.
- * @param objectName The object name to be enumerated.
- * @return The enumerated value of the object name.
- */
- public static byte enumerateObjectName(final String objectName) {
- return (byte) Arrays.binarySearch(FoObject.OBJECT_NAME_LIST,
- objectName);
- }
-
public static FObj makeObject(final String objectName, final FObj parent,
final PropertyList propertyList, final Locator locator) {
- final byte enumeration = enumerateObjectName(objectName);
+ final byte enumeration = FoObject.xslValueOf(objectName);
String systemId = null;
int line = 0;
int column = 0;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -143,8 +143,6 @@
import org.axsl.common.FoProperty;
-import java.util.Arrays;
-
/**
* Factory class for creating properties in the "fo:" (Formatting Objects)
* namespaces.
@@ -165,8 +163,7 @@
public static short enumeratePropertyName(final String inputPropertyName) {
final String propertyName = Property.getBasePropertyName(
inputPropertyName);
- final short enumerated = (short) Arrays.binarySearch(
- FoProperty.PROPERTY_NAME_LIST, propertyName);
+ final short enumerated = FoProperty.xslValueOf(propertyName);
return enumerated;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -93,7 +93,7 @@
case FoValue.FANTASY:
case FoValue.MONOSPACE: {
final String[] returnArray
- = {FoValue.PROPERTY_KEYWORD_VALUES[keyword]};
+ = {FoValue.toXslFo(keyword)};
return returnArray;
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -82,7 +82,7 @@
case FoValue.FEMALE:
case FoValue.CHILD: {
final String[] returnArray
- = {FoValue.PROPERTY_KEYWORD_VALUES[keyword]};
+ = {FoValue.toXslFo(keyword)};
return returnArray;
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java 2007-01-28 23:16:00 UTC (rev 8542)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java 2007-01-29 01:02:13 UTC (rev 8543)
@@ -40,7 +40,7 @@
public final class PropertyKeyword extends ExprPrimary {
private static PropertyKeyword[] keywords = new PropertyKeyword[
- FoValue.PROPERTY_KEYWORD_VALUES.length];
+ FoValue.size()];
/** The encapsulated keyword enumeration. */
private short value;
@@ -74,7 +74,7 @@
*/
public static PropertyKeyword getPropertyKeyword(final short value) {
if (value < 1
- || value >= FoValue.PROPERTY_KEYWORD_VALUES.length) {
+ || value >= FoValue.size()) {
return null;
}
if (keywords[value] == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|