aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-09-01 19:21:07 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-09-01 19:21:07 +0000
commit29741488f060797401a577e9537ff34ec6534151 (patch)
tree5862d742296b6b5eb367547def2c4574a0e24eb5 /src/java/org
parentdeb20eb591751519aa42da2450eea44610a495c4 (diff)
downloadxmlgraphics-fop-29741488f060797401a577e9537ff34ec6534151.tar.gz
xmlgraphics-fop-29741488f060797401a577e9537ff34ec6534151.zip
move storage of ID references from fo/FOInputHandler to fo/FOTreeControl (implemented in apps/Document)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196886 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/apps/Document.java17
-rw-r--r--src/java/org/apache/fop/fo/FOInputHandler.java18
-rw-r--r--src/java/org/apache/fop/fo/FOTreeControl.java7
-rw-r--r--src/java/org/apache/fop/fo/FObj.java2
4 files changed, 25 insertions, 19 deletions
diff --git a/src/java/org/apache/fop/apps/Document.java b/src/java/org/apache/fop/apps/Document.java
index 39bb24f49..caaeee71a 100644
--- a/src/java/org/apache/fop/apps/Document.java
+++ b/src/java/org/apache/fop/apps/Document.java
@@ -53,6 +53,9 @@ package org.apache.fop.apps;
// Java
import java.util.Map;
import java.io.IOException;
+import java.util.Set;
+import java.util.HashSet;
+
// FOP
import org.apache.fop.area.AreaTree;
@@ -103,6 +106,12 @@ public class Document implements FOTreeControl, FOTreeListener {
private Bookmarks bookmarks = null;
/**
+ * The current set of id's in the FO tree.
+ * This is used so we know if the FO tree contains duplicates.
+ */
+ private Set idReferences = new HashSet();
+
+ /**
* Main constructor
* @param driver the Driver object that is the "parent" of this Document
*/
@@ -366,5 +375,13 @@ public class Document implements FOTreeControl, FOTreeListener {
return bookmarks;
}
+ /**
+ * Retuns the set of ID references.
+ * @return the ID references
+ */
+ public Set getIDReferences() {
+ return idReferences;
+ }
+
}
diff --git a/src/java/org/apache/fop/fo/FOInputHandler.java b/src/java/org/apache/fop/fo/FOInputHandler.java
index 4e605e61e..679ec3fe8 100644
--- a/src/java/org/apache/fop/fo/FOInputHandler.java
+++ b/src/java/org/apache/fop/fo/FOInputHandler.java
@@ -50,10 +50,6 @@
*/
package org.apache.fop.fo;
-// Java
-import java.util.Set;
-import java.util.HashSet;
-
// Avalon
import org.apache.avalon.framework.logger.AbstractLogEnabled;
@@ -87,12 +83,6 @@ import org.xml.sax.SAXException;
*/
public abstract class FOInputHandler extends AbstractLogEnabled {
/**
- * The current set of id's in the FO tree.
- * This is used so we know if the FO tree contains duplicates.
- */
- private Set idReferences = new HashSet();
-
- /**
* The FOTreeControl object that is controlling the FO Tree being built
*/
public FOTreeControl foTreeControl = null;
@@ -107,14 +97,6 @@ public abstract class FOInputHandler extends AbstractLogEnabled {
}
/**
- * Retuns the set of ID references.
- * @return the ID references
- */
- public Set getIDReferences() {
- return idReferences;
- }
-
- /**
* Returns the FontInfo object associated with this FOInputHandler.
* @return the FontInof object
*/
diff --git a/src/java/org/apache/fop/fo/FOTreeControl.java b/src/java/org/apache/fop/fo/FOTreeControl.java
index 2cf6cbc14..a77b6b2a8 100644
--- a/src/java/org/apache/fop/fo/FOTreeControl.java
+++ b/src/java/org/apache/fop/fo/FOTreeControl.java
@@ -53,6 +53,7 @@ package org.apache.fop.fo;
// Java
import java.util.Map;
+import java.util.Set;
// FOP
import org.apache.fop.fo.extensions.Bookmarks;
@@ -107,4 +108,10 @@ public interface FOTreeControl {
*/
Bookmarks getBookmarks();
+ /**
+ * Returns the set of ID references found in the FO Tree.
+ * @return the ID references
+ */
+ Set getIDReferences();
+
}
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index 5cce1eea0..b1510f269 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -285,7 +285,7 @@ public class FObj extends FONode {
if (prop != null) {
String str = prop.getString();
if (str != null && !str.equals("")) {
- Set idrefs = foInputHandler.getIDReferences();
+ Set idrefs = getFOTreeControl().getIDReferences();
if (!idrefs.contains(str)) {
id = str;
idrefs.add(id);