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/06/02 16:30:40 UTC

svn commit: r662448 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: conf/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/events/ src/java/org/apache/fop/image/loader/batik/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/ap...

Author: acumiskey
Date: Mon Jun  2 07:30:39 2008
New Revision: 662448

URL: http://svn.apache.org/viewvc?rev=662448&view=rev
Log:
* getImageUri() implementation provided on Graphics2DAdaptor implementations.
* Refactored data object creation abilities from AbstractResourceGroupContainer into a new DataObjectFactory class. 
* Added mime type to ObjectType inner class in Registry for warn/error logging purposes.
* Fixed problem with handling ObjectContainer objects in IncludeObject.
* Added documentation for configuring AFP resource group files.

Added:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java   (with props)
Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/conf/fop.xconf
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/configuration.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/output.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/events/EventFormatter.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/ResourceInfo.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStream.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/IncludeObject.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/java2d/Java2DGraphics2DAdapter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/conf/fop.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/conf/fop.xconf?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/conf/fop.xconf (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/conf/fop.xconf Mon Jun  2 07:30:39 2008
@@ -110,7 +110,9 @@
       -->
       <images mode="b+w" bits-per-pixel="8"/>
       <renderer-resolution>240</renderer-resolution>
+      <resource-group-file>resources.afp</resource-group-file>
       <goca-enabled/>
+
       <fonts>
       <!--
            Below is an example using raster font configuration using FOP builtin base-14 font metrics.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/configuration.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/configuration.xml?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/configuration.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/configuration.xml Mon Jun  2 07:30:39 2008
@@ -347,6 +347,34 @@
         to "bitmap" which causes all text to be rendered as bitmaps.
       </p>
     </section>
+    <section id="afp-renderer">
+      <title>Special Settings for the AFP Renderer</title>
+      <p>
+      </p>
+      <p>
+        Additionally, there are certain settings that control how the renderer handles various elements.
+      </p>
+<source><![CDATA[<renderer mime="application/x-afp">
+  <images mode="b+w" bits-per-pixel="8"/>
+  <renderer-resolution>240</renderer-resolution>
+  <resource-group-file>resources.afp</resource-group-file>
+  <goca-enabled/>
+</renderer>]]></source>
+      <p>
+        The default value for the "images mode" setting is "b+w" (black and white).  When the setting is "color" a "bits-per-pixel" setting can be provided 
+      </p>
+      <p>
+        The default value for the "renderer-resolution" is 240 dpi. 
+      </p>
+ <!--
+      <p>
+        The default value for the MO:DCA "interchange-set" is "MO:DCA-L". Other compliance settings include presentation interchange sets "MO:DCA-P IS/1" and "MO:DCA-P IS/2" (Resource Groups). 
+      </p>
+ -->
+      <p>
+        By default if there is no configuration definition for "resource-group-file" all resources will be placed inline within the containing page. 
+      </p>
+    </section>
   </section>
 
         <section>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/output.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/output.xml?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/output.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/output.xml Mon Jun  2 07:30:39 2008
@@ -454,7 +454,7 @@
     <section id="afp-configuration">
       <title>Configuration</title>
       <section id="afp-font-config">
-        <title>Fonts</title>
+      <title>Fonts</title>
       <p>The AFP Renderer requires special configuration particularly related to fonts.
       AFP Render configuration is done through the normal FOP configuration file. The MIME type
       for the AFP Renderer is application/x-afp which means the AFP Renderer section in the FOP configuration file
@@ -590,7 +590,7 @@
       <section id="afp-image-config">
         <title>Images</title>
         <p>By default the AFP Renderer converts all images to 8 bit grey level.
-        This can be overridden by the &lt;images&gt; configuration element. Example:</p>
+        This can be overridden by the &lt;images/&gt; configuration element. Example:</p>
       <source><![CDATA[
       <images mode="color" />
 ]]></source>
@@ -601,6 +601,16 @@
       <p>Only the values "color" and "b+w" are allowed for the mode attribute. The bits-per-pixel
       attribute is ignored if mode is "color". For "b+w" mode is must be 1, 4, or 8.</p>
       </section>
+      <section id="afp-resource-group-file">
+      <title>Resource Group File</title>
+      <p>By default the AFP Renderer will place all data resource objects such as images within
+      the document of the main output datastream.  An external resource group file where document resources
+      may be specified with the &lt;resource-group-file/&gt; configuration element.  Example:</p>
+      <source><![CDATA[
+      <resource-group-file>external_resources.afp</resource-group-file>
+]]></source>
+      <note>Be careful when using this option not to overwrite existing resource files from previous rendering runs.</note>
+      </section>
     </section>
     <section id="afp-extensions">
       <title>Extensions</title>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/events/EventFormatter.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/events/EventFormatter.xml?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/events/EventFormatter.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/events/EventFormatter.xml Mon Jun  2 07:30:39 2008
@@ -26,6 +26,7 @@
   <message key="rule.childOfSPM">The element must be a child of fo:simple-page-master.</message>
   <message key="rule.childOfDeclarations">The element must be a child of fo:declarations.</message>
   <message key="rule.childOfSPMorDeclarations">The element must be a child of fo:declarations or fo:simple-page-master.</message>
+  <message key="rule.childOfInstreamForeignObjectorExternalGraphic">The element must be a child of fo:instream-foreign-object or fo:external-graphic.</message>
   <message key="rule.wrapperInvalidChildForParent">An fo:wrapper is only permitted to have children that would be permitted for its parent.</message>
   <message key="org.apache.fop.fo.FOValidationEventProducer.tooManyNodes">For "{elementName}", only one "{offendingNode}" may be declared.{{locator}}</message>
   <message key="org.apache.fop.fo.FOValidationEventProducer.nodeOutOfOrder">For "{elementName}", "{tooLateNode}" must be declared before "{tooEarlyNode}"!{{locator}}</message>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java Mon Jun  2 07:30:39 2008
@@ -59,7 +59,7 @@
     private static Log log = LogFactory.getLog(ImageConverterSVG2G2D.class);
 
     /** {@inheritDoc} */
-    public Image convert(Image src, Map hints) throws ImageException {
+    public Image convert(final Image src, Map hints) throws ImageException {
         checkSourceFlavor(src);
         final ImageXMLDOM svg = (ImageXMLDOM)src;
         if (!SVGDOMImplementation.SVG_NAMESPACE_URI.equals(svg.getRootNamespace())) {
@@ -105,6 +105,9 @@
                 return new Dimension(svg.getSize().getWidthMpt(), svg.getSize().getHeightMpt());
             }
 
+            public String getImageUri() {
+                return src.getInfo().getOriginalURI();
+            }
         };
 
         ImageGraphics2D g2dImage = new ImageGraphics2D(src.getInfo(), painter);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java Mon Jun  2 07:30:39 2008
@@ -101,6 +101,10 @@
                 log.debug("Painting WMF took " + duration + " ms.");
             }
         }
+
+        public String getImageUri() {
+            return wmf.getInfo().getOriginalURI();
+        }
         
     }
     

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java Mon Jun  2 07:30:39 2008
@@ -37,12 +37,16 @@
      */
     public ExternalGraphicLayoutManager(ExternalGraphic node) {
         super(node);
-        fobj = node;
+        this.fobj = node;
     }
 
     /** {@inheritDoc} */
     protected Area getChildArea() {
-        return new Image(fobj.getSrc());
+        Image img = new Image(fobj.getSrc());
+        if (fobj.hasExtensionAttachments()) {
+            img.setExtensionAttachments(fobj.getExtensionAttachments());
+        }
+        return img;
     }
     
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java Mon Jun  2 07:30:39 2008
@@ -84,12 +84,13 @@
 
         //Build the GVT tree
         final GraphicsNode root;
+        final String uri = getDocumentURI(doc);
         try {
             root = builder.build(ctx, doc);
         } catch (Exception e) {
             SVGEventProducer eventProducer = SVGEventProducer.Provider.get(
                     context.getUserAgent().getEventBroadcaster());
-            eventProducer.svgNotBuilt(this, e, getDocumentURI(doc));
+            eventProducer.svgNotBuilt(this, e, uri);
             return;
         }
 
@@ -111,6 +112,10 @@
             public Dimension getImageSize() {
                 return new Dimension(wrappedContext.getWidth(), wrappedContext.getHeight());
             }
+            
+            public String getImageUri() {
+                return uri;
+            }
 
         };
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java Mon Jun  2 07:30:39 2008
@@ -32,9 +32,11 @@
 import java.awt.image.DataBuffer;
 import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
+import java.io.IOException;
 
 import org.apache.fop.render.RendererContext.RendererContextWrapper;
 import org.apache.fop.util.UnitConv;
+import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
 
 /**
  * Graphics2DAdapter implementation for PCL and HP GL/2.
@@ -135,4 +137,10 @@
             RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
     }
 
+//    /** {@inheritDoc} */
+//    public void paintImage(Graphics2DImagePainter painter, 
+//            RendererContext context,
+//            int x, int y, int width, int height) throws IOException {
+//        paintImage(painter, context, null, x, y, width, height);
+//    }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java Mon Jun  2 07:30:39 2008
@@ -28,6 +28,8 @@
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.render.AbstractGraphics2DAdapter;
 import org.apache.fop.render.RendererContext;
@@ -37,6 +39,9 @@
  */
 public class AFPGraphics2DAdapter extends AbstractGraphics2DAdapter {
 
+    /** logging instance */
+    private static Log log = LogFactory.getLog(AFPGraphics2DAdapter.class);
+
     /**
      * Main constructor
      */
@@ -57,19 +62,18 @@
         
         //Paint to a BufferedImage
         int resolution = (int)Math.round(userAgent.getTargetResolution());
-        BufferedImage bi = paintToBufferedImage(painter, wrappedContext, resolution, gray, false);
-        
+        BufferedImage bi
+            = paintToBufferedImage(painter, wrappedContext, resolution, gray, false);        
         ImageManager manager = userAgent.getFactory().getImageManager();
         ImageSessionContext sessionContext = userAgent.getImageSessionContext();
-        
-        //TODO: AC - fix
-        String uri = null;
-        
+                
         try {
+            String uri = painter.getImageUri();
             ImageInfo info = manager.getImageInfo(uri, sessionContext);
             java.util.Map foreignAttributes = null;
             afp.drawBufferedImage(info, bi, resolution, x, y, width, height, foreignAttributes);
         } catch (ImageException e) {
+            log.error(e);
         }
     }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java Mon Jun  2 07:30:39 2008
@@ -169,12 +169,12 @@
     /**
      * The map of page segments
      */
-    private Map/*<String, String>*/pageSegmentsMap = null;
+    private Map/*<String,String>*/pageSegmentsMap = null;
 
     /**
      * The fonts on the current page
      */
-    private Map/*<String, AFPFontAttributes<*/currentPageFontMap = null;
+    private Map/*<String,AFPFontAttributes<*/currentPageFontMap = null;
 
     /**
      * The current color object
@@ -340,12 +340,9 @@
         super.setUserAgent(agent);
     }
 
-    private Map/* <String, AFPFontAttributes */getCurrentPageFonts() {
+    private Map/*<String,AFPFontAttributes>*/getCurrentPageFonts() {
         if (currentPageFontMap == null) {
-            this.currentPageFontMap = new java.util.HashMap/*
-                                                             * <String,
-                                                             * AFPFontAttributes
-                                                             */();
+            this.currentPageFontMap = new java.util.HashMap/*<String,AFPFontAttributes>*/();
         }
         return this.currentPageFontMap;
     }
@@ -492,42 +489,41 @@
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    // TODO - AC fix
-    protected void drawBackAndBorders(Area area, float startx, float starty,
-            float width, float height) {
-        super.drawBackAndBorders(area, startx, starty, width, height);
-        Trait.Background back = (Trait.Background) area
-                .getTrait(Trait.BACKGROUND);
-
-        // the current block has a background so its contents are placed inside
-        // an overlay
-        // after drawing the background and borders
-        if (back != null) {
-            int x = pts2units(startx);
-            int y = pts2units(starty);
-            int w = mpts2units(width);
-            int h = mpts2units(height);
-            int res = getResolution();
-            final int rotation = 0;
-            getAFPDataStream().startOverlay(x, y, w, h, res, res, rotation);
-//            Color col = back.getColor();
-//            getAFPDataStream().createShading(x, y, w, h, col);
-        }
-    }
-
 //    /**
 //     * {@inheritDoc}
 //     */
-    protected void renderBlock(Block block) {
-//        // new block so start page segment
-////        getAFPDataStream().startPageSegment();
-        super.renderBlock(block);
-        getAFPDataStream().endOverlay();
-////        getAFPDataStream().endPageSegment();
-    }
+//    protected void drawBackAndBorders(Area area, float startx, float starty,
+//            float width, float height) {
+//        super.drawBackAndBorders(area, startx, starty, width, height);
+//        Trait.Background back = (Trait.Background) area
+//                .getTrait(Trait.BACKGROUND);
+//
+//        // the current block has a background so its contents are placed inside
+//        // an overlay
+//        // after drawing the background and borders
+//        if (back != null) {
+//            int x = pts2units(startx);
+//            int y = pts2units(starty);
+//            int w = mpts2units(width);
+//            int h = mpts2units(height);
+//            int res = getResolution();
+//            final int rotation = 0;
+//            getAFPDataStream().startOverlay(x, y, w, h, res, res, rotation);
+////            Color col = back.getColor();
+////            getAFPDataStream().createShading(x, y, w, h, col);
+//        }
+//    }
+//
+////    /**
+////     * {@inheritDoc}
+////     */
+//    protected void renderBlock(Block block) {
+////        // new block so start page segment
+//////        getAFPDataStream().startPageSegment();
+//        super.renderBlock(block);
+//        getAFPDataStream().endOverlay();
+//////        getAFPDataStream().endPageSegment();
+//    }
 
     /**
      * {@inheritDoc}
@@ -765,12 +761,12 @@
      * {@inheritDoc}
      */
     public void fillRect(float x, float y, float width, float height) {
-        getAFPDataStream().createShading(
-                pts2units(x), pts2units(y), pts2units(width), pts2units(height),
-                currentColor);
-//        getAFPDataStream().createLine(pts2units(x), pts2units(y),
-//                pts2units(x + width), pts2units(y), pts2units(height),
+//        getAFPDataStream().createShading(
+//                pts2units(x), pts2units(y), pts2units(width), pts2units(height),
 //                currentColor);
+        getAFPDataStream().createLine(pts2units(x), pts2units(y),
+                pts2units(x + width), pts2units(y), pts2units(height),
+                currentColor);
     }
 
     /**
@@ -966,11 +962,11 @@
                     int afpw = mpts2units(posInt.getWidth());
                     int afph = mpts2units(posInt.getHeight());
                     int afpres = getResolution();
-
+                    String mimeType = info.getMimeType();
                     // create image object parameters
                     ImageObjectInfo imageObjectInfo = new ImageObjectInfo();
                     imageObjectInfo.setUri(uri);
-                    imageObjectInfo.setMimeType(info.getMimeType());
+                    imageObjectInfo.setMimeType(mimeType);
                     imageObjectInfo.setX(afpx);
                     imageObjectInfo.setY(afpy);
                     imageObjectInfo.setWidth(afpw);
@@ -978,14 +974,12 @@
                     imageObjectInfo.setWidthRes(afpres);
                     imageObjectInfo.setHeightRes(afpres);
                     imageObjectInfo.setData(buf);
-                    imageObjectInfo
-                            .setDataHeight(ccitt.getSize().getHeightPx());
+                    imageObjectInfo.setDataHeight(ccitt.getSize().getHeightPx());
                     imageObjectInfo.setDataWidth(ccitt.getSize().getWidthPx());
                     imageObjectInfo.setColor(colorImages);
                     imageObjectInfo.setBitsPerPixel(bitsPerPixel);
                     imageObjectInfo.setCompression(ccitt.getCompression());
-                    imageObjectInfo
-                            .setResourceInfoFromForeignAttributes(foreignAttributes);
+                    imageObjectInfo.setResourceInfoFromForeignAttributes(foreignAttributes);
                     getAFPDataStream().createObject(imageObjectInfo);
                 } else if (img instanceof ImageXMLDOM) {
                     ImageXMLDOM imgXML = (ImageXMLDOM) img;
@@ -1074,8 +1068,10 @@
 
         // create image object parameters
         ImageObjectInfo imageObjectInfo = new ImageObjectInfo();
-        imageObjectInfo.setUri(imageInfo.getOriginalURI());
-        imageObjectInfo.setMimeType(imageInfo.getMimeType());
+        if (imageInfo != null) {
+            imageObjectInfo.setUri(imageInfo.getOriginalURI());
+            imageObjectInfo.setMimeType(imageInfo.getMimeType());
+        }
         imageObjectInfo.setX(mpts2units(x));
         imageObjectInfo.setY(mpts2units(y));
         imageObjectInfo.setWidth(mpts2units(w));
@@ -1373,9 +1369,9 @@
                 && pageViewport.getExtensionAttachments().size() > 0) {
             // Extract all AFPPageSetup instances from the attachment list on
             // the s-p-m
-            Iterator i = pageViewport.getExtensionAttachments().iterator();
-            while (i.hasNext()) {
-                ExtensionAttachment attachment = (ExtensionAttachment) i.next();
+            Iterator it = pageViewport.getExtensionAttachments().iterator();
+            while (it.hasNext()) {
+                ExtensionAttachment attachment = (ExtensionAttachment) it.next();
                 if (AFPPageSetup.CATEGORY.equals(attachment.getCategory())) {
                     AFPPageSetup aps = (AFPPageSetup) attachment;
                     String element = aps.getElementName();
@@ -1702,5 +1698,4 @@
     protected boolean isGOCAEnabled() {
         return this.gocaEnabled;
     }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java Mon Jun  2 07:30:39 2008
@@ -242,42 +242,39 @@
                 afpRenderer.setResolution(rendererResolutionCfg.getValueAsInteger(240));
             }
 
+            // TODO: provide support for different MO:DCA interchange sets
             // the MO:DCA interchange set in use (defaults to MO:DCA-L)
-            Configuration interchangeSetCfg = cfg.getChild("interchange-set", false);
-            if (interchangeSetCfg != null) {
-                String interchangeSetString = interchangeSetCfg.getAttribute(
-                        "name", InterchangeSet.MODCA_PRESENTATION_INTERCHANGE_SET_2);
-                AFPDataStream afpDatastream = afpRenderer.getAFPDataStream();
-                InterchangeSet interchangeSet = InterchangeSet.valueOf(interchangeSetString);
-                afpDatastream.setInterchangeSet(interchangeSet);
+//            Configuration modcaCfg = cfg.getChild("modca", false);
+//            if (modcaCfg != null) {
+//                String interchangeSetString = cfg.getAttribute(
+//                        "interchange-set", InterchangeSet.MODCA_PRESENTATION_INTERCHANGE_SET_2);
+//                InterchangeSet interchangeSet = InterchangeSet.valueOf(interchangeSetString);
+//                afpRenderer.getAFPDataStream().setInterchangeSet(interchangeSet);
+//            }
 
-                if (interchangeSet.supportsLevel2()) {
-                    
-                    // a default external resource group file setting
-                    Configuration resourceGroupFileCfg
-                        = interchangeSetCfg.getChild("resource-group-file", false);
-                    if (resourceGroupFileCfg != null) {
-                        String resourceGroupDest = null;
-                        try {
-                            resourceGroupDest = resourceGroupFileCfg.getValue();
-                        } catch (ConfigurationException e) {
-                            LogUtil.handleException(log, e,
-                                    userAgent.getFactory().validateUserConfigStrictly());
-                        }
-                        File resourceGroupFile = new File(resourceGroupDest);
-                        if (resourceGroupFile.canWrite()) {
-                            afpDatastream.setDefaultResourceGroupFile(resourceGroupFile);
-                        } else {
-                            log.warn("Unable to write to default external resource group file '"
-                                    + resourceGroupDest);
-                        }
-                    }
-                }
+            // goca enabled
+            Configuration gocaSupportCfg = cfg.getChild("goca-enabled", false);
+            if (gocaSupportCfg != null) {
+                afpRenderer.setGOCAEnabled(true);
+            }
             
-                // goca enabled
-                Configuration gocaSupportCfg = interchangeSetCfg.getChild("goca-enabled", false);
-                if (gocaSupportCfg != null) {
-                    afpRenderer.setGOCAEnabled(true);
+            // a default external resource group file setting
+            Configuration resourceGroupFileCfg
+                = cfg.getChild("resource-group-file", false);
+            if (resourceGroupFileCfg != null) {
+                String resourceGroupDest = null;
+                try {
+                    resourceGroupDest = resourceGroupFileCfg.getValue();
+                } catch (ConfigurationException e) {
+                    LogUtil.handleException(log, e,
+                            userAgent.getFactory().validateUserConfigStrictly());
+                }
+                File resourceGroupFile = new File(resourceGroupDest);
+                if (resourceGroupFile.canWrite()) {
+                    afpRenderer.getAFPDataStream().setDefaultResourceGroupFile(resourceGroupFile);
+                } else {
+                    log.warn("Unable to write to default external resource group file '"
+                                + resourceGroupDest);
                 }
             }
         }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/ResourceInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/ResourceInfo.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/ResourceInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/ResourceInfo.java Mon Jun  2 07:30:39 2008
@@ -34,7 +34,6 @@
      */
     private ResourceLevel level = new ResourceLevel(ResourceLevel.PRINT_FILE);
     
-    
     /**
      * Sets the resource reference name
      * @param resourceName the resource reference name
@@ -54,7 +53,8 @@
      * {@inheritDoc}
      */
     public String toString() {
-        return "ResourceInfo(" + (name != null ? "name=" + name : "" ) + ", level=" + level + ")";
+        return "ResourceInfo(" + (name != null ? "name=" + name
+                + ", " : "") + "level=" + level + ")";
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java Mon Jun  2 07:30:39 2008
@@ -48,12 +48,12 @@
     /** include page segment element */
     public static final String INCLUDE_PAGE_SEGMENT = "include-page-segment";
 
-//    /** include resource element (external) */
-//    public static final String RESOURCE = "resource";
-
     /** NOP */
     public static final String NO_OPERATION = "no-operation";
 
+    /** resource information (name, level, dest) */
+//    public static final String RESOURCE_INFO = "resource-info";
+
     /**
      * The namespace used for AFP extensions
      */
@@ -94,6 +94,9 @@
             foObjs.put(
                 NO_OPERATION,
                 new AFPNoOperationMaker());
+//           foObjs.put(
+//               RESOURCE_INFO,
+//               new AFPResourceInfoMaker());
         }
     }
 
@@ -127,6 +130,12 @@
         }
     }
 
+//    static class AFPResourceInfoMaker extends ElementMapping.Maker {
+//        public FONode make(FONode parent) {
+//            return new AFPResourceInfoElement(parent);
+//        }
+//    }
+
 //    static class AFPPageGroupMaker extends ElementMapping.Maker {
 //        public FONode make(FONode parent) {
 //            return new AFPElement(parent, PAGE_GROUP);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStream.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStream.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AFPDataStream.java Mon Jun  2 07:30:39 2008
@@ -41,7 +41,7 @@
  * conforming to a given format. Application programs can generate data streams
  * destined for a presentation service, archive library, presentation device or
  * another application program. The strategic presentation data stream
- * architectures used is Mixed Object Document Content Architecture (MO:DCA�).
+ * architectures used is Mixed Object Document Content Architecture (MO:DCA).
  * 
  * The MO:DCA architecture defines the data stream used by applications to
  * describe documents and object envelopes for interchange with other
@@ -50,7 +50,6 @@
  * printed in local or distributed systems environments. Presentation fidelity
  * is accommodated by including resource objects in the documents that reference
  * them.
- * 
  */
 public class AFPDataStream extends AbstractResourceGroupContainer {
 
@@ -144,10 +143,10 @@
     private int instreamObjectCount = 0;
 
     /**
-     * The MO:DCA interchange set in use (default to MO:DCA-L resource set)
+     * The MO:DCA interchange set in use (default to MO:DCA-P IS/2 set)
      */
     private InterchangeSet interchangeSet
-        = InterchangeSet.valueOf(InterchangeSet.MODCA_RESOURCE_INTERCHANGE_SET);
+        = InterchangeSet.valueOf(InterchangeSet.MODCA_PRESENTATION_INTERCHANGE_SET_2);
 
     /**
      * The external resource group manager
@@ -311,8 +310,6 @@
             resourceObject.setDataObject(currentOverlay);
             getResourceGroup().addObject(resourceObject);
         }
-//        currentPageGroup.getResourceEnvironmentGroup().addObject(currentOverlay);
-//        currentPageObject.getActiveEnvironmentGroup().createOverlay(overlayName);
 
         currentPageObject.createIncludePageOverlay(overlayName, x, y, 0);
         currentPage = currentOverlay;
@@ -458,6 +455,9 @@
     public AbstractNamedAFPObject createObject(DataObjectInfo dataObjectInfo) {
         String uri = dataObjectInfo.getUri();
 
+        if (uri == null) {
+            uri = "/";
+        }
         // if this is an instream data object adjust uri to ensure that it is
         // unique
         if (uri.endsWith("/")) {
@@ -486,8 +486,9 @@
                     getCurrentPage().addObject(includeObject);
                     return includeObject.getDataObject();
                 } else {
-                    log.warn("data object located at '" + uri
-                        + "' cannot be referenced with an include so it will be embedded directly");
+                    log.warn("data object located at '" + uri + "'"
+                            + " of type '" + objectType.getMimeType() + "'"
+                            + " cannot be included with an IOB so it will be embedded directly");
                 }
             } else {
                 if (resourceLevel.isExternal()) {
@@ -495,7 +496,6 @@
                             + ": not available, object " + getName() + " will reside inline");
                 }                
             }
-
         }
         // unrecognised/unsupported object type so create/embed data object
         // directly in current page
@@ -925,7 +925,7 @@
                         .getExternalResourceGroupFile();
                 resourceGroup = (ResourceGroup)getExternalResourceGroups().get(resourceGroupFile);
                 if (resourceGroup == null) {
-                    resourceGroup = new ResourceGroup(container);
+                    resourceGroup = new ResourceGroup();
                     externalResourceGroups
                             .put(resourceGroupFile, resourceGroup);
                 }
@@ -941,20 +941,6 @@
         }
     }
 
-//    /**
-//     * Starts a new page segment.
-//     */
-//    public void startPageSegment() {
-//        currentPageObject.startPageSegment();
-//    }
-//
-//    /**
-//     * Ends the current page segment.
-//     */
-//    public void endPageSegment() {
-//        currentPageObject.endPageSegment();
-//    }
-
     /**
      * Sets the MO:DCA interchange set to use
      * @param interchangeSet the MO:DCA interchange set

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java Mon Jun  2 07:30:39 2008
@@ -23,10 +23,6 @@
 import java.io.OutputStream;
 
 import org.apache.fop.render.afp.DataObjectInfo;
-import org.apache.fop.render.afp.ImageObjectInfo;
-import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
-import org.apache.fop.render.afp.tools.StringUtils;
-import org.apache.xmlgraphics.image.codec.tiff.TIFFImage;
 
 /**
  * An abstract container of resource objects
@@ -38,6 +34,11 @@
     private ResourceGroup resourceGroup = null;
 
     /**
+     * The data object factory
+     */
+    private DataObjectFactory dataObjectFactory = new DataObjectFactory();
+
+    /**
      * Default constructor
      */
     public AbstractResourceGroupContainer() {
@@ -96,7 +97,7 @@
      */
     protected ResourceGroup getResourceGroup() {
         if (resourceGroup == null) {
-            resourceGroup = new ResourceGroup(this);
+            resourceGroup = new ResourceGroup();
         }
         return resourceGroup;
     }
@@ -164,84 +165,14 @@
         io.setImageIDESize((byte) bitsPerPixel);
         io.setImageData(bw);
     }
-
-    private static final String IMAGE_NAME_PREFIX = "IMG";
-    private static final String GRAPHIC_NAME_PREFIX = "GRA";
-    
-    // not currently used/implemented
-//    private static final String BARCODE_NAME_PREFIX = "BAR";
-//    private static final String OTHER_NAME_PREFIX = "OTH";
-
-    /**
-     * Helper method to create an image on the current container and to return
-     * the object.
-     * @param info the image object info
-     * @return a newly created image object
-     */
-    protected ImageObject createImage(ImageObjectInfo info) {
-        String name = IMAGE_NAME_PREFIX
-                + StringUtils.lpad(String.valueOf(getResourceCount() + 1), '0', 5);
-        ImageObject imageObj = new ImageObject(name);
-        if (info.hasCompression()) {
-            int compression = info.getCompression();
-            switch (compression) {
-            case TIFFImage.COMP_FAX_G3_1D:
-                imageObj.setImageEncoding(ImageContent.COMPID_G3_MH);
-                    break;
-                case TIFFImage.COMP_FAX_G3_2D:
-                    imageObj.setImageEncoding(ImageContent.COMPID_G3_MR);
-                    break;
-                case TIFFImage.COMP_FAX_G4_2D:
-                    imageObj.setImageEncoding(ImageContent.COMPID_G3_MMR);
-                    break;
-                default:
-                    throw new IllegalStateException(
-                            "Invalid compression scheme: " + compression);
-            }
-        }
-        imageObj.setImageParameters(info.getWidthRes(), info.getHeightRes(), 
-                info.getDataWidth(), info.getDataHeight());
-        if (info.isColor()) {
-            imageObj.setImageIDESize((byte)24);
-            imageObj.setImageData(info.getData());
-        } else {
-            convertToGrayScaleImage(imageObj, info.getData(),
-                    info.getDataWidth(), info.getDataHeight(),
-                    info.getBitsPerPixel());
-        }
-        return imageObj;
-    }
     
     /**
-     * Helper method to create a graphic in the current container and to return
-     * the object.
-     * @param info the data object info
-     * @return a newly created graphics object
-     */
-    protected GraphicsObject createGraphic(DataObjectInfo info) {
-        String name = GRAPHIC_NAME_PREFIX
-            + StringUtils.lpad(String.valueOf(getResourceCount() + 1), '0', 5);
-        GraphicsObject graphicsObj = new GraphicsObject(name);
-        return graphicsObj;
-    }
-
-    /**
      * Creates and returns a new data object
-     * @param info the data object parameters
+     * @param dataObjectInfo the data object info
      * @return a newly created data object
      */
-    public AbstractNamedAFPObject createObject(DataObjectInfo info) {
-        AbstractNamedAFPObject dataObject;
-        if (info instanceof ImageObjectInfo) {
-            dataObject = createImage((ImageObjectInfo)info);
-        } else {
-            dataObject = createGraphic(info);
-        }
-        dataObject.setFullyQualifiedName(
-            FullyQualifiedNameTriplet.TYPE_DATA_OBJECT_INTERNAL_RESOURCE_REF,
-            FullyQualifiedNameTriplet.FORMAT_CHARSTR, dataObject.getName());
-
-        return dataObject;
+    public AbstractNamedAFPObject createObject(DataObjectInfo dataObjectInfo) {
+        return dataObjectFactory.create(dataObjectInfo);
     }
 
     /**

Added: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java?rev=662448&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java (added)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java Mon Jun  2 07:30:39 2008
@@ -0,0 +1,180 @@
+/*
+ * 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;
+
+import org.apache.fop.render.afp.DataObjectInfo;
+import org.apache.fop.render.afp.ImageObjectInfo;
+import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
+import org.apache.fop.render.afp.tools.StringUtils;
+import org.apache.xmlgraphics.image.codec.tiff.TIFFImage;
+
+/**
+ * Creator of MO;DCA data objects
+ */
+public class DataObjectFactory {
+    private static final String IMAGE_NAME_PREFIX = "IMG";
+    private static final String GRAPHIC_NAME_PREFIX = "GRA";
+//    private static final String BARCODE_NAME_PREFIX = "BAR";
+//    private static final String OTHER_NAME_PREFIX = "OTH";
+
+    private int imageCount = 0;
+    private int graphicCount = 0;
+    
+    /**
+     * Converts a byte array containing 24 bit RGB image data to a grayscale
+     * image.
+     * 
+     * @param io
+     *            the target image object
+     * @param raw
+     *            the buffer containing the RGB image data
+     * @param width
+     *            the width of the image in pixels
+     * @param height
+     *            the height of the image in pixels
+     * @param bitsPerPixel
+     *            the number of bits to use per pixel
+     *            
+     * TODO: move this method somewhere appropriate in commons
+     */
+    private static void convertToGrayScaleImage(ImageObject io, byte[] raw, int width,
+            int height, int bitsPerPixel) {
+        int pixelsPerByte = 8 / bitsPerPixel;
+        int bytewidth = (width / pixelsPerByte);
+        if ((width % pixelsPerByte) != 0) {
+            bytewidth++;
+        }
+        byte[] bw = new byte[height * bytewidth];
+        byte ib;
+        for (int y = 0; y < height; y++) {
+            ib = 0;
+            int i = 3 * y * width;
+            for (int x = 0; x < width; x++, i += 3) {
+
+                // see http://www.jguru.com/faq/view.jsp?EID=221919
+                double greyVal = 0.212671d * ((int) raw[i] & 0xff) + 0.715160d
+                        * ((int) raw[i + 1] & 0xff) + 0.072169d
+                        * ((int) raw[i + 2] & 0xff);
+                switch (bitsPerPixel) {
+                case 1:
+                    if (greyVal < 128) {
+                        ib |= (byte) (1 << (7 - (x % 8)));
+                    }
+                    break;
+                case 4:
+                    greyVal /= 16;
+                    ib |= (byte) ((byte) greyVal << ((1 - (x % 2)) * 4));
+                    break;
+                case 8:
+                    ib = (byte) greyVal;
+                    break;
+                default:
+                    throw new UnsupportedOperationException(
+                            "Unsupported bits per pixel: " + bitsPerPixel);
+                }
+
+                if ((x % pixelsPerByte) == (pixelsPerByte - 1)
+                        || ((x + 1) == width)) {
+                    bw[(y * bytewidth) + (x / pixelsPerByte)] = ib;
+                    ib = 0;
+                }
+            }
+        }
+        io.setImageIDESize((byte) bitsPerPixel);
+        io.setImageData(bw);
+    }
+
+    /**
+     * Helper method to create an image on the current container and to return
+     * the object.
+     * @param info the image object info
+     * @return a newly created image object
+     */
+    protected ImageObject createImage(ImageObjectInfo info) {
+        String name = IMAGE_NAME_PREFIX
+                + StringUtils.lpad(String.valueOf(++imageCount), '0', 5);
+        ImageObject imageObj = new ImageObject(name);
+        if (info.hasCompression()) {
+            int compression = info.getCompression();
+            switch (compression) {
+            case TIFFImage.COMP_FAX_G3_1D:
+                imageObj.setImageEncoding(ImageContent.COMPID_G3_MH);
+                    break;
+                case TIFFImage.COMP_FAX_G3_2D:
+                    imageObj.setImageEncoding(ImageContent.COMPID_G3_MR);
+                    break;
+                case TIFFImage.COMP_FAX_G4_2D:
+                    imageObj.setImageEncoding(ImageContent.COMPID_G3_MMR);
+                    break;
+                default:
+                    throw new IllegalStateException(
+                            "Invalid compression scheme: " + compression);
+            }
+        }
+        imageObj.setImageParameters(info.getWidthRes(), info.getHeightRes(), 
+                info.getDataWidth(), info.getDataHeight());
+        if (info.isColor()) {
+            imageObj.setImageIDESize((byte)24);
+            imageObj.setImageData(info.getData());
+        } else {
+            convertToGrayScaleImage(imageObj, info.getData(),
+                    info.getDataWidth(), info.getDataHeight(),
+                    info.getBitsPerPixel());
+        }
+        return imageObj;
+    }
+    
+    /**
+     * Helper method to create a graphic in the current container and to return
+     * the object.
+     * @param info the data object info
+     * @return a newly created graphics object
+     */
+    protected GraphicsObject createGraphic(DataObjectInfo info) {
+        String name = GRAPHIC_NAME_PREFIX
+            + StringUtils.lpad(String.valueOf(++graphicCount), '0', 5);
+        GraphicsObject graphicsObj = new GraphicsObject(name);
+        return graphicsObj;
+    }
+
+    /**
+     * Creates and returns a new data object
+     * @param dataObjectInfo the data object info
+     * @return a newly created data object
+     */
+    public AbstractDataObject create(DataObjectInfo dataObjectInfo) {
+        AbstractDataObject dataObject;
+        if (dataObjectInfo instanceof ImageObjectInfo) {
+            dataObject = createImage((ImageObjectInfo)dataObjectInfo);
+        } else {
+            dataObject = createGraphic(dataObjectInfo);
+        }
+        dataObject.setViewport(dataObjectInfo.getX(), dataObjectInfo.getY(),
+                dataObjectInfo.getWidth(), dataObjectInfo.getHeight(),
+                dataObjectInfo.getWidthRes(), dataObjectInfo.getHeightRes(),
+                dataObjectInfo.getRotation());
+
+        dataObject.setFullyQualifiedName(
+            FullyQualifiedNameTriplet.TYPE_DATA_OBJECT_INTERNAL_RESOURCE_REF,
+            FullyQualifiedNameTriplet.FORMAT_CHARSTR, dataObject.getName());
+
+        return dataObject;
+    }
+}

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/DataObjectFactory.java
------------------------------------------------------------------------------
    svn:keywords = Revision Id

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java Mon Jun  2 07:30:39 2008
@@ -67,7 +67,7 @@
     public void setViewport(int x, int y, int width, int height,
             int widthRes, int heightRes, int rotation) {
         super.setViewport(x, y, width, height, widthRes, heightRes, rotation);
-        objectEnvironmentGroup.setGraphicsData(
+        getObjectEnvironmentGroup().setGraphicsData(
                 widthRes, heightRes, 0, x + width, 0, y + height);        
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/IncludeObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/IncludeObject.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/IncludeObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/IncludeObject.java Mon Jun  2 07:30:39 2008
@@ -117,11 +117,6 @@
         this.dataObjectAccessor = dataObjectAccessor;
         
         AbstractNamedAFPObject dataObject = dataObjectAccessor.getDataObject();
-        // Strip any object container
-        if (dataObject instanceof ObjectContainer) {
-            ObjectContainer objectContainer = (ObjectContainer)dataObject;
-            dataObject = objectContainer.getDataObject();
-        }
         if (dataObject instanceof ImageObject) {
             this.dataObjectType = TYPE_IMAGE;
         } else if (dataObject instanceof GraphicsObject) {
@@ -130,6 +125,11 @@
             this.dataObjectType = TYPE_PAGE_SEGMENT;
         } else {
             this.dataObjectType = TYPE_OTHER;
+            // Strip any object container
+            if (dataObject instanceof ObjectContainer) {
+                ObjectContainer objectContainer = (ObjectContainer)dataObject;
+                dataObject = objectContainer.getDataObject();
+            }
         }
 
         DataObjectInfo dataObjectInfo = dataObjectAccessor.getDataObjectInfo();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java Mon Jun  2 07:30:39 2008
@@ -75,7 +75,8 @@
                         COMPID_EPS,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x0D},
                         "Encapsulated Postscript",
-                        false
+                        false,
+                        MimeConstants.MIME_EPS
                 )
         );
         mimeEntryMap.put(
@@ -84,7 +85,8 @@
                         COMPID_TIFF,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x0E},
                         "TIFF",
-                        false
+                        false,
+                        MimeConstants.MIME_TIFF
                 )
         );
         mimeEntryMap.put(
@@ -93,7 +95,8 @@
                         COMPID_GIF,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x16},
                         "GIF",
-                        true
+                        true,
+                        MimeConstants.MIME_GIF
                 )
         );
         mimeEntryMap.put(
@@ -102,7 +105,8 @@
                         COMPID_JFIF,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x17},
                         "JFIF",
-                        true
+                        true,
+                        MimeConstants.MIME_JPEG
                 )
         );
         mimeEntryMap.put(MimeConstants.MIME_PDF,
@@ -110,7 +114,8 @@
                         COMPID_PDF_SINGLE_PAGE,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x19},
                         "PDF Single-page Object",
-                        true
+                        true,
+                        MimeConstants.MIME_PDF
                 )
         );         
         mimeEntryMap.put(
@@ -119,7 +124,8 @@
                         COMPID_PCL_PAGE_OBJECT,
                         new byte[] {0x06, 0x07, 0x2B, 0x12, 0x00, 0x04, 0x01, 0x01, 0x22},
                         "PCL Page Object",
-                        true
+                        true,
+                        MimeConstants.MIME_PCL
                 )
         );
     }
@@ -152,6 +158,7 @@
         private byte[] oid;
         private String name;
         private boolean canBeIncluded;
+        private String mimeType;
         
         /**
          * Main constructor
@@ -159,13 +166,15 @@
          * @param oid the object id of this object type
          * @param name the object type name
          * @param canBeIncluded true if this object can be included with an IOB structured field
+         * @param mimeType the mime type associated with this object type
          */
         public ObjectType(byte componentId, byte[] oid, String name,
-                boolean canBeIncluded) {
+                boolean canBeIncluded, String mimeType) {
             this.componentId = componentId;
             this.oid = oid;
             this.name = name;
             this.canBeIncluded = canBeIncluded;
+            this.mimeType = mimeType;
         }
                 
         /**
@@ -197,7 +206,14 @@
         public boolean canBeIncluded() {
             return this.canBeIncluded;
         }
-        
+
+        /**
+         * @return the mime type associated with this object type
+         */
+        public String getMimeType() {
+            return this.mimeType;
+        }
+
         /**
          * {@inheritDoc}
          */

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=662448&r1=662447&r2=662448&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 Mon Jun  2 07:30:39 2008
@@ -26,7 +26,6 @@
 import java.util.Map;
 
 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.ResourceLevel;
 import org.apache.fop.render.afp.tools.StringUtils;
@@ -44,34 +43,22 @@
     /**
      * Mapping of resource uri to data resource object (image/graphic) 
      */
-    private Map/*<String, Writeable>*/ resourceMap = null;
-
-    /**
-     * This resource groups container
-     */
-    private AbstractResourceGroupContainer container = null;
+    private Map/*<String,Writeable>*/ resourceMap = null;
 
     /**
      * Default constructor
-     * @param container the resource group container 
      */
-    public ResourceGroup(AbstractResourceGroupContainer container) {
-        this(DEFAULT_NAME, container);
+    public ResourceGroup() {
+        this(DEFAULT_NAME);
     }
 
     /**
      * Constructor for the ResourceGroup, this takes a
      * name parameter which must be 8 characters long.
      * @param name the resource group name
-     * @param container the parent resource group container
      */
-    public ResourceGroup(String name, AbstractResourceGroupContainer container) {
+    public ResourceGroup(String name) {
         super(name);
-        this.container = container;
-    }
-
-    private AbstractResourceGroupContainer getContainer() {
-        return this.container;
     }
 
     private static final String OBJECT_CONTAINER_NAME_PREFIX = "OC";
@@ -82,6 +69,8 @@
         return new ObjectContainer(name);
     }
     
+    private DataObjectFactory dataObjectFactory = new DataObjectFactory();
+    
     /**
      * Creates a data object in this resource group
      * @param dataObjectInfo the data object info
@@ -94,17 +83,7 @@
         ResourceLevel resourceLevel = resourceInfo.getLevel();
         AbstractDataObject dataObj;
         if (dataObjectAccessor == null) {
-            if (dataObjectInfo instanceof ImageObjectInfo) {
-                dataObj = getContainer().createImage((ImageObjectInfo)dataObjectInfo);
-            } else {
-                dataObj = getContainer().createGraphic(dataObjectInfo);
-            }
-
-            dataObj.setViewport(dataObjectInfo.getX(), dataObjectInfo.getY(),
-                    dataObjectInfo.getWidth(), dataObjectInfo.getHeight(),
-                    dataObjectInfo.getWidthRes(), dataObjectInfo.getHeightRes(),
-                    dataObjectInfo.getRotation());
-
+            dataObj = dataObjectFactory.create(dataObjectInfo);
             ObjectContainer objectContainer = null;
             String resourceName = resourceInfo.getName();
             if (resourceName != null) {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/java2d/Java2DGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/java2d/Java2DGraphics2DAdapter.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/java2d/Java2DGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/java2d/Java2DGraphics2DAdapter.java Mon Jun  2 07:30:39 2008
@@ -28,13 +28,13 @@
 
 import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
 
-import org.apache.fop.render.Graphics2DAdapter;
+import org.apache.fop.render.AbstractGraphics2DAdapter;
 import org.apache.fop.render.RendererContext;
 
 /**
  * Graphics2DAdapter implementation for Java2D.
  */
-public class Java2DGraphics2DAdapter implements Graphics2DAdapter {
+public class Java2DGraphics2DAdapter extends AbstractGraphics2DAdapter {
 
     /** {@inheritDoc} */
     public void paintImage(Graphics2DImagePainter painter,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java Mon Jun  2 07:30:39 2008
@@ -700,6 +700,10 @@
                     public Dimension getImageSize() {
                         return paintRect.getSize();
                     }
+                    
+                    public String getImageUri() {
+                        return null;
+                    }
 
                 };
                 g2a.paintImage(painter, rc,
@@ -1560,6 +1564,10 @@
                 return paintRect.getSize();
             }
 
+            public String getImageUri() {
+                return null;
+            }
+
         };
         try {
             g2a.paintImage(painter, rc,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java?rev=662448&r1=662447&r2=662448&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java Mon Jun  2 07:30:39 2008
@@ -28,13 +28,14 @@
 import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
 import org.apache.xmlgraphics.ps.PSGenerator;
 
+import org.apache.fop.render.AbstractGraphics2DAdapter;
 import org.apache.fop.render.Graphics2DAdapter;
 import org.apache.fop.render.RendererContext;
 
 /**
  * Graphics2DAdapter implementation for PostScript.
  */
-public class PSGraphics2DAdapter implements Graphics2DAdapter {
+public class PSGraphics2DAdapter extends AbstractGraphics2DAdapter {
 
     private PSGenerator gen;
     private boolean clip = true;



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Re: svn commit: r662448 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: conf/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/events/ src/java/org/apache/fop/image/loader/batik/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/ap...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Thank you!!

On 02.06.2008 17:17:41 Adrian Cumiskey wrote:
> Hi Jeremias,
> 
> Ok, I will look into trying to use the AFPState/RendererContext interface instead.
> 
> Adrian.
> 
> Jeremias Maerki wrote:
> > Hi Adrian,
> > 
> > I'm not happy with the change of the Graphics2DImagePainter interface in
> > XGCommons that you seem to have done locally. This interface is targeted
> > at painting only. IMO it should not assume that every image also has a
> > URI associated with it for whatever that URI will then be used. For
> > example, foreign objects don't have an explicit URI. If you need the
> > MIME type and the original URI of an image inside the
> > AFPGraphics2DAdapter, you can pass those in through the RendererContext.
> > For example, AFPRenderer.drawImage() already has the ImageInfo object
> > and would simply need to put it in the RendererContext. Extending the
> > Graphics2DPainter interface just for transporting some
> > non-painting-related information that only the AFP renderer needs is not
> > justification enough for this change if you ask me. Plus this breaks
> > other applications that rely on this interface.
> > 
> > On 02.06.2008 16:30:40 acumiskey wrote:
> >> Author: acumiskey
> >> Date: Mon Jun  2 07:30:39 2008
> >> New Revision: 662448
> >>
> >> URL: http://svn.apache.org/viewvc?rev=662448&view=rev
> >> Log:
> >> * getImageUri() implementation provided on Graphics2DAdaptor implementations.
> >> * Refactored data object creation abilities from AbstractResourceGroupContainer into a new DataObjectFactory class. 
> >> * Added mime type to ObjectType inner class in Registry for warn/error logging purposes.
> >> * Fixed problem with handling ObjectContainer objects in IncludeObject.
> >> * Added documentation for configuring AFP resource group files.
> >>
> > 
> > 
> > 
> > Jeremias Maerki
> > 
> > 




Jeremias Maerki


Re: svn commit: r662448 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: conf/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/events/ src/java/org/apache/fop/image/loader/batik/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/ap...

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi Jeremias,

Ok, I will look into trying to use the AFPState/RendererContext interface instead.

Adrian.

Jeremias Maerki wrote:
> Hi Adrian,
> 
> I'm not happy with the change of the Graphics2DImagePainter interface in
> XGCommons that you seem to have done locally. This interface is targeted
> at painting only. IMO it should not assume that every image also has a
> URI associated with it for whatever that URI will then be used. For
> example, foreign objects don't have an explicit URI. If you need the
> MIME type and the original URI of an image inside the
> AFPGraphics2DAdapter, you can pass those in through the RendererContext.
> For example, AFPRenderer.drawImage() already has the ImageInfo object
> and would simply need to put it in the RendererContext. Extending the
> Graphics2DPainter interface just for transporting some
> non-painting-related information that only the AFP renderer needs is not
> justification enough for this change if you ask me. Plus this breaks
> other applications that rely on this interface.
> 
> On 02.06.2008 16:30:40 acumiskey wrote:
>> Author: acumiskey
>> Date: Mon Jun  2 07:30:39 2008
>> New Revision: 662448
>>
>> URL: http://svn.apache.org/viewvc?rev=662448&view=rev
>> Log:
>> * getImageUri() implementation provided on Graphics2DAdaptor implementations.
>> * Refactored data object creation abilities from AbstractResourceGroupContainer into a new DataObjectFactory class. 
>> * Added mime type to ObjectType inner class in Registry for warn/error logging purposes.
>> * Fixed problem with handling ObjectContainer objects in IncludeObject.
>> * Added documentation for configuring AFP resource group files.
>>
> 
> 
> 
> Jeremias Maerki
> 
> 


Re: svn commit: r662448 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: conf/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/events/ src/java/org/apache/fop/image/loader/batik/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/ap...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hi Adrian,

I'm not happy with the change of the Graphics2DImagePainter interface in
XGCommons that you seem to have done locally. This interface is targeted
at painting only. IMO it should not assume that every image also has a
URI associated with it for whatever that URI will then be used. For
example, foreign objects don't have an explicit URI. If you need the
MIME type and the original URI of an image inside the
AFPGraphics2DAdapter, you can pass those in through the RendererContext.
For example, AFPRenderer.drawImage() already has the ImageInfo object
and would simply need to put it in the RendererContext. Extending the
Graphics2DPainter interface just for transporting some
non-painting-related information that only the AFP renderer needs is not
justification enough for this change if you ask me. Plus this breaks
other applications that rely on this interface.

On 02.06.2008 16:30:40 acumiskey wrote:
> Author: acumiskey
> Date: Mon Jun  2 07:30:39 2008
> New Revision: 662448
> 
> URL: http://svn.apache.org/viewvc?rev=662448&view=rev
> Log:
> * getImageUri() implementation provided on Graphics2DAdaptor implementations.
> * Refactored data object creation abilities from AbstractResourceGroupContainer into a new DataObjectFactory class. 
> * Added mime type to ObjectType inner class in Registry for warn/error logging purposes.
> * Fixed problem with handling ObjectContainer objects in IncludeObject.
> * Added documentation for configuring AFP resource group files.
> 



Jeremias Maerki