org.apache.cocoon.reading
Class AbstractReader

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.reading.AbstractReader
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, Reader, org.apache.avalon.excalibur.pool.Recyclable, SitemapModelComponent, SitemapOutputComponent
Direct Known Subclasses:
DatabaseReader, JSPReader, ResourceReader

public abstract class AbstractReader
extends org.apache.avalon.framework.logger.AbstractLoggable
implements Reader, org.apache.avalon.excalibur.pool.Recyclable

Version:
CVS $Id: AbstractReader.java,v 1.5 2002/02/22 07:03:54 cziegeler Exp $
Author:
Giacomo Pati

Field Summary
protected  java.util.Map objectModel
          The current Map of the object model.
protected  java.io.OutputStream out
          The OutputStream to write on.
protected  org.apache.avalon.framework.parameters.Parameters parameters
          The current Parameters.
protected  SourceResolver resolver
          The current SourceResolver.
protected  java.lang.String source
          The source URI associated with the request or null.
 
Fields inherited from interface org.apache.cocoon.reading.Reader
ROLE
 
Constructor Summary
AbstractReader()
           
 
Method Summary
 long getLastModified()
           
 java.lang.String getMimeType()
          Get the mime-type of the output of this Serializer This default implementation returns null to indicate that the mime-type specified in the sitemap is to be used
 void recycle()
          Recycle the component
 void setOutputStream(java.io.OutputStream out)
          Set the OutputStream
 void setup(SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters par)
          Set the SourceResolver the object model Map, the source and sitemap Parameters used to process the request.
 boolean shouldSetContentLength()
          Test if the component wants to set the content length
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.reading.Reader
generate
 

Field Detail

resolver

protected SourceResolver resolver
The current SourceResolver.

objectModel

protected java.util.Map objectModel
The current Map of the object model.

parameters

protected org.apache.avalon.framework.parameters.Parameters parameters
The current Parameters.

source

protected java.lang.String source
The source URI associated with the request or null.

out

protected java.io.OutputStream out
The OutputStream to write on.
Constructor Detail

AbstractReader

public AbstractReader()
Method Detail

setup

public void setup(SourceResolver resolver,
                  java.util.Map objectModel,
                  java.lang.String src,
                  org.apache.avalon.framework.parameters.Parameters par)
           throws ProcessingException,
                  org.xml.sax.SAXException,
                  java.io.IOException
Set the SourceResolver the object model Map, the source and sitemap Parameters used to process the request.
Specified by:
setup in interface SitemapModelComponent

setOutputStream

public void setOutputStream(java.io.OutputStream out)
Set the OutputStream
Specified by:
setOutputStream in interface SitemapOutputComponent

getMimeType

public java.lang.String getMimeType()
Get the mime-type of the output of this Serializer This default implementation returns null to indicate that the mime-type specified in the sitemap is to be used
Specified by:
getMimeType in interface SitemapOutputComponent

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface Reader
Returns:
the time the read source was last modified or 0 if it is not possible to detect

recycle

public void recycle()
Recycle the component
Specified by:
recycle in interface org.apache.avalon.excalibur.pool.Recyclable

shouldSetContentLength

public boolean shouldSetContentLength()
Test if the component wants to set the content length
Specified by:
shouldSetContentLength in interface SitemapOutputComponent


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