org.apache.cocoon.components.source
Class AbstractSAXSource

java.lang.Object
  extended by org.apache.cocoon.components.source.AbstractSAXSource
All Implemented Interfaces:
Poolable, Recyclable, Source, XMLizable

Deprecated. Use the new Avalon Excalibur Source Resolving

public abstract class AbstractSAXSource
extends Object
implements Source

This abstract class provides convenience methods to implement a SAX based Source. Implement toSAX() and getSystemId() and optionally override getLastModified() and getContentLength() to obtain a valid Source implementation.

Version:
CVS $Id: AbstractSAXSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Gianugo Rabellino

Field Summary
protected  Logger log
          Deprecated. The Logger instance
protected  ComponentManager manager
          Deprecated. The ComponentManager instance
 
Constructor Summary
AbstractSAXSource(Environment environment, ComponentManager manager, Logger logger)
          Deprecated. The constructor.
 
Method Summary
 long getContentLength()
          Deprecated. Override this method to set the Content Length
 InputSource getInputSource()
          Deprecated. Get an InputSource for the given URL.
 InputStream getInputStream()
          Deprecated. Get an InputSource for the given URL.
 long getLastModified()
          Deprecated. Override this method to set the Last Modification date
abstract  String getSystemId()
          Deprecated. Implement this method to set the unique identifier.
abstract  void toSAX(ContentHandler handler)
          Deprecated. Implement this method to obtain SAX events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.excalibur.pool.Recyclable
recycle
 

Field Detail

log

protected Logger log
Deprecated. 
The Logger instance


manager

protected ComponentManager manager
Deprecated. 
The ComponentManager instance

Constructor Detail

AbstractSAXSource

public AbstractSAXSource(Environment environment,
                         ComponentManager manager,
                         Logger logger)
Deprecated. 
The constructor.

Parameters:
environment - the Cocoon Environment.
manager - an Avalon Component Manager
logger - A LogKit logger
Method Detail

getInputStream

public InputStream getInputStream()
                           throws ProcessingException,
                                  IOException
Deprecated. 
Get an InputSource for the given URL. Shamelessly stolen from SitemapSource.

Specified by:
getInputStream in interface Source
Throws:
ProcessingException
IOException

getInputSource

public InputSource getInputSource()
                           throws ProcessingException,
                                  IOException
Deprecated. 
Get an InputSource for the given URL.

Specified by:
getInputSource in interface Source
Returns:
an InputSource value
Throws:
ProcessingException - if an error occurs
IOException - if an error occurs

toSAX

public abstract void toSAX(ContentHandler handler)
                    throws SAXException
Deprecated. 
Implement this method to obtain SAX events.

Specified by:
toSAX in interface XMLizable
Throws:
SAXException

getSystemId

public abstract String getSystemId()
Deprecated. 
Implement this method to set the unique identifier.

Specified by:
getSystemId in interface Source

getContentLength

public long getContentLength()
Deprecated. 
Override this method to set the Content Length

Specified by:
getContentLength in interface Source

getLastModified

public long getLastModified()
Deprecated. 
Override this method to set the Last Modification date

Specified by:
getLastModified in interface Source


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