You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2001/09/06 13:20:39 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon/sitemap ContentAggregator.java

cziegeler    01/09/06 04:20:39

  Modified:    src/org/apache/cocoon/sitemap Tag: cocoon_20_branch
                        ContentAggregator.java
  Log:
  Removed obsolete code
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.13  +10 -38    xml-cocoon2/src/org/apache/cocoon/sitemap/ContentAggregator.java
  
  Index: ContentAggregator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/ContentAggregator.java,v
  retrieving revision 1.5.2.12
  retrieving revision 1.5.2.13
  diff -u -r1.5.2.12 -r1.5.2.13
  --- ContentAggregator.java	2001/09/05 22:18:15	1.5.2.12
  +++ ContentAggregator.java	2001/09/06 11:20:38	1.5.2.13
  @@ -37,7 +37,7 @@
   /**
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: ContentAggregator.java,v 1.5.2.12 2001/09/05 22:18:15 dims Exp $
  + * @version CVS $Id: ContentAggregator.java,v 1.5.2.13 2001/09/06 11:20:38 cziegeler Exp $
    */
   public class ContentAggregator extends ContentHandlerWrapper implements Generator, Cacheable, Composable {
   
  @@ -65,15 +65,6 @@
       /** The source URI associated with the request or <b>null</b>. */
       protected String source;
   
  -    /** The <code>XMLConsumer</code> receiving SAX events. */
  -    protected XMLConsumer xmlConsumer;
  -
  -    /** The <code>ContentHandler</code> receiving SAX events. */
  -    protected ContentHandler contentHandler;
  -
  -    /** The <code>LexicalHandler</code> receiving SAX events. */
  -    protected LexicalHandler lexicalHandler;
  -
       /** The <code>ComponentManager</code> */
       protected ComponentManager manager;
   
  @@ -125,7 +116,7 @@
        */
       public void generate() throws IOException, SAXException, ProcessingException {
           getLogger().debug("ContentAggregator: generating aggregated content");
  -        this.documentHandler.startDocument();
  +        this.contentHandler.startDocument();
           this.startElem(this.rootElementNS, this.rootElementNSPrefix, this.rootElement);
           try {
               for (int i = 0; i < this.parts.size(); i++) {
  @@ -151,7 +142,7 @@
               }
           } finally {
               this.endElem(this.rootElementNSPrefix, this.rootElement);
  -            this.documentHandler.endDocument();
  +            this.contentHandler.endDocument();
           }
           getLogger().debug("ContentAggregator: finished aggregating content");
       }
  @@ -227,23 +218,7 @@
        */
       public void setConsumer(XMLConsumer consumer) {
           this.setContentHandler(consumer);
  -        this.xmlConsumer = consumer;
  -        this.contentHandler = consumer;
  -        this.lexicalHandler = consumer;
  -    }
  -
  -    /**
  -     * Set the <code>LexicalHandler</code> that will receive XML data.
  -     * <br>
  -     * Subclasses may retrieve this <code>LexicalHandler</code> instance
  -     * accessing the protected <code>super.lexicalHandler</code> field.
  -     *
  -     * @exception IllegalStateException If the <code>LexicalHandler</code> or
  -     *                                  the <code>XMLConsumer</code> were
  -     *                                  already set.
  -     */
  -    public void setLexicalHandler(LexicalHandler handler) {
  -        this.lexicalHandler = handler;
  +        this.setLexicalHandler(consumer);
       }
   
       /**
  @@ -262,9 +237,6 @@
               ((Part)i.next()).source.recycle();
           this.parts.clear();
           this.currentNS.clear();
  -        this.xmlConsumer = null;
  -        this.contentHandler = null;
  -        this.lexicalHandler = null;
       }
   
       /**
  @@ -306,16 +278,16 @@
           this.pushNS(namespaceURI);
           AttributesImpl attrs = new AttributesImpl();
           if (!namespaceURI.equals("")) {
  -            this.documentHandler.startPrefixMapping(prefix, namespaceURI);
  +            this.contentHandler.startPrefixMapping(prefix, namespaceURI);
           }
  -        this.documentHandler.startElement(namespaceURI, name, name, attrs);
  +        this.contentHandler.startElement(namespaceURI, name, name, attrs);
       }
   
       private void endElem(String prefix, String name) throws SAXException {
           String ns = this.popNS();
  -        this.documentHandler.endElement(ns, name, name);
  +        this.contentHandler.endElement(ns, name, name);
           if (ns != null && !ns.equals("")) {
  -            this.documentHandler.endPrefixMapping(prefix);
  +            this.contentHandler.endPrefixMapping(prefix);
           }
       }
   
  @@ -335,7 +307,7 @@
           }
           this.pushNS(ns);
           if (rootElementIndex != 0) {
  -            this.documentHandler.startElement(ns, localName, qName, atts);
  +            this.contentHandler.startElement(ns, localName, qName, atts);
           } else {
               rootElementIndex = currentNS.size();
               getLogger().debug("ContentAggregator: skipping root element start event " + rootElementIndex);
  @@ -344,7 +316,7 @@
   
       public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
           if (rootElementIndex != currentNS.size()) {
  -            this.documentHandler.endElement((String)this.popNS(), localName, qName);
  +            this.contentHandler.endElement((String)this.popNS(), localName, qName);
           } else {
               this.popNS();
               getLogger().debug("ContentAggregator: ignoring root element end event " + rootElementIndex);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org