org.dspace.app.xmlui.aspect.artifactbrowser
Class AdvancedSearch
java.lang.Object
org.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.dspace.app.xmlui.wing.AbstractWingTransformer
org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer
org.dspace.app.xmlui.aspect.artifactbrowser.AbstractSearch
org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearch
- All Implemented Interfaces:
- org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.cocoon.caching.CacheableProcessingComponent, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer, org.apache.excalibur.xml.sax.XMLConsumer, DSpaceTransformer, WingTransformer, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler
public class AdvancedSearch
- extends AbstractSearch
- implements org.apache.cocoon.caching.CacheableProcessingComponent
Preform an advanced search of the repository. The user is presented with
three search parameters, that may be ORed, ANDed, NOTed together.
At the present time only three fields are displayed however if the theme
whishes to expand this they can by setting the num_search_fields to the
desired number of search fields. Also the theme can change the number of
results per the page by setting results_per_page
FIXME: The list of what fields are search should come from a configurable
place. Possibily the sitemap configuration.
- Author:
- Scott Phillips
| Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
| Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
|
Method Summary |
void |
addBody(Body body)
Add the body |
void |
addPageMeta(PageMeta pageMeta)
Add Page metadata. |
protected java.lang.String |
generateURL(java.util.Map<java.lang.String,java.lang.String> parameters)
Generate a URL for this search page which includes all the
search parameters along with the added parameters. |
protected java.lang.String |
getQuery()
Determine the search query for this search page. |
java.util.List<org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearch.SearchField> |
getSearchFields(org.apache.cocoon.environment.Request request)
Get a list of search fields from the request object
and parse them into a linear array of fileds. |
void |
recycle()
Recycle |
| Methods inherited from class org.dspace.app.xmlui.aspect.artifactbrowser.AbstractSearch |
buildScopeList, buildSearchControls, buildSearchResultsDivision, getKey, getParameterEtAl, getParameterOrder, getParameterPage, getParameterRpp, getParameterSortBy, getQueryResults, getScope, getValidity, logSearch, performSearch, variableScope |
| Methods inherited from class org.dspace.app.xmlui.wing.AbstractWingTransformer |
createWingDocument, endDocument, endElement, endPrefixMapping, getDefaultMessageCatalogue, message, message, setupWing, startDocument, startElement, startPrefixMapping |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity |
| 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.caching.CacheableProcessingComponent |
getKey, getValidity |
| Methods inherited from interface org.xml.sax.ContentHandler |
characters, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity |
| Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
AdvancedSearch
public AdvancedSearch()
addPageMeta
public void addPageMeta(PageMeta pageMeta)
throws WingException,
java.sql.SQLException
- Add Page metadata.
- Specified by:
addPageMeta in interface DSpaceTransformer- Specified by:
addPageMeta in interface WingTransformer- Overrides:
addPageMeta in class AbstractDSpaceTransformer
- Throws:
WingException
java.sql.SQLException
addBody
public void addBody(Body body)
throws org.xml.sax.SAXException,
WingException,
UIException,
java.sql.SQLException,
java.io.IOException,
AuthorizeException
- Add the body
- Specified by:
addBody in interface DSpaceTransformer- Specified by:
addBody in interface WingTransformer- Specified by:
addBody in class AbstractSearch
- Throws:
org.xml.sax.SAXException
WingException
UIException
java.sql.SQLException
java.io.IOException
AuthorizeException
recycle
public void recycle()
- Recycle
- Specified by:
recycle in interface org.apache.avalon.excalibur.pool.Recyclable- Overrides:
recycle in class AbstractSearch
generateURL
protected java.lang.String generateURL(java.util.Map<java.lang.String,java.lang.String> parameters)
throws UIException
- Generate a URL for this search page which includes all the
search parameters along with the added parameters.
- Specified by:
generateURL in class AbstractSearch
- Parameters:
parameters - URL parameters to be included in the generated url.
- Returns:
- The post URL
- Throws:
UIException
getQuery
protected java.lang.String getQuery()
throws UIException
- Determine the search query for this search page.
- Specified by:
getQuery in class AbstractSearch
- Returns:
- the query.
- Throws:
UIException
getSearchFields
public java.util.List<org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearch.SearchField> getSearchFields(org.apache.cocoon.environment.Request request)
throws UIException
- Get a list of search fields from the request object
and parse them into a linear array of fileds. The field's
index is preserved, so if it comes in as index 17 it will
be outputted as field 17.
- Parameters:
request - The http request object
- Returns:
- Array of search fields
- Throws:
UIException
Copyright © 2010 DuraSpace. All Rights Reserved.