Package org.ametys.odf.oai
Class AbstractOAIResponseGenerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.xml.AbstractXMLProducer
-
- org.apache.cocoon.generation.AbstractGenerator
-
- org.ametys.odf.oai.AbstractOAIResponseGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
AbstractOAIVerbGenerator
,BadVerbGenerator
public abstract class AbstractOAIResponseGenerator extends AbstractGenerator
Base class for all OAI responses.
-
-
Field Summary
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description AbstractOAIResponseGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doGenerate()
Actually generates the OAI response.void
generate()
protected void
generateError(String errorCode, String errorLabel)
Generates SAX events representing an error.protected String
getURL()
Returns the base URL of the OAI repository.-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
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
-
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Constructor Detail
-
AbstractOAIResponseGenerator
public AbstractOAIResponseGenerator()
-
-
Method Detail
-
generate
public final void generate() throws IOException, SAXException, ProcessingException
-
doGenerate
protected abstract void doGenerate() throws IOException, SAXException, ProcessingException
Actually generates the OAI response.- Throws:
IOException
- if an I/O error occursSAXException
- if an error occursProcessingException
- if an error occurs
-
generateError
protected void generateError(String errorCode, String errorLabel) throws SAXException
Generates SAX events representing an error.- Parameters:
errorCode
- the OAI error code.errorLabel
- the error label.- Throws:
SAXException
- if an error occurs while SAXing the OAI error.
-
-