]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Eliminated currently unused code
authorPeter Bernard West <pbwest@apache.org>
Fri, 16 Apr 2004 05:15:16 +0000 (05:15 +0000)
committerPeter Bernard West <pbwest@apache.org>
Fri, 16 Apr 2004 05:15:16 +0000 (05:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197512 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/PageRefArea.java
src/java/org/apache/fop/area/PageViewport.java

index 9f5be318ebaed22ded767f5e46cb5a02f09c9b6e..e8e70664d27bedc3f40c05870da4742d0e4917fe 100644 (file)
 package org.apache.fop.area;
 
 import java.io.Serializable;
-import java.util.Map;
+//import java.util.Map;
 
 import org.apache.fop.datastructs.Node;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.flow.FoPageSequence;
 
 /**
- * The page.
- * This holds the contents of the page. Each region is added.
- * The unresolved references area added so that if the page is
- * serialized then it will handle the resolving properly after
- * being reloaded.
- * This is serializable so it can be saved to cache to save
- * memory if there are forward references.
- * The page is cloneable so the page master can make copies of
- * the top level page and regions.
+ * This holds the contents of the page.
  * 
  * @author The Apache XML-FOP sub-project
  * @author pbw
@@ -49,8 +41,8 @@ implements ReferenceArea, Serializable {
     private RegionStartVport regionStart = null;
     private RegionEndVport regionEnd = null;
 
-    // temporary map of unresolved objects used when serializing the page
-    private Map unresolved = null;
+//    // temporary map of unresolved objects used when serializing the page
+//    private Map unresolved = null;
     
     public PageRefArea(
             FoPageSequence pageSeq,
@@ -60,25 +52,25 @@ implements ReferenceArea, Serializable {
         super(pageSeq, generatedBy, parent, sync);
     }
 
-    /**
-     * Set the unresolved references on this page for serializing.
-     *
-     * @param unres the map of unresolved objects
-     */
-    public void setUnresolvedReferences(Map unres) {
-        unresolved = unres;
-    }
-
-    /**
-     * Get the map unresolved references from this page.
-     * This should be called after deserializing to retrieve
-     * the map of unresolved references that were serialized.
-     *
-     * @return the de-serialized map of unresolved objects
-     */
-    public Map getUnresolvedReferences() {
-        return unresolved;
-    }
+//    /**
+//     * Set the unresolved references on this page for serializing.
+//     *
+//     * @param unres the map of unresolved objects
+//     */
+//    public void setUnresolvedReferences(Map unres) {
+//        unresolved = unres;
+//    }
+//
+//    /**
+//     * Get the map unresolved references from this page.
+//     * This should be called after deserializing to retrieve
+//     * the map of unresolved references that were serialized.
+//     *
+//     * @return the de-serialized map of unresolved objects
+//     */
+//    public Map getUnresolvedReferences() {
+//        return unresolved;
+//    }
     
     /**
      * @return the regionAfter
index 5b1f61de245f17ffa3f0222e7b7f36091de11c8e..c9657aeb646c168666b4977730bad2cbec75c645 100644 (file)
@@ -18,9 +18,9 @@
 package org.apache.fop.area;
 
 import java.awt.geom.Rectangle2D;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
+//import java.io.IOException;
+//import java.io.ObjectOutputStream;
+//import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -89,7 +89,7 @@ implements Viewport, Resolveable {
     /**
      * Create a page viewport.
      * @param parent node of this viewport
-     * @param sync object on which teh Area is synchronized
+     * @param sync object on which the Area is synchronized
      * @param pageId the unique identifier of this page
      * @param p the page reference area for the contents of this page
      * @param bounds the dimensions of the viewport
@@ -371,48 +371,48 @@ implements Viewport, Resolveable {
         }
     }
 
-    /**
-     * Save the viewport pageRefArea to an object stream.
-     * The map of unresolved references are set on the pageRefArea so that
-     * the resolvers can be properly serialized and reloaded.
-     * @param out the object output stream to write the contents
-     */
-    public void savePage(ObjectOutputStream out) {
-        // set the unresolved references so they are serialized
-        synchronized (sync) {
-            ((PageRefArea)refArea).setUnresolvedReferences(unresolved);
-            try {
-                out.writeObject(refArea);
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-            refArea = null;
-        }
-    }
+//    /**
+//     * Save the viewport pageRefArea to an object stream.
+//     * The map of unresolved references are set on the pageRefArea so that
+//     * the resolvers can be properly serialized and reloaded.
+//     * @param out the object output stream to write the contents
+//     */
+//    public void savePage(ObjectOutputStream out) {
+//        // set the unresolved references so they are serialized
+//        synchronized (sync) {
+//            ((PageRefArea)refArea).setUnresolvedReferences(unresolved);
+//            try {
+//                out.writeObject(refArea);
+//            } catch (IOException e) {
+//                throw new RuntimeException(e);
+//            }
+//            refArea = null;
+//        }
+//    }
 
-    /**
-     * Load the viewport pageRefArea from an object stream.
-     * This loads the pageRefArea from the stream and
-     * if there are any unresolved references that were resolved
-     * while saved they will be resolved on the page contents.
-     * @param in the object input stream to read the pageRefArea from
-     * @throws Exception if there is an error loading the pageRefArea
-     */
-    public void loadPage(ObjectInputStream in) throws Exception {
-        synchronized (sync) {
-            PageRefArea pageRefArea = (PageRefArea) in.readObject();
-            refArea = pageRefArea;
-            unresolved = pageRefArea.getUnresolvedReferences();
-            if (unresolved != null && pendingResolved != null) {
-                for (Iterator iter = pendingResolved.keySet().iterator();
-                iter.hasNext();) {
-                    String id = (String) iter.next();
-                    resolve(id, (List)pendingResolved.get(id));
-                }
-                pendingResolved = null;
-            }
-        }
-    }
+//    /**
+//     * Load the viewport pageRefArea from an object stream.
+//     * This loads the pageRefArea from the stream and
+//     * if there are any unresolved references that were resolved
+//     * while saved they will be resolved on the page contents.
+//     * @param in the object input stream to read the pageRefArea from
+//     * @throws Exception if there is an error loading the pageRefArea
+//     */
+//    public void loadPage(ObjectInputStream in) throws Exception {
+//        synchronized (sync) {
+//            PageRefArea pageRefArea = (PageRefArea) in.readObject();
+//            refArea = pageRefArea;
+//            unresolved = pageRefArea.getUnresolvedReferences();
+//            if (unresolved != null && pendingResolved != null) {
+//                for (Iterator iter = pendingResolved.keySet().iterator();
+//                iter.hasNext();) {
+//                    String id = (String) iter.next();
+//                    resolve(id, (List)pendingResolved.get(id));
+//                }
+//                pendingResolved = null;
+//            }
+//        }
+//    }
 
     /**
      * Clone this page.