org.apache.cocoon.components.source
Class URLSource

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.source.AbstractStreamSource
          extended by org.apache.cocoon.components.source.URLSource
All Implemented Interfaces:
Poolable, Recyclable, LogEnabled, ModifiableSource, Source, XMLizable

Deprecated. by the Avalon Exalibur Source Resolving

public class URLSource
extends AbstractStreamSource

Description of a source which is described by an URL.

Version:
CVS $Id: URLSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

Field Summary
 
Fields inherited from class org.apache.cocoon.components.source.AbstractStreamSource
manager, transformerFactory
 
Constructor Summary
URLSource(URL url, ComponentManager manager)
          Deprecated. Construct a new object
 
Method Summary
 long getContentLength()
          Deprecated. Get the content length of the source or -1 if it is not possible to determine the length.
 InputStream getInputStream()
          Deprecated. Return an InputStream object to read from the source.
 long getLastModified()
          Deprecated. Get the last modification date of the source or 0 if it is not possible to determine the date.
 String getSystemId()
          Deprecated. Return the unique identifer for this source
protected  boolean isHTMLContent()
          Deprecated. Does this source contain HTML ?
 void recycle()
          Deprecated. To be overriden in concrete subclasses if needed.
 void refresh()
          Deprecated. Refresh this object and update the last modified date and content length.
 void setPostParameters(SourceParameters pars)
          Deprecated. Set the post parameters
 
Methods inherited from class org.apache.cocoon.components.source.AbstractStreamSource
exists, getInputSource, toSAX
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLSource

public URLSource(URL url,
                 ComponentManager manager)
          throws IOException
Deprecated. 
Construct a new object

Throws:
IOException
Method Detail

isHTMLContent

protected boolean isHTMLContent()
Deprecated. 
Description copied from class: AbstractStreamSource
Does this source contain HTML ? If true, JTidy will be used (if available) to parse the input as XML.

The default here is to return false. Concrete subclasses should override this if needed.

Overrides:
isHTMLContent in class AbstractStreamSource

getLastModified

public long getLastModified()
Deprecated. 
Get the last modification date of the source or 0 if it is not possible to determine the date.

Specified by:
getLastModified in interface Source
Overrides:
getLastModified in class AbstractStreamSource

getContentLength

public long getContentLength()
Deprecated. 
Get the content length of the source or -1 if it is not possible to determine the length.

Specified by:
getContentLength in interface Source
Overrides:
getContentLength in class AbstractStreamSource

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  ProcessingException
Deprecated. 
Return an InputStream object to read from the source.

Throws:
ResourceNotFoundException - if file not found or HTTP location does not exist.
IOException - if I/O error occured.
ProcessingException

getSystemId

public String getSystemId()
Deprecated. 
Return the unique identifer for this source


refresh

public void refresh()
Deprecated. 
Refresh this object and update the last modified date and content length.

Specified by:
refresh in interface ModifiableSource
Overrides:
refresh in class AbstractStreamSource

recycle

public void recycle()
Deprecated. 
Description copied from class: AbstractStreamSource
To be overriden in concrete subclasses if needed.

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractStreamSource

setPostParameters

public void setPostParameters(SourceParameters pars)
Deprecated. 
Set the post parameters



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.