dims        01/04/17 06:21:08

  Modified:    src/org/apache/cocoon/components/language/markup/sitemap/java
                        Tag: xml-cocoon2 sitemap.xsl
               src/org/apache/cocoon/serialization Tag: xml-cocoon2
                        SVGSerializer.java
  Log:
  - Minor fix to sitemap.xsl, remove hardcoded string
  - Added Cacheable to SVG Serializer.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.96  +6 -5      
xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
  retrieving revision 1.1.2.95
  retrieving revision 1.1.2.96
  diff -u -r1.1.2.95 -r1.1.2.96
  --- sitemap.xsl       2001/04/12 16:00:56     1.1.2.95
  +++ sitemap.xsl       2001/04/17 13:20:54     1.1.2.96
  @@ -75,6 +75,7 @@
       import org.apache.regexp.REProgram;
   
       import org.apache.cocoon.Constants;
  +    import org.apache.cocoon.Roles;
       import org.apache.cocoon.ProcessingException;
       import org.apache.cocoon.ResourceNotFoundException;
       import org.apache.cocoon.acting.Action;
  @@ -95,7 +96,7 @@
        *
        * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo 
Pati</a>
        * @author <a href="mailto:[EMAIL PROTECTED]">Berin 
Loritsch</a>
  -     * @version CVS $Id: sitemap.xsl,v 1.1.2.95 2001/04/12 16:00:56 giacomo 
Exp $
  +     * @version CVS $Id: sitemap.xsl,v 1.1.2.96 2001/04/17 13:20:54 dims Exp 
$
        */
       public class <xsl:value-of select="@file-name"/> extends AbstractSitemap 
{
         static final String LOCATION = "<xsl:value-of 
select="translate(@file-path, '/', '.')"/>.<xsl:value-of select="@file-name"/>";
  @@ -373,8 +374,8 @@
         public boolean process(Environment environment) throws Exception {
           /* the &lt;code&gt;EventPipeline&lt;/code&gt; is used to collect the 
xml producing sitemap
              components and the &lt;code&gt;StreamPipeline&lt;/code&gt; to 
produce the requested resource */
  -        EventPipeline eventPipeline = 
(EventPipeline)this.manager.lookup("org.apache.cocoon.components.pipeline.EventPipeline");
  -        StreamPipeline pipeline = 
(StreamPipeline)this.manager.lookup("org.apache.cocoon.components.pipeline.StreamPipeline");
  +        EventPipeline eventPipeline = 
(EventPipeline)this.manager.lookup(Roles.EVENT_PIPELINE);
  +        StreamPipeline pipeline = 
(StreamPipeline)this.manager.lookup(Roles.STREAM_PIPELINE);
           pipeline.setEventPipeline(eventPipeline);
           boolean result = false;
           try {
  @@ -452,8 +453,8 @@
               StreamPipeline pipeline = null;
               EventPipeline eventPipeline = null;
               try {
  -              eventPipeline = 
(EventPipeline)this.manager.lookup("org.apache.cocoon.components.pipeline.EventPipeline");
  -              pipeline = 
(StreamPipeline)this.manager.lookup("org.apache.cocoon.components.pipeline.StreamPipeline");
  +              eventPipeline = 
(EventPipeline)this.manager.lookup(Roles.EVENT_PIPELINE);
  +              pipeline = 
(StreamPipeline)this.manager.lookup(Roles.STREAM_PIPELINE);
                 pipeline.setEventPipeline(eventPipeline);
                 List listOfMaps = (List)(new ArrayList());
                 Map map;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.31  +30 -2     
xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java,v
  retrieving revision 1.1.2.30
  retrieving revision 1.1.2.31
  diff -u -r1.1.2.30 -r1.1.2.31
  --- SVGSerializer.java        2001/04/11 12:41:24     1.1.2.30
  +++ SVGSerializer.java        2001/04/17 13:21:04     1.1.2.31
  @@ -9,6 +9,9 @@
   package org.apache.cocoon.serialization;
   
   import org.apache.cocoon.*;
  +import org.apache.cocoon.caching.Cacheable;
  +import org.apache.cocoon.caching.CacheValidity;
  +import org.apache.cocoon.caching.NOPCacheValidity;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.components.parser.Parser;
   import org.apache.cocoon.components.transcoder.TranscoderFactory;
  @@ -38,9 +41,10 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Ross Burton</a>
  - * @version CVS $Revision: 1.1.2.30 $ $Date: 2001/04/11 12:41:24 $
  + * @version CVS $Revision: 1.1.2.31 $ $Date: 2001/04/17 13:21:04 $
    */
  -public class SVGSerializer extends SVGBuilder implements Composer, 
Serializer, Configurable, Poolable {
  +public class SVGSerializer extends SVGBuilder 
  +        implements Composer, Serializer, Configurable, Poolable, Cacheable {
   
       /** The <code>ContentHandler</code> receiving SAX events. */
       private ContentHandler contentHandler=null;
  @@ -215,5 +219,29 @@
        */
       public String getMimeType() {
           return mimetype;
  +    }
  +
  +    /**
  +     * Generate the unique key.
  +     * This key must be unique inside the space of this component.
  +     * This method must be invoked before the generateValidity() method.
  +     *
  +     * @return The generated key or <code>0</code> if the component
  +     *              is currently not cacheable.
  +     */
  +    public long generateKey() {
  +        return 1;
  +    }
  +
  +    /**
  +     * Generate the validity object.
  +     * Before this method can be invoked the generateKey() method
  +     * must be invoked.
  +     *
  +     * @return The generated validity object or <code>null</code> if the
  +     *         component is currently not cacheable.
  +     */
  +    public CacheValidity generateValidity() {
  +        return new NOPCacheValidity();
       }
   }
  
  
  

----------------------------------------------------------------------
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