org.apache.cocoon.components.source
Class SitemapSource

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.xml.AbstractXMLConsumer
              |
              +--org.apache.cocoon.components.source.SitemapSource
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler, org.apache.avalon.framework.logger.Loggable, ModifiableSource, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, Source, XMLConsumer, XMLizable

public final class SitemapSource
extends AbstractXMLConsumer
implements ModifiableSource

Description of a source which is defined by a pipeline.

Version:
CVS $Id: SitemapSource.java,v 1.9.2.6 2002/12/04 09:56:25 cziegeler Exp $
Author:
Carsten Ziegeler

Constructor Summary
SitemapSource(org.apache.avalon.framework.component.ComponentManager manager, java.lang.String uri, org.apache.log.Logger logger)
          Construct a new object
 
Method Summary
 long getContentLength()
          Get the content length of the source or -1 if it is not possible to determine the length.
 org.xml.sax.InputSource getInputSource()
          Return a new InputSource object
 java.io.InputStream getInputStream()
          Return an InputStream object to read from the source.
 long getLastModified()
          Get the last modification date of the source or 0 if it is not possible to determine the date.
 java.lang.String getSystemId()
          Return the unique identifer for this source
 void recycle()
           
 void refresh()
          Refresh this object and update the last modified date and content length.
 void toSAX(org.xml.sax.ContentHandler contentHandler)
          Stream content to the content handler
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLConsumer
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
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
 

Constructor Detail

SitemapSource

public SitemapSource(org.apache.avalon.framework.component.ComponentManager manager,
                     java.lang.String uri,
                     org.apache.log.Logger logger)
              throws java.io.IOException,
                     ProcessingException
Construct a new object
Method Detail

getLastModified

public long getLastModified()
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

getContentLength

public long getContentLength()
Get the content length of the source or -1 if it is not possible to determine the length.
Specified by:
getContentLength in interface Source

getInputStream

public java.io.InputStream getInputStream()
                                   throws ProcessingException,
                                          java.io.IOException
Return an InputStream object to read from the source.
Specified by:
getInputStream in interface Source

getSystemId

public java.lang.String getSystemId()
Return the unique identifer for this source
Specified by:
getSystemId in interface Source

refresh

public void refresh()
Refresh this object and update the last modified date and content length.
Specified by:
refresh in interface ModifiableSource

getInputSource

public org.xml.sax.InputSource getInputSource()
                                       throws ProcessingException,
                                              java.io.IOException
Return a new InputSource object
Specified by:
getInputSource in interface Source
Following copied from interface: org.apache.cocoon.environment.Source
Returns:
an InputSource value
Throws:
ProcessingException - if an error occurs
java.io.IOException - if an error occurs

toSAX

public void toSAX(org.xml.sax.ContentHandler contentHandler)
           throws org.xml.sax.SAXException,
                  ProcessingException
Stream content to the content handler
Specified by:
toSAX in interface XMLizable

recycle

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


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