cziegeler    02/02/21 22:35:51

  Modified:    src/java/org/apache/cocoon/components/sax
                        XMLByteStreamCompiler.java
                        XMLByteStreamInterpreter.java
               src/scratchpad/src/org/apache/cocoon/transformation/pagination
                        Pagesheet.java
  Log:
  Now it compiles again!
  
  Revision  Changes    Path
  1.4       +2 -2      
xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java
  
  Index: XMLByteStreamCompiler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLByteStreamCompiler.java        4 Feb 2002 12:27:38 -0000       1.3
  +++ XMLByteStreamCompiler.java        22 Feb 2002 06:35:50 -0000      1.4
  @@ -67,11 +67,11 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Id: XMLByteStreamCompiler.java,v 1.3 2002/02/04 12:27:38 cziegeler 
Exp $
  + * @version CVS $Id: XMLByteStreamCompiler.java,v 1.4 2002/02/22 06:35:50 cziegeler 
Exp $
    */
   
   public final class XMLByteStreamCompiler
  -implements XMLSerializer, Component, Recyclable {
  +implements XMLSerializer, Recyclable {
   
       private HashMap map;
       private int     count;
  
  
  
  1.6       +2 -2      
xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamInterpreter.java
  
  Index: XMLByteStreamInterpreter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamInterpreter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLByteStreamInterpreter.java     4 Feb 2002 12:27:38 -0000       1.5
  +++ XMLByteStreamInterpreter.java     22 Feb 2002 06:35:50 -0000      1.6
  @@ -67,12 +67,12 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Id: XMLByteStreamInterpreter.java,v 1.5 2002/02/04 12:27:38 
cziegeler Exp $
  + * @version CVS $Id: XMLByteStreamInterpreter.java,v 1.6 2002/02/22 06:35:50 
cziegeler Exp $
    */
   
   public final class XMLByteStreamInterpreter
   extends AbstractXMLProducer
  -implements XMLDeserializer, Component, Recyclable {
  +implements XMLDeserializer, Recyclable {
   
       private static final int START_DOCUMENT         = 0;
       private static final int END_DOCUMENT           = 1;
  
  
  
  1.2       +30 -28    
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Pagesheet.java
  
  Index: Pagesheet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Pagesheet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Pagesheet.java    20 Feb 2002 20:56:19 -0000      1.1
  +++ Pagesheet.java    22 Feb 2002 06:35:51 -0000      1.2
  @@ -3,34 +3,34 @@
    ============================================================================
                      The Apache Software License, Version 1.1
    ============================================================================
  - 
  +
    Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  - 
  +
    Redistribution and use in source and binary forms, with or without modifica-
    tion, are permitted provided that the following conditions are met:
  - 
  +
    1. Redistributions of  source code must  retain the above copyright  notice,
       this list of conditions and the following disclaimer.
  - 
  +
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
  - 
  +
    3. The end-user documentation included with the redistribution, if any, must
       include  the following  acknowledgment:  "This product includes  software
       developed  by the  Apache Software Foundation  (http://www.apache.org/)."
       Alternately, this  acknowledgment may  appear in the software itself,  if
       and wherever such third-party acknowledgments normally appear.
  - 
  +
    4. The names "Apache Cocoon" and  "Apache Software Foundation" must  not  be
       used to  endorse or promote  products derived from  this software without
       prior written permission. For written permission, please contact
       [EMAIL PROTECTED]
  - 
  +
    5. Products  derived from this software may not  be called "Apache", nor may
       "Apache" appear  in their name,  without prior written permission  of the
       Apache Software Foundation.
  - 
  +
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  @@ -41,12 +41,12 @@
    ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
    (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  +
    This software  consists of voluntary contributions made  by many individuals
    on  behalf of the Apache Software  Foundation and was  originally created by
  - Stefano Mazzocchi  <[EMAIL PROTECTED]>. For more  information on the Apache 
  + Stefano Mazzocchi  <[EMAIL PROTECTED]>. For more  information on the Apache
    Software Foundation, please see <http://www.apache.org/>.
  - 
  +
   */
   
   package org.apache.cocoon.transformation.pagination;
  @@ -64,12 +64,12 @@
   import org.xml.sax.helpers.DefaultHandler;
   
   import org.apache.cocoon.Modifiable;
  -import org.apache.cocoon.util.ResizableContainer;
  +//import org.apache.cocoon.util.ResizableContainer;
   
   /**
    * Interprets the pagesheet rules to perform pagination.
  - * 
  - * FIXME (SM): this code sucks! It was done to show the concept of 
  + *
  + * FIXME (SM): this code sucks! It was done to show the concept of
    *             rule driven pagination (which I find very nice) but
    *             it needs major refactoring in order to be sufficiently
    *             stable to allow any input to enter without breaking
  @@ -79,10 +79,10 @@
    *             to blast the code and rewrite it better, you'll make me happy :)
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/02/20 20:56:19 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/22 06:35:51 $
    */
  - 
  -/* 
  +
  +/*
   
   This is an example pagesheet to show the power of this:
   
  @@ -105,23 +105,24 @@
   
   which indicates that:
   
  - 1) there is one item group called "picture" and each item is given by the 
  + 1) there is one item group called "picture" and each item is given by the
       element "file" of the namespace "http://apache.org/cocoon/directory/2.0";.
  -    
  +
    2) for the first page, the pagination rules indicate that there are two unit
  -    links (two above and two below, so linking to page -2 -1 0 +1 +2) and 
  +    links (two above and two below, so linking to page -2 -1 0 +1 +2) and
       range links have value 10 (so they link to page -10 and +10).
  - 
  +
    3) for the rest of the pages, there are three unit links (-3 -2 -1 0 +1 +2 +3)
       and range goes 20 (so +20 and -20).
  -    
  +
   */
   
   public class Pagesheet extends DefaultHandler implements Cloneable, Modifiable {
   
  +    private long lastModified;
  +/*
       private int level = 0;
       private int pg = 0;
  -    private long lastModified;
       private Pagesheet pagesheet;
       private PageRules rules;
   
  @@ -183,11 +184,11 @@
           this.itemGroupsPerElement = itemGroupsPerElement;
   
           this.pages = new ResizableContainer(5);
  -        
  +
           if ((this.itemGroupsPerName != null) && (this.itemGroupsPerElement != 
null)) {
               this.itemListsPerName = new HashMap(itemGroupsPerName.size());
               this.itemListsPerElement = new HashMap(itemGroupsPerName.size());
  -    
  +
               Iterator iter = itemGroupsPerName.values().iterator();
               for (int i = 0; iter.hasNext(); i++) {
                   ItemGroup group = (ItemGroup) iter.next();
  @@ -361,7 +362,7 @@
   
       public boolean store(String elementURI, String elementName) {
           PageRules rules = getPageRules(currentPage);
  -        return rules.store;        
  +        return rules.store;
       }
   
       public int itemCount(String elementURI, String elementName) {
  @@ -389,7 +390,7 @@
           PageRules p = (PageRules) pageRules.get(page);
           return (p != null) ? p : (PageRules) pageRules.get(0);
       }
  -
  +*/
       public void setLastModified(long lastModified) {
           this.lastModified = lastModified;
       }
  @@ -399,6 +400,7 @@
       }
   
       public Object clone() {
  -        return new Pagesheet(pageRules, itemGroupsPerName, itemGroupsPerElement);
  +        return null;
  +        //return new Pagesheet(pageRules, itemGroupsPerName, itemGroupsPerElement);
       }
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to