org.apache.cocoon.environment
Class URLFactorySourceResolver

java.lang.Object
  |
  +--org.apache.cocoon.environment.URLFactorySourceResolver
All Implemented Interfaces:
SourceResolver

public class URLFactorySourceResolver
extends java.lang.Object
implements SourceResolver

A SourceResolver based on a URLFactory.

Version:
CVS $Id: URLFactorySourceResolver.java,v 1.5.2.1 2002/06/07 09:34:24 cziegeler Exp $
Author:
Sylvain Wallez

Field Summary
protected  org.apache.avalon.framework.component.ComponentManager manager
          The component manager
protected  URLFactory urlFactory
          The URL factory
 
Constructor Summary
URLFactorySourceResolver(org.apache.avalon.framework.component.ComponentManager manager)
          Creates an URLFactorySourceResolver with a component manager.
URLFactorySourceResolver(URLFactory factory, org.apache.avalon.framework.component.ComponentManager manager)
          Creates an URLFactorySourceResolver with a component manager and a URLFactory that will be used to resolve URLs.
 
Method Summary
 void release(org.apache.excalibur.source.Source source)
          Releases a resolved resource
 Source resolve(java.lang.String systemID)
          Resolve the source.
 org.apache.excalibur.source.Source resolveURI(java.lang.String location)
          Get a Source object.
 org.apache.excalibur.source.Source resolveURI(java.lang.String location, java.lang.String baseURI, java.util.Map parameters)
          Get a Source object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected org.apache.avalon.framework.component.ComponentManager manager
The component manager

urlFactory

protected URLFactory urlFactory
The URL factory
Constructor Detail

URLFactorySourceResolver

public URLFactorySourceResolver(org.apache.avalon.framework.component.ComponentManager manager)
                         throws org.apache.avalon.framework.component.ComponentException
Creates an URLFactorySourceResolver with a component manager. The URLFactory is looked up in the component manager.

URLFactorySourceResolver

public URLFactorySourceResolver(URLFactory factory,
                                org.apache.avalon.framework.component.ComponentManager manager)
Creates an URLFactorySourceResolver with a component manager and a URLFactory that will be used to resolve URLs.
Method Detail

resolve

public Source resolve(java.lang.String systemID)
               throws ProcessingException,
                      org.xml.sax.SAXException,
                      java.io.IOException
Resolve the source.
Specified by:
resolve in interface SourceResolver
Parameters:
systemID - This is either a system identifier (java.net.URL) or a local file.

resolveURI

public org.apache.excalibur.source.Source resolveURI(java.lang.String location)
                                              throws java.net.MalformedURLException,
                                                     java.io.IOException,
                                                     org.apache.avalon.framework.component.ComponentException
Get a Source object.

resolveURI

public org.apache.excalibur.source.Source resolveURI(java.lang.String location,
                                                     java.lang.String baseURI,
                                                     java.util.Map parameters)
                                              throws java.net.MalformedURLException,
                                                     java.io.IOException,
                                                     org.apache.avalon.framework.component.ComponentException
Get a Source object.

release

public void release(org.apache.excalibur.source.Source source)
Releases a resolved resource


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.