|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.components.source.AbstractSAXSource
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.
Field Summary | |
protected org.apache.log.Logger |
log
The Logger instance |
protected org.apache.avalon.framework.component.ComponentManager |
manager
The ComponentManager instance |
Constructor Summary | |
AbstractSAXSource(Environment environment,
org.apache.avalon.framework.component.ComponentManager manager,
org.apache.log.Logger logger)
The constructor. |
Method Summary | |
long |
getContentLength()
Override this method to set the Content Length |
org.xml.sax.InputSource |
getInputSource()
Get an InputSource for the given URL. |
java.io.InputStream |
getInputStream()
Get an InputSource for the given URL. |
long |
getLastModified()
Override this method to set the Last Modification date |
abstract java.lang.String |
getSystemId()
Implement this method to set the unique identifier. |
abstract void |
toSAX(org.xml.sax.ContentHandler handler)
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 |
protected org.apache.log.Logger log
protected org.apache.avalon.framework.component.ComponentManager manager
Constructor Detail |
public AbstractSAXSource(Environment environment, org.apache.avalon.framework.component.ComponentManager manager, org.apache.log.Logger logger)
environment
- the Cocoon Environment.manager
- an Avalon Component Managerlogger
- A LogKit loggerMethod Detail |
public java.io.InputStream getInputStream() throws ProcessingException, java.io.IOException
getInputStream
in interface Source
ProcessingException
java.io.IOException
public org.xml.sax.InputSource getInputSource() throws ProcessingException, java.io.IOException
getInputSource
in interface Source
InputSource
value
java.io.IOException
- if an error occurs
ProcessingException
- if an error occurspublic abstract void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException, ProcessingException
toSAX
in interface XMLizable
org.xml.sax.SAXException
ProcessingException
public abstract java.lang.String getSystemId()
getSystemId
in interface Source
public long getContentLength()
getContentLength
in interface Source
public long getLastModified()
getLastModified
in interface Source
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |