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
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,
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
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;
/**
* 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
}
}
- /**
- * 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.