vmote       2003/09/01 12:21:08

  Modified:    src/java/org/apache/fop/apps Document.java
               src/java/org/apache/fop/fo FOInputHandler.java
                        FOTreeControl.java FObj.java
  Log:
  move storage of ID references from fo/FOInputHandler to fo/FOTreeControl 
(implemented in apps/Document)
  
  Revision  Changes    Path
  1.6       +18 -1     xml-fop/src/java/org/apache/fop/apps/Document.java
  
  Index: Document.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Document.java     1 Sep 2003 13:31:24 -0000       1.5
  +++ Document.java     1 Sep 2003 19:21:07 -0000       1.6
  @@ -53,6 +53,9 @@
   // 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 @@
       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
        */
  @@ -364,6 +373,14 @@
        */
       public Bookmarks getBookmarks() {
           return bookmarks;
  +    }
  +
  +    /**
  +     * Retuns the set of ID references.
  +     * @return the ID references
  +     */
  +    public Set getIDReferences() {
  +        return idReferences;
       }
   
   }
  
  
  
  1.8       +1 -19     xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java
  
  Index: FOInputHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FOInputHandler.java       21 Aug 2003 19:22:21 -0000      1.7
  +++ FOInputHandler.java       1 Sep 2003 19:21:07 -0000       1.8
  @@ -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 @@
    */
   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;
  @@ -104,14 +94,6 @@
        */
       public FOInputHandler(FOTreeControl foTreeControl) {
           this.foTreeControl = foTreeControl;
  -    }
  -
  -    /**
  -     * Retuns the set of ID references.
  -     * @return the ID references
  -     */
  -    public Set getIDReferences() {
  -        return idReferences;
       }
   
       /**
  
  
  
  1.6       +8 -1      xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java
  
  Index: FOTreeControl.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FOTreeControl.java        1 Sep 2003 18:33:05 -0000       1.5
  +++ FOTreeControl.java        1 Sep 2003 19:21:07 -0000       1.6
  @@ -53,6 +53,7 @@
   
   // Java
   import java.util.Map;
  +import java.util.Set;
   
   // FOP
   import org.apache.fop.fo.extensions.Bookmarks;
  @@ -106,5 +107,11 @@
        * @return the Bookmark object encapsulating the bookmarks for the FO Tree.
        */
       Bookmarks getBookmarks();
  +
  +    /**
  +     * Returns the set of ID references found in the FO Tree.
  +     * @return the ID references
  +     */
  +    Set getIDReferences();
   
   }
  
  
  
  1.16      +1 -1      xml-fop/src/java/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- FObj.java 24 Aug 2003 22:15:51 -0000      1.15
  +++ FObj.java 1 Sep 2003 19:21:07 -0000       1.16
  @@ -285,7 +285,7 @@
           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);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to