cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/sitemap ContentAggregator.java
Date Thu, 06 Sep 2001 11:20:54 GMT
cziegeler    01/09/06 04:20:54

  Modified:    src/org/apache/cocoon/sitemap ContentAggregator.java
  Log:
  Removed obsolete code
  
  Revision  Changes    Path
  1.17      +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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ContentAggregator.java	2001/08/25 19:40:32	1.16
  +++ ContentAggregator.java	2001/09/06 11:20:54	1.17
  @@ -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.16 2001/08/25 19:40:32 giacomo Exp $
  + * @version CVS $Id: ContentAggregator.java,v 1.17 2001/09/06 11:20:54 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


Mime
View raw message