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 ac...@apache.org on 2008/05/14 14:26:20 UTC
svn commit: r656249 [3/3] - in
/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render:
./ afp/ afp/goca/ afp/modca/ afp/modca/triplets/
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java Wed May 14 05:26:18 2008
@@ -51,7 +51,7 @@
* @param os The stream to write to
* @throws java.io.IOException in the event that an I/O exception of some sort has occurred.
*/
- public void writeDataStream(OutputStream os) throws IOException {
+ public void write(OutputStream os) throws IOException {
byte[] len = BinaryUtils.convert(32, 2);
byte[] xcoord = BinaryUtils.convert(x, 3);
byte[] ycoord = BinaryUtils.convert(y, 3);
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java Wed May 14 05:26:18 2008
@@ -25,7 +25,6 @@
import org.apache.fop.render.afp.DataObjectInfo;
import org.apache.fop.render.afp.modca.triplets.ObjectClassificationTriplet;
-import org.apache.fop.render.afp.modca.triplets.StrucFlgs;
import org.apache.fop.render.afp.tools.BinaryUtils;
/**
@@ -42,30 +41,18 @@
* the object data
*/
private byte[] objectData = null;
+
+ /**
+ * the data object info
+ */
+ private DataObjectInfo dataObjectInfo;
/**
* Main constructor
* @param name the name of this object container
- * @param dataObjectInfo the data object info
*/
- public ObjectContainer(String name, DataObjectInfo dataObjectInfo) {
- super(name);
- final boolean dataInContainer = true;
- final boolean containerHasOEG = false;
- final boolean dataInOCD = true;
- StrucFlgs strucFlgs = new StrucFlgs(
- dataInContainer, containerHasOEG, dataInOCD
- );
- Registry registry = Registry.getInstance();
- Registry.ObjectType objectType = registry.getObjectType(dataObjectInfo);
- if (objectType != null) {
- super.setObjectClassification(
- ObjectClassificationTriplet.CLASS_TIME_VARIANT_PRESENTATION_OBJECT,
- objectType, strucFlgs
- );
- } else {
- log.warn("no object type for " + dataObjectInfo.getUri());
- }
+ public ObjectContainer(String name) {
+ super(name);
}
/**
@@ -86,12 +73,36 @@
/**
* {@inheritDoc}
*/
+ public DataObjectInfo getDataObjectInfo() {
+ return this.dataObjectInfo;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDataObjectInfo(DataObjectInfo dataObjectInfo) {
+ this.dataObjectInfo = dataObjectInfo;
+
+ Registry registry = Registry.getInstance();
+ Registry.ObjectType objectType = registry.getObjectType(dataObjectInfo);
+ if (objectType != null) {
+ super.setObjectClassification(
+ ObjectClassificationTriplet.CLASS_TIME_VARIANT_PRESENTATION_OBJECT,
+ objectType);
+ } else {
+ log.warn("no object type for " + dataObjectInfo.getUri());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void writeStart(OutputStream os) throws IOException {
super.writeStart(os);
// create object data from data object
ByteArrayOutputStream bos = new ByteArrayOutputStream();
- dataObj.writeDataStream(bos);
+ dataObj.write(bos);
this.objectData = bos.toByteArray();
// Set the total record length
@@ -127,7 +138,7 @@
// write out object data in chunks of object container data
for (int i = 0; i <= objectData.length; i += ObjectContainerData.MAX_DATA_LEN) {
ObjectContainerData objectContainerData = new ObjectContainerData(objectData, i);
- objectContainerData.writeDataStream(os);
+ objectContainerData.write(os);
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java Wed May 14 05:26:18 2008
@@ -153,15 +153,15 @@
protected void writeContent(OutputStream os) throws IOException {
super.writeContent(os);
- objectAreaDescriptor.writeDataStream(os);
- objectAreaPosition.writeDataStream(os);
+ objectAreaDescriptor.write(os);
+ objectAreaPosition.write(os);
if (imageDataDescriptor != null) {
- imageDataDescriptor.writeDataStream(os);
+ imageDataDescriptor.write(os);
}
if (graphicsDataDescriptor != null) {
- graphicsDataDescriptor.writeDataStream(os);
+ graphicsDataDescriptor.write(os);
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java Wed May 14 05:26:18 2008
@@ -47,7 +47,7 @@
* @param os The stream to write to
* @throws java.io.IOException in the event that an I/O Exception occurred
*/
- public void writeDataStream(OutputStream os)
+ public void write(OutputStream os)
throws IOException {
log.debug("width=" + width);
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageGroup.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageGroup.java Wed May 14 05:26:18 2008
@@ -31,8 +31,6 @@
* entity. Page groups are often processed in stand-alone fashion; that is, they
* are indexed, retrieved, and presented outside the context of the containing
* document.
- *
- * @author <a href="mailto:pete@townsend.uk.com">Pete Townsend </a>
*/
public class PageGroup extends AbstractResourceEnvironmentGroupContainer {
@@ -140,4 +138,11 @@
}
os.write(data);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return this.getName();
+ }
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageObject.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageObject.java Wed May 14 05:26:18 2008
@@ -22,6 +22,8 @@
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.fop.render.afp.tools.StringUtils;
+
/**
* Pages contain the data objects that comprise a presentation document. Each
* page has a set of data objects associated with it. Each page within a
@@ -42,7 +44,17 @@
* in page state.
*
*/
-public class PageObject extends AbstractPageObject {
+public class PageObject extends AbstractResourceGroupContainer {
+
+ /**
+ * The page segment count
+ */
+ private int pageSegmentCount = 0;
+
+ /**
+ * The current page segment
+ */
+ private PageSegment currentPageSegment = null;
/**
* Construct a new page object for the specified name argument, the page
@@ -83,6 +95,135 @@
}
/**
+ * @return a new page segment object
+ */
+ private PageSegment createPageSegment() {
+ String name = PAGE_SEGMENT_NAME_PREFIX
+ + StringUtils.lpad(String.valueOf(++pageSegmentCount), '0', 5);
+ PageSegment pageSegment = new PageSegment(name);
+ return pageSegment;
+ }
+
+ /**
+ * @return the current page segment
+ */
+ private PageSegment getCurrentPageSegment() {
+ if (currentPageSegment == null) {
+ this.currentPageSegment = createPageSegment();
+ super.addObject(currentPageSegment);
+ }
+ return this.currentPageSegment;
+ }
+
+ private static final String PAGE_SEGMENT_NAME_PREFIX = "PSG";
+
+ /**
+ * Starts a new page segment and makes it current.
+ */
+ public void startPageSegment() {
+ getCurrentPageSegment();
+ }
+
+ /**
+ * Ends the current page segment.
+ */
+ public void endPageSegment() {
+ this.currentPageSegment = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void addObject(AbstractAFPObject obj) {
+ if (currentPageSegment != null) {
+ getCurrentPageSegment().addObject(obj);
+ } else {
+ super.addObject(obj);
+ }
+ }
+
+ /**
+ * This method will create shading on the page using the specified
+ * coordinates (the shading contrast is controlled via the red, green blue
+ * parameters, by converting this to grayscale).
+ *
+ * @param x
+ * the x coordinate of the shading
+ * @param y
+ * the y coordinate of the shading
+ * @param w
+ * the width of the shaded area
+ * @param h
+ * the height of the shaded area
+ * @param red
+ * the red value
+ * @param green
+ * the green value
+ * @param blue
+ * the blue value
+ */
+ public void createShading(int x, int y, int w, int h, int red, int green, int blue) {
+ int xCoord = 0;
+ int yCoord = 0;
+ int areaWidth = 0;
+ int areaHeight = 0;
+ switch (rotation) {
+ case 90:
+ xCoord = areaWidth - y - h;
+ yCoord = x;
+ areaWidth = h;
+ areaHeight = w;
+ break;
+ case 180:
+ xCoord = areaWidth - x - w;
+ yCoord = areaHeight - y - h;
+ areaWidth = w;
+ areaHeight = h;
+ break;
+ case 270:
+ xCoord = y;
+ yCoord = areaHeight - x - w;
+ areaWidth = h;
+ areaHeight = w;
+ break;
+ default:
+ xCoord = x;
+ yCoord = y;
+ areaWidth = w;
+ areaHeight = h;
+ break;
+ }
+
+ // Convert the color to grey scale
+ float shade = (float) ((red * 0.3) + (green * 0.59) + (blue * 0.11));
+
+ int grayscale = Math.round((shade / 255) * 16);
+
+ String imageName = "IMG"
+ + StringUtils.lpad(String.valueOf(getResourceCount() + 1),
+ '0', 5);
+
+ IMImageObject imImageObject = new IMImageObject(imageName);
+ ImageOutputControl imageOutputControl = new ImageOutputControl(0, 0);
+ ImageInputDescriptor imageInputDescriptor = new ImageInputDescriptor();
+ ImageCellPosition imageCellPosition = new ImageCellPosition(xCoord, yCoord);
+ imageCellPosition.setXFillSize(areaWidth);
+ imageCellPosition.setYFillSize(areaHeight);
+ imageCellPosition.setXSize(64);
+ imageCellPosition.setYSize(8);
+
+ //defining this as a resource
+ ImageRasterData imageRasterData = new ImageRasterData(
+ ImageRasterPattern.getRasterData(grayscale));
+
+ imImageObject.setImageOutputControl(imageOutputControl);
+ imImageObject.setImageInputDescriptor(imageInputDescriptor);
+ imImageObject.setImageCellPosition(imageCellPosition);
+ imImageObject.setImageRasterData(imageRasterData);
+ addObject(imImageObject);
+ }
+
+ /**
* {@inheritDoc}
*/
protected void writeStart(OutputStream os) throws IOException {
@@ -121,4 +262,11 @@
}
os.write(data);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return this.getName();
+ }
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageSegment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageSegment.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageSegment.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PageSegment.java Wed May 14 05:26:18 2008
@@ -105,5 +105,12 @@
data[9 + i] = nameBytes[i];
}
os.write(data);
- }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return this.name;
+ }
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java Wed May 14 05:26:18 2008
@@ -56,10 +56,6 @@
prePresObj.getFullyQualifiedName());
} else {
this.objType = TYPE_OTHER;
-// Registry registry = Registry.getInstance();
-// Registry.Entry entry = registry.getEntry(compontentId);
-// entry.
-// setObjectClassification(objectClass, componentId)
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java Wed May 14 05:26:18 2008
@@ -109,7 +109,8 @@
* The control sequence indicator.
*/
public PresentationTextData(boolean controlInd) {
- baos.write(new byte[] { 0x5A, // Structured field identifier
+ final byte[] data = {
+ 0x5A, // Structured field identifier
0x00, // Record length byte 1
0x00, // Record length byte 2
(byte) 0xD3, // PresentationTextData identifier byte 1
@@ -118,7 +119,8 @@
0x00, // Flag
0x00, // Reserved
0x00, // Reserved
- }, 0, 9);
+ };
+ baos.write(data, 0, 9);
if (controlInd) {
baos.write(new byte[] { 0x2B, (byte) 0xD3 }, 0, 2);
@@ -481,9 +483,7 @@
* @param afpdata
* The output stream to which data should be written.
*/
- private void setVariableSpaceCharacterIncrement(int incr,
- ByteArrayOutputStream afpdata) {
-
+ private void setVariableSpaceCharacterIncrement(int incr, ByteArrayOutputStream afpdata) {
byte[] b = BinaryUtils.convert(incr, 2);
afpdata.write(new byte[] {
@@ -517,7 +517,7 @@
/**
* {@inheritDoc}
*/
- public void writeDataStream(OutputStream os) throws IOException {
+ public void write(OutputStream os) throws IOException {
byte[] data = baos.toByteArray();
byte[] size = BinaryUtils.convert(data.length - 1, 2);
data[1] = size[0];
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java Wed May 14 05:26:18 2008
@@ -65,7 +65,7 @@
* @param os The stream to write to
* @throws java.io.IOException thrown if an I/O exception of some sort has occurred
*/
- public void writeDataStream(OutputStream os)
+ public void write(OutputStream os)
throws IOException {
byte[] data = new byte[23];
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java Wed May 14 05:26:18 2008
@@ -47,9 +47,15 @@
*/
private static final String DEFAULT_NAME = "PTO00001";
- private PresentationTextData currentPresentationTextData;
+ /**
+ * The current presentation text data
+ */
+ private PresentationTextData currentPresentationTextData = null;
- private List presentationTextData;
+ /**
+ * The presentation text data list
+ */
+ private List/*<PresentationTextData>*/ presentationTextDataList = null;
/**
* Default constructor for the PresentationTextObject
@@ -183,22 +189,22 @@
* Helper method to mark the start of the presentation text data
*/
private void startPresentationTextData() {
- if (presentationTextData == null) {
- presentationTextData = new java.util.ArrayList();
+ if (presentationTextDataList == null) {
+ presentationTextDataList = new java.util.ArrayList/*<PresentationTextData>*/();
}
- if (presentationTextData.size() == 0) {
+ if (presentationTextDataList.size() == 0) {
currentPresentationTextData = new PresentationTextData(true);
} else {
currentPresentationTextData = new PresentationTextData();
}
- presentationTextData.add(currentPresentationTextData);
+ presentationTextDataList.add(currentPresentationTextData);
}
/**
* Helper method to mark the end of the presentation text data
*/
private void endPresentationTextData() {
- currentPresentationTextData = null;
+ this.currentPresentationTextData = null;
}
/**
@@ -206,9 +212,9 @@
* @param os The stream to write to
* @throws java.io.IOException thrown if an I/O exception of some sort has occurred
*/
- public void writeDataStream(OutputStream os) throws IOException {
+ public void write(OutputStream os) throws IOException {
writeStart(os);
- writeObjects(presentationTextData, os);
+ writeObjects(this.presentationTextDataList, os);
writeEnd(os);
}
@@ -278,4 +284,14 @@
endControlSequence();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ if (presentationTextDataList != null) {
+ return presentationTextDataList.toString();
+ }
+ return null;
+ }
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java Wed May 14 05:26:18 2008
@@ -36,7 +36,7 @@
/**
* The maps data resources contained in this resource environment group
*/
- private List mapDataResources = null;
+ private List/*<MapDataResource>*/ mapDataResources = null;
/**
* The maps page overlays contained in this resource environment group
@@ -46,7 +46,7 @@
/**
* The pre-process presentation objects contained in this resource environment group
*/
- private List preProcessPresentationObjects = null;
+ private List/*<PreprocessPresentationObject>*/ preProcessPresentationObjects = null;
/**
* The resource environment group state
@@ -60,9 +60,9 @@
this(DEFAULT_NAME);
}
- private List getMapDataResources() {
+ private List/*<MapDataResource>*/ getMapDataResources() {
if (mapDataResources == null) {
- this.mapDataResources = new java.util.ArrayList();
+ this.mapDataResources = new java.util.ArrayList/*<MapDataResource>*/();
}
return this.mapDataResources;
}
@@ -74,9 +74,10 @@
return this.mapPageOverlays;
}
- private List getPreprocessPresentationObjects() {
+ private List/*<PreprocessPresentationObject>*/ getPreprocessPresentationObjects() {
if (preProcessPresentationObjects == null) {
- this.preProcessPresentationObjects = new java.util.ArrayList();
+ this.preProcessPresentationObjects
+ = new java.util.ArrayList/*<PreprocessPresentationObject>*/();
}
return this.preProcessPresentationObjects;
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java Wed May 14 05:26:18 2008
@@ -28,8 +28,6 @@
import org.apache.fop.render.afp.DataObjectInfo;
import org.apache.fop.render.afp.ImageObjectInfo;
import org.apache.fop.render.afp.ResourceInfo;
-import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
-import org.apache.fop.render.afp.tools.StringUtils;
/**
* A Resource Group contains a set of overlays.
@@ -44,7 +42,7 @@
/**
* Mapping of resource uri to data resource object (image/graphic)
*/
- private Map/*<String, DataObjectAccessor>*/ resourceMap = null;
+ private Map/*<String, Writeable>*/ resourceMap = null;
/**
* This resource groups container
@@ -70,20 +68,6 @@
this.container = container;
}
- private static final String RESOURCE_NAME_PREFIX = "RES";
-
- /**
- * Helper method to create a new resource object in the current container and to return
- * the object.
- * @return a newly created resource object
- */
- private ResourceObject createResourceObject() {
- String name = RESOURCE_NAME_PREFIX
- + StringUtils.lpad(String.valueOf(getResourceCount() + 1), '0', 5);
- ResourceObject resource = new ResourceObject(name);
- return resource;
- }
-
private AbstractResourceGroupContainer getContainer() {
return this.container;
}
@@ -111,26 +95,58 @@
dataObjectInfo.getRotation());
String resourceName = resourceInfo.getName();
- ObjectContainer objectContainer = new ObjectContainer(resourceName, dataObjectInfo);
+ ObjectContainer objectContainer = new ObjectContainer(resourceName);
objectContainer.setDataObject(dataObj);
+ objectContainer.setDataObjectInfo(dataObjectInfo);
- // When externally located, Wrap data object in a resource object
+ // When externally located, wrap the object container in a resource object
if (resourceInfo.isExternal()) {
- ResourceObject resourceObj = createResourceObject();
- resourceObj.setObjectContainer(objectContainer);
- dataObjectAccessor = resourceObj;
- } else { // no wrappers just container
+ ResourceObject resourceObject = new ResourceObject(resourceName);
+ resourceObject.setDataObject(objectContainer);
+ dataObjectAccessor = resourceObject;
+ } else { // Access data object through container
dataObjectAccessor = objectContainer;
}
+ dataObjectAccessor.setDataObjectInfo(dataObjectInfo);
+
+ // Add to resource map
getResourceMap().put(dataObjectInfo.getUri(), dataObjectAccessor);
}
+ // Return include object
AbstractNamedAFPObject dataObject = dataObjectAccessor.getDataObject();
String name = dataObject.getName();
- IncludeObject includeObj = new IncludeObject(name, dataObjectAccessor, resourceInfo);
+ IncludeObject includeObj = new IncludeObject(name, dataObjectAccessor);
return includeObj;
}
/**
+ * Checks if a named object is of a valid type to be added to a resource group
+ * @param namedObj a named object
+ * @return true if the named object is of a valid type to be added to a resource group
+ */
+ private boolean isValidObjectType(AbstractNamedAFPObject namedObj) {
+ return (namedObj instanceof Overlay
+ || namedObj instanceof PageSegment
+ // || namedObj instanceof FormMap
+ // || namedObj instanceof BarcodeObject
+ || namedObj instanceof GraphicsObject
+ || namedObj instanceof ImageObject
+ || namedObj instanceof ObjectContainer
+ || namedObj instanceof Document);
+ }
+ /**
+ * Adds a named object to this resource group
+ * @param namedObj a named AFP object
+ */
+ protected void addObject(AbstractNamedAFPObject namedObj) {
+ if (isValidObjectType(namedObj)) {
+ getResourceMap().put(namedObj.getName(), namedObj);
+ } else {
+ throw new IllegalArgumentException("invalid object type " + namedObj);
+ }
+ }
+
+ /**
* @return the number of resources contained in this resource group
*/
public int getResourceCount() {
@@ -157,7 +173,7 @@
*/
public Map/*<String, DataObjectAccessor>*/ getResourceMap() {
if (resourceMap == null) {
- resourceMap = new java.util.HashMap/*<String, DataObjectAccessor>*/();
+ resourceMap = new java.util.HashMap/*<String, Writeable>*/();
}
return resourceMap;
}
@@ -170,8 +186,8 @@
Collection includes = resourceMap.values();
Iterator it = includes.iterator();
while (it.hasNext()) {
- DataObjectAccessor dataObjectAccessor = (DataObjectAccessor)it.next();
- dataObjectAccessor.writeDataStream(os);
+ Writable dataObject = (Writable)it.next();
+ dataObject.write(os);
}
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceObject.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceObject.java Wed May 14 05:26:18 2008
@@ -22,6 +22,8 @@
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.fop.render.afp.DataObjectInfo;
+import org.apache.fop.render.afp.modca.triplets.ObjectClassificationTriplet;
import org.apache.fop.render.afp.modca.triplets.Triplet;
import org.apache.fop.render.afp.tools.BinaryUtils;
@@ -34,9 +36,14 @@
/**
* the object container of this resource object
*/
- private ObjectContainer objectContainer;
+ private AbstractNamedAFPObject namedObject;
/**
+ * the data object info
+ */
+ private DataObjectInfo dataObjectInfo;
+
+ /**
* Default constructor
*
* @param name the name of this resource (reference id)
@@ -44,49 +51,63 @@
public ResourceObject(String name) {
super(name);
}
-
+
/**
* Sets the data object referenced by this resource object
- * @param objectContainer the object container
+ * @param namedObject the named data object
*/
- public void setObjectContainer(ObjectContainer objectContainer) {
- this.objectContainer = objectContainer;
- setResourceObjectType(objectContainer);
+ public void setDataObject(AbstractNamedAFPObject namedObject) {
+ this.namedObject = namedObject;
}
-
+
/**
* {@inheritDoc}
*/
public AbstractNamedAFPObject getDataObject() {
- if (objectContainer != null) {
- return objectContainer.getDataObject();
- }
- return null;
+ return namedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DataObjectInfo getDataObjectInfo() {
+ return this.dataObjectInfo;
}
/**
- * Sets the resource object type
- * @param resourceObj the resource object
+ * {@inheritDoc}
*/
- public void setResourceObjectType(AbstractNamedAFPObject resourceObj) {
+ public void setDataObjectInfo(DataObjectInfo dataObjectInfo) {
+ this.dataObjectInfo = dataObjectInfo;
+
byte type;
- if (resourceObj instanceof ObjectContainer) {
+ if (namedObject instanceof ObjectContainer) {
type = ResourceObjectTypeTriplet.OBJECT_CONTAINER;
- } else if (resourceObj instanceof ImageObject) {
+
+// ObjectContainer objectContainer = (ObjectContainer)namedObject;
+// DataObjectInfo dataObjectInfo = objectContainer.getDataObjectInfo();
+ Registry.ObjectType objectType = dataObjectInfo.getObjectType();
+ super.setObjectClassification(
+ ObjectClassificationTriplet.CLASS_TIME_INVARIANT_PAGINATED_PRESENTATION_OBJECT,
+ objectType);
+
+ } else if (namedObject instanceof ImageObject) {
type = ResourceObjectTypeTriplet.IMAGE_OBJECT;
- } else if (resourceObj instanceof GraphicsObject) {
+ } else if (namedObject instanceof GraphicsObject) {
type = ResourceObjectTypeTriplet.GRAPHICS_OBJECT;
- } else if (resourceObj instanceof Document) {
+ } else if (namedObject instanceof Document) {
type = ResourceObjectTypeTriplet.DOCUMENT_OBJECT;
- } else if (resourceObj instanceof PageSegment) {
+ } else if (namedObject instanceof PageSegment) {
type = ResourceObjectTypeTriplet.PAGE_SEGMENT_OBJECT;
- } else if (resourceObj instanceof Overlay) {
+ } else if (namedObject instanceof Overlay) {
type = ResourceObjectTypeTriplet.OVERLAY_OBJECT;
} else {
throw new UnsupportedOperationException(
- "Unsupported resource object type " + resourceObj);
+ "Unsupported resource object type " + namedObject);
}
+
getTriplets().add(new ResourceObjectTypeTriplet(type));
+
}
/**
@@ -126,8 +147,8 @@
*/
protected void writeContent(OutputStream os) throws IOException {
super.writeContent(os); // write triplets
- if (objectContainer != null) {
- objectContainer.writeDataStream(os);
+ if (namedObject != null) {
+ namedObject.write(os);
}
}
@@ -194,7 +215,7 @@
super(RESOURCE_OBJECT,
new byte[] {
type,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Constant Data
}
);
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java Wed May 14 05:26:18 2008
@@ -99,7 +99,7 @@
* @param os The outputsteam stream
* @throws java.io.IOException if an I/O exception occurred
*/
- public void writeDataStream(OutputStream os) throws IOException {
+ public void write(OutputStream os) throws IOException {
byte[] data = new byte[17 + tleName.length() + tleValue.length()];
Copied: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Writable.java (from r649456, xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStreamWriter.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Writable.java?p2=xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Writable.java&p1=xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStreamWriter.java&r1=649456&r2=656249&rev=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStreamWriter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Writable.java Wed May 14 05:26:18 2008
@@ -25,12 +25,12 @@
/**
* Implementing object is able to write to an AFPDataStream
*/
-public interface AFPDataStreamWriter {
+public interface Writable {
/**
- * DataStream objects must implement the writeDataStream()
+ * DataStream objects must implement the write()
* method to write its data to the given OutputStream
- * @param os The outputsteam stream
+ * @param outputStream The outputsteam stream
* @throws java.io.IOException an I/O exception of some sort has occurred.
*/
- void writeDataStream(OutputStream os) throws IOException;
+ void write(OutputStream outputStream) throws IOException;
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java Wed May 14 05:26:18 2008
@@ -17,92 +17,163 @@
/* $Id: $ */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id: $ */
package org.apache.fop.render.afp.modca.triplets;
import java.io.UnsupportedEncodingException;
import org.apache.fop.render.afp.modca.AFPConstants;
-
/**
* A Fully Qualified Name triplet enable the identification and referencing of
* objects using Gloabl Identifiers (GIDs).
*/
public class FullyQualifiedNameTriplet extends Triplet {
+
// Specifies how the GID will be used
+
+ /** This GID replaces the first parameter in the structured field that contains a GID name. */
public static final byte TYPE_REPLACE_FIRST_GID_NAME = 0x01;
+
+ /** This triplet contains the name of a font family. */
public static final byte TYPE_FONT_FAMILY_NAME = 0x07;
+
+ /** This triplet contains the name of a font typeface. */
public static final byte TYPE_FONT_TYPEFACE_NAME = 0x08;
+
+ /** This triplet specifies a reference to the MO:DCA resource hierarchy. */
public static final byte TYPE_MODCA_RESOURCE_HIERARCHY_REF = 0x09;
+
+ /** The triplet contains a GID reference to a begin resource group structured field. */
public static final byte TYPE_BEGIN_RESOURCE_GROUP_REF = 0x0A;
+
+ /** The triplet contains a GID reference to a document attribute. */
public static final byte TYPE_ATTRIBUTE_GID = 0x0B;
+
+ /** The triplet contains the GID of a process element. */
public static final byte TYPE_PROCESS_ELEMENT_GID = 0x0C;
+
+ /** The triplet contains a reference to a begin page group structured field. */
public static final byte TYPE_BEGIN_PAGE_GROUP_REF = 0x0D;
+
+ /** The triplet contains a reference to a media type. */
public static final byte TYPE_MEDIA_TYPE_REF = 0x11;
+
+ /** The triplet contains a reference to a color management resource. */
public static final byte TYPE_COLOR_MANAGEMENT_RESOURCE_REF = 0x41;
+
+ /** The triplet contains a reference to a data-object font file that defines a base font. */
public static final byte TYPE_DATA_OBJECT_FONT_BASE_FONT_ID = 0x6E;
+
+ /** The triplet contains a reference to a data-object font file that defines a linked font. */
public static final byte TYPE_DATA_OBJECT_FONT_LINKED_FONT_ID = 0x7E;
+
+ /** The triplet contains a reference to a begin document structured field. */
public static final byte TYPE_BEGIN_DOCUMENT_REF = (byte)0x83;
+
+ /**
+ * The triplet contains a reference to a begin structured field associated with a resource;
+ * or contains a GID reference to a coded font.
+ */
public static final byte TYPE_BEGIN_RESOURCE_OBJECT_REF = (byte)0x84;
- public static final byte TYPE_CODE_PAGE_NAME_REF = (byte)0x85;
+
+ /**
+ * The triplet contains a GID reference to a code page that specifies the code points and
+ * graphic character names for a coded font.
+ */
+ public static final byte TYPE_CODE_PAGE_NAME_REF = (byte)0x85;
+
+ /**
+ * The triplet contains a GID name reference to a font character set that specifies
+ * a set of graphics characters.
+ */
public static final byte TYPE_FONT_CHARSET_NAME_REF = (byte)0x86;
+
+ /** The triplet contains a GID reference to a begin page structured field. */
public static final byte TYPE_BEGIN_PAGE_REF = (byte)0x87;
+
+ /** The triplet contains a GID reference to a begin medium map structured field. */
public static final byte TYPE_BEGIN_MEDIUM_MAP_REF = (byte)0x8D;
- public static final byte TYPE_CODED_FONT_NAME_REF = (byte)0x8E;
- public static final byte TYPE_BEGIN_DOCUMENT_INDEX_REF = (byte)0x98;
+
+ /**
+ * The triplet contains a GID reference to a coded font, which identifies a specific
+ * code page and a specific font character set.
+ */
+ public static final byte TYPE_CODED_FONT_NAME_REF = (byte)0x8E;
+
+ /** The triplet contains a GID reference to a begin document index structured field. */
+ public static final byte TYPE_BEGIN_DOCUMENT_INDEX_REF = (byte)0x98;
+
+ /** The triplet contains a GID reference to a begin overlay structured field. */
public static final byte TYPE_BEGIN_OVERLAY_REF = (byte)0xB0;
+
+ /** The triplet contains a GID reference to a resource used by a data object. */
public static final byte TYPE_DATA_OBJECT_INTERNAL_RESOURCE_REF = (byte)0xBE;
+
+ /** The triplet contains a GID reference to an index element structured field. */
public static final byte TYPE_INDEX_ELEMENT_GID = (byte)0xCA;
+
+ /**
+ * The triplet contains a reference to other object data which may or may
+ * not be defined by an IBM presentation architecture.
+ */
public static final byte TYPE_OTHER_OBJECT_DATA_REF = (byte)0xCE;
+
+ /**
+ * The triplet contains a reference to a resource used by a data object.
+ * The GID may be a filename or any other identifier associated with the
+ * resource and is used to located the resource object in the resource hierarchy.
+ * The data object that uses the resource may or may not be defined by an
+ * IBM presentation architecture.
+ */
public static final byte TYPE_DATA_OBJECT_EXTERNAL_RESOURCE_REF = (byte)0xDE;
+
// GID Format
+
+ /** The GID is a character encoded name. */
public static final byte FORMAT_CHARSTR = (byte)0x00;
+
+ /** the GID is a ASN.1 object identifier (OID). */
public static final byte FORMAT_OID = (byte)0x10;
+
+ /** the GID is a uniform resource locator (URL). */
public static final byte FORMAT_URL = (byte)0x20;
+
- private byte[] nameBytes;
+ private String fqName;
/**
* @return the actual fully qualified name of this triplet
*/
- public byte[] getFullyQualifiedName() {
- return nameBytes;
+ public String getFullyQualifiedName() {
+ return fqName;
}
/**
* Main constructor
+ *
* @param type the fully qualified name type
* @param format the fully qualified name format
- * @param name the fully qualified name
+ * @param fqName the fully qualified name
*/
- public FullyQualifiedNameTriplet(byte type, byte format, byte[] name) {
+ public FullyQualifiedNameTriplet(byte type, byte format, String fqName) {
super(FULLY_QUALIFIED_NAME);
- this.nameBytes = name;
- byte[] data = new byte[2 + name.length];
+ this.fqName = fqName;
+
+ byte[] fqNameBytes;
+ try {
+ fqNameBytes = fqName.getBytes(AFPConstants.ASCII_ENCODING);
+ } catch (UnsupportedEncodingException e) {
+ throw new IllegalArgumentException(
+ AFPConstants.ASCII_ENCODING + " encoding failed");
+ }
+
+ byte[] data = new byte[2 + fqNameBytes.length];
data[0] = type;
data[1] = format;
// FQName
- System.arraycopy(name, 0, data, 2, name.length);
+ System.arraycopy(fqNameBytes, 0, data, 2, fqNameBytes.length);
super.setData(data);
}
@@ -111,10 +182,6 @@
* {@inheritDoc}
*/
public String toString() {
- try {
- return new String(nameBytes, AFPConstants.EBCIDIC_ENCODING);
- } catch (UnsupportedEncodingException e) {
- }
- return null;
+ return this.fqName;
}
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/StrucFlgs.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/StrucFlgs.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/StrucFlgs.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/StrucFlgs.java Wed May 14 05:26:18 2008
@@ -35,6 +35,8 @@
private static final int OBJECT_CONTAINER_DATA_NOT_CARRIED_IN_OBJECT_DATA = 16;
private static final int OBJECT_CONTAINER_DATA_OBJECT_DATA_CONTAINMENT_UNKNOWN = 32;
private static final int OBJECT_CONTAINER_DATA_CARRIES_OBJECT_DATA = 48;
+
+ private static StrucFlgs DEFAULT_STRUC_FLGS = null;
private byte value = 0;
@@ -77,4 +79,22 @@
public byte getValue() {
return this.value;
}
+
+ /**
+ * Returns the default strucflg setting
+ * (data in container, container without OEG, data in OCD)
+ *
+ * @return the default strucflg settings
+ */
+ public static StrucFlgs getDefault() {
+ synchronized (StrucFlgs.class) {
+ if (DEFAULT_STRUC_FLGS == null) {
+ final boolean dataInContainer = true;
+ final boolean containerHasOEG = false;
+ final boolean dataInOCD = true;
+ DEFAULT_STRUC_FLGS = new StrucFlgs(dataInContainer, containerHasOEG, dataInOCD);
+ }
+ }
+ return DEFAULT_STRUC_FLGS;
+ }
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java?rev=656249&r1=656248&r2=656249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java Wed May 14 05:26:18 2008
@@ -138,7 +138,7 @@
/**
* {@inheritDoc}
*/
- public void writeDataStream(OutputStream os) throws IOException {
+ public void write(OutputStream os) throws IOException {
os.write((byte)data.length + 2);
os.write(id);
os.write(data);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org