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/java/org/apache/cocoon/sitemap Handler.java
Date Mon, 08 Apr 2002 12:28:24 GMT
cziegeler    02/04/08 05:28:24

  Modified:    src/java/org/apache/cocoon/environment
                        AbstractEnvironment.java SourceResolver.java
                        URLFactorySourceResolver.java
               src/java/org/apache/cocoon/sitemap Handler.java
  Log:
  One step further to source resolving
  
  Revision  Changes    Path
  1.11      +28 -1     xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java
  
  Index: AbstractEnvironment.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractEnvironment.java	22 Feb 2002 07:03:49 -0000	1.10
  +++ AbstractEnvironment.java	8 Apr 2002 12:28:24 -0000	1.11
  @@ -51,6 +51,7 @@
   package org.apache.cocoon.environment;
   
   import org.apache.avalon.excalibur.collections.IteratorEnumeration;
  +import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceHandler;
  @@ -69,7 +70,7 @@
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: AbstractEnvironment.java,v 1.10 2002/02/22 07:03:49 cziegeler Exp
$
  + * @version CVS $Id: AbstractEnvironment.java,v 1.11 2002/04/08 12:28:24 cziegeler Exp
$
    */
   public abstract class AbstractEnvironment extends AbstractLoggable implements Environment
{
   
  @@ -401,6 +402,32 @@
       */
       public boolean tryResetResponse() {
           return false;
  +    }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location)
  +    throws MalformedURLException, IOException, ComponentException
  +    {
  +        return this.resolveURI(location, null, null);
  +    }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location,
  +                                                                String baseURI,
  +                                                                final Map    parameters)
  +    throws MalformedURLException, IOException, ComponentException {
  +        throw new RuntimeException("AbstractEnvironment.resolveURI() is not implemented
yet.");
  +    }
  +
  +    /**
  +     * Releases a resolved resource
  +     */
  +    public void release( final org.apache.avalon.excalibur.source.Source source ) {
  +        throw new RuntimeException("AbstractEnvironment.release() is not implemented yet.");
       }
   
   }
  
  
  
  1.5       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/environment/SourceResolver.java
  
  Index: SourceResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/SourceResolver.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SourceResolver.java	22 Feb 2002 07:03:49 -0000	1.4
  +++ SourceResolver.java	8 Apr 2002 12:28:24 -0000	1.5
  @@ -52,17 +52,17 @@
   
   import org.apache.cocoon.ProcessingException;
   import org.xml.sax.SAXException;
  -
   import java.io.IOException;
   
   /**
    * Base interface for resolving a source by system identifiers.
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: SourceResolver.java,v 1.4 2002/02/22 07:03:49 cziegeler Exp $
  + * @version CVS $Id: SourceResolver.java,v 1.5 2002/04/08 12:28:24 cziegeler Exp $
    */
   
  -public interface SourceResolver {
  +public interface SourceResolver
  +extends org.apache.avalon.excalibur.source.SourceResolver {
   
       /**
        * Resolve the source.
  
  
  
  1.5       +30 -1     xml-cocoon2/src/java/org/apache/cocoon/environment/URLFactorySourceResolver.java
  
  Index: URLFactorySourceResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/URLFactorySourceResolver.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- URLFactorySourceResolver.java	22 Feb 2002 07:03:49 -0000	1.4
  +++ URLFactorySourceResolver.java	8 Apr 2002 12:28:24 -0000	1.5
  @@ -58,13 +58,15 @@
   import org.xml.sax.SAXException;
   
   import java.io.IOException;
  +import java.net.MalformedURLException;
   import java.net.URL;
  +import java.util.Map;
   
   /**
    * A <code>SourceResolver</code> based on a <code>URLFactory</code>.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: URLFactorySourceResolver.java,v 1.4 2002/02/22 07:03:49 cziegeler
Exp $
  + * @version CVS $Id: URLFactorySourceResolver.java,v 1.5 2002/04/08 12:28:24 cziegeler
Exp $
    */
   
   public class URLFactorySourceResolver implements SourceResolver {
  @@ -106,4 +108,31 @@
           URL url = this.urlFactory.getURL(systemID);
           return new URLSource(url, this.manager);
       }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location)
  +    throws MalformedURLException, IOException, ComponentException
  +    {
  +        return this.resolveURI(location, null, null);
  +    }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location,
  +                                                                String baseURI,
  +                                                                final Map    parameters)
  +    throws MalformedURLException, IOException, ComponentException {
  +        throw new RuntimeException("URLFactorySourceResolver.resolveURI() is not implemented
yet.");
  +    }
  +
  +    /**
  +     * Releases a resolved resource
  +     */
  +    public void release( final org.apache.avalon.excalibur.source.Source source ) {
  +        throw new RuntimeException("URLFactorySourceResolver.release() is not implemented
yet.");
  +    }
  +
   }
  
  
  
  1.14      +30 -1     xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Handler.java	29 Mar 2002 20:24:02 -0000	1.13
  +++ Handler.java	8 Apr 2002 12:28:24 -0000	1.14
  @@ -76,7 +76,9 @@
   
   import java.io.FileNotFoundException;
   import java.io.IOException;
  +import java.net.MalformedURLException;
   import java.net.URL;
  +import java.util.Map;
   
   /**
    * Handles the manageing and stating of one <code>Sitemap</code>
  @@ -84,7 +86,7 @@
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Id: Handler.java,v 1.13 2002/03/29 20:24:02 vgritsenko Exp $
  + * @version CVS $Id: Handler.java,v 1.14 2002/04/08 12:28:24 cziegeler Exp $
    */
   public class Handler extends AbstractLoggable
   implements Runnable, Contextualizable, Composable, Processor, Disposable, SourceResolver
{
  @@ -351,4 +353,31 @@
                                                   .append(":").append(systemId).toString());
           return this.sourceHandler.getSource(null, context, systemId);
       }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location)
  +    throws MalformedURLException, IOException, ComponentException
  +    {
  +        return this.resolveURI(location, null, null);
  +    }
  +
  +    /**
  +     * Get a <code>Source</code> object.
  +     */
  +    public org.apache.avalon.excalibur.source.Source resolveURI(final String location,
  +                                                                String baseURI,
  +                                                                final Map    parameters)
  +    throws MalformedURLException, IOException, ComponentException {
  +        throw new RuntimeException("Handler.resolveURI() is not implemented yet.");
  +    }
  +
  +    /**
  +     * Releases a resolved resource
  +     */
  +    public void release( final org.apache.avalon.excalibur.source.Source source ) {
  +        throw new RuntimeException("Handler.release() is not implemented yet.");
  +    }
  +
   }
  
  
  

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