Package org.ametys.odf.oai
Class AbstractOAIVerbGenerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.xml.AbstractXMLProducer
-
- org.apache.cocoon.generation.AbstractGenerator
-
- org.ametys.odf.oai.AbstractOAIResponseGenerator
-
- org.ametys.odf.oai.AbstractOAIVerbGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
GetRecordGenerator
,IdentifyGenerator
,ListIdentifiersGenerator
,ListMetadataFormatsGenerator
,ListSetsGenerator
public abstract class AbstractOAIVerbGenerator extends AbstractOAIResponseGenerator
Base class for all OAI verb 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 AbstractOAIVerbGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private boolean
_hasBadArguments(Collection<String> requiredParameters, Collection<String> allowedParameters)
protected void
doGenerate()
Actually generates the OAI response.protected abstract void
generateVerb()
Generates SAX events for the current verb.protected abstract Collection<String>
getAllowedParameters()
Returns a Collection af all possible parameters.protected abstract Collection<String>
getRequiredParameters()
Returns a Collection af all mandatory parameters.-
Methods inherited from class org.ametys.odf.oai.AbstractOAIResponseGenerator
generate, generateError, getURL
-
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
-
AbstractOAIVerbGenerator
public AbstractOAIVerbGenerator()
-
-
Method Detail
-
doGenerate
protected final void doGenerate() throws IOException, SAXException, ProcessingException
Description copied from class:AbstractOAIResponseGenerator
Actually generates the OAI response.- Specified by:
doGenerate
in classAbstractOAIResponseGenerator
- Throws:
IOException
- if an I/O error occursSAXException
- if an error occursProcessingException
- if an error occurs
-
getRequiredParameters
protected abstract Collection<String> getRequiredParameters()
Returns a Collection af all mandatory parameters.- Returns:
- a Collection af all mandatory parameters.
-
getAllowedParameters
protected abstract Collection<String> getAllowedParameters()
Returns a Collection af all possible parameters.- Returns:
- a Collection af all possible parameters.
-
generateVerb
protected abstract void generateVerb() throws IOException, SAXException, ProcessingException
Generates SAX events for the current verb.- Throws:
IOException
- if an I/O error occursSAXException
- if an error occursProcessingException
- if an error occurs
-
_hasBadArguments
private boolean _hasBadArguments(Collection<String> requiredParameters, Collection<String> allowedParameters)
-
-