|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.dspace.app.xmlui.opensearch.AbstractOpenSearchGenerator
public abstract class AbstractOpenSearchGenerator
This class provides the common attributes and methods for parameter parsing, cache key and validity generations. Parameters are parsed, sanitized and default values are assigned to them. Subclasses requiring a custom parameter parsing is able to overwrite this setup() method, but in most cases, this method should be enough.
| Field Summary | |
|---|---|
static int |
DEFAULT_RPP
default value for results per page parameter |
protected String |
format
The results requested format |
static int |
MAX_RPP
max allowed value for results per page parameter |
protected String |
query
the search query string |
protected Document |
resultsDoc
the results document (cached) |
protected int |
rpp
results per page |
protected DSpaceObject |
scope
optional search scope (= handle of container) or null |
protected SortOption |
sort
optional sort specification |
protected String |
sortOrder
sort order, see SortOption |
protected int |
start
first result index |
| 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 |
| Fields inherited from interface org.apache.cocoon.generation.Generator |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractOpenSearchGenerator()
|
|
| Method Summary | |
|---|---|
Serializable |
getKey()
Generate the unique caching key. |
org.apache.excalibur.source.SourceValidity |
getValidity()
Generate the cache validity object, based on the websvc.opensearch.validity config property |
void |
recycle()
Recycle |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters par)
Setup configuration for this request, parameter parsing and sanitization. |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
setConsumer, setContentHandler, setLexicalHandler |
| Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
|---|
getLogger, setLogger |
| 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.generation.Generator |
|---|
generate |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
|---|
setConsumer |
| Field Detail |
|---|
protected String format
protected String query
protected DSpaceObject scope
protected SortOption sort
protected String sortOrder
protected int rpp
protected int start
protected Document resultsDoc
public static int DEFAULT_RPP
public static int MAX_RPP
| Constructor Detail |
|---|
public AbstractOpenSearchGenerator()
| Method Detail |
|---|
public Serializable getKey()
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic org.apache.excalibur.source.SourceValidity getValidity()
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters par)
throws org.apache.cocoon.ProcessingException,
SAXException,
IOException
setup in interface org.apache.cocoon.sitemap.SitemapModelComponentsetup in class org.apache.cocoon.generation.AbstractGeneratororg.apache.cocoon.ProcessingException
SAXException
IOExceptionpublic void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class org.apache.cocoon.generation.AbstractGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||