public abstract class AbstractOpenSearchGenerator
extends org.apache.cocoon.generation.AbstractGenerator
implements org.apache.cocoon.caching.CacheableProcessingComponent, org.apache.avalon.excalibur.pool.Recyclable
| Modifier and Type | Field and Description |
|---|---|
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 is 1 because OpenSearch starts counting at 1
|
objectModel, parameters, resolver, source| Constructor and Description |
|---|
AbstractOpenSearchGenerator() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
setConsumer, setContentHandler, setLexicalHandlerprotected 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
public Serializable getKey()
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic org.apache.excalibur.source.SourceValidity getValidity()
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic 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.ProcessingExceptionSAXExceptionIOExceptionpublic void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class org.apache.cocoon.generation.AbstractGeneratorCopyright © 2015 DuraSpace. All Rights Reserved.