|
||||||||||
| 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.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.dspace.app.xmlui.wing.AbstractWingTransformer
org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer
org.dspace.app.xmlui.aspect.discovery.AbstractSearch
public abstract class AbstractSearch
This is an abstract search page. It is a collection of search methods that are common between diffrent search implementation. An implementer must implement at least three methods: addBody(), getQuery(), and generateURL().
See the implementors SimpleSearch.
| Field Summary | |
|---|---|
protected DiscoverQuery |
queryArgs
Cached query arguments |
protected DiscoverResult |
queryResults
Cached query results |
| Fields inherited from class org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer |
|---|
context, contextPath, eperson, knot, objectModel, parameters, servletPath, sitemapURI, url |
| 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 |
| Constructor Summary | |
|---|---|
AbstractSearch()
|
|
| Method Summary | |
|---|---|
abstract void |
addBody(Body body)
Build the resulting search DRI document. |
protected void |
addMetadataField(DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
String metadataKey,
List metadataFieldList,
String value)
Add the current value to the wing list, |
protected void |
addMetadataField(List metadataFieldList,
String value)
Add our metadata value, this value will might contain the highlight ("") tags, these will be removed & rendered as highlight wing fields. |
protected void |
buildMainForm(Division searchDiv)
Build the main form that should be the only form that the user interface requires This form will be used for all discovery queries, filters, .... |
protected void |
buildScopeList(Select scope)
Add options to the search scope field. |
protected void |
buildSearchControls(Division div)
|
protected void |
buildSearchResultsDivision(Division search)
Attach a division to the given search division named "search-results" which contains results for this search query. |
protected abstract String |
generateURL(Map<String,String> parameters)
Generate a url to the given search implementation with the associated parameters included. |
protected abstract String |
getBasicUrl()
|
protected String[] |
getFacetsList()
|
protected String[] |
getFilterQueries()
Returns all the filter queries for use by solr This method returns more expanded filter queries then the getParameterFilterQueries |
Serializable |
getKey()
Generate the unique caching key. |
protected int |
getParameterEtAl()
|
protected Map<String,String[]> |
getParameterFilterQueries()
Returns a list of the filter queries for use in rendering pages, creating page more urls, .... |
protected String |
getParameterGroup()
|
protected String |
getParameterOrder()
|
protected int |
getParameterPage()
|
protected int |
getParameterRpp()
|
protected String |
getParameterScope()
|
protected String |
getParameterSortBy()
|
protected abstract String |
getQuery()
Extract the query string. |
protected DSpaceObject |
getScope()
Determine the current scope. |
org.apache.excalibur.source.SourceValidity |
getValidity()
Generate the cache validity object. |
protected void |
logSearch()
|
void |
performSearch(DSpaceObject scope)
Query DSpace for a list of all items / collections / or communities that match the given search query. |
void |
recycle()
Recycle |
protected void |
renderCollection(Collection collection,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
List collectionMetadata)
Render the given collection, all collection metadata is added to the list |
protected void |
renderCommunity(Community community,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
List communityMetadata)
Render the given collection, all collection metadata is added to the list |
protected void |
renderItem(List dspaceObjectsList,
Item item,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults)
Render the given item, all metadata is added to the given list, which metadata will be rendered where depends on the xsl |
protected boolean |
variableScope()
Determine if the scope of the search should fixed or is changeable by the user. |
| Methods inherited from class org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer |
|---|
addOptions, addPageMeta, addUserMeta, decodeFromURL, dispose, encodeForURL, generateURL, getComponentName, getObjectManager, handleException, setup |
| 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.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 |
| Field Detail |
|---|
protected DiscoverResult queryResults
protected DiscoverQuery queryArgs
| Constructor Detail |
|---|
public AbstractSearch()
| 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 abstract void addBody(Body body)
throws SAXException,
WingException,
UIException,
SQLException,
IOException,
AuthorizeException
addBody in interface DSpaceTransformeraddBody in interface WingTransformeraddBody in class AbstractDSpaceTransformerSAXException
WingException
UIException
SQLException
IOException
AuthorizeException
protected void buildMainForm(Division searchDiv)
throws WingException,
SQLException
searchDiv - the division to add the form to
WingException
SQLException
protected abstract String getBasicUrl()
throws SQLException
SQLException
protected void buildSearchResultsDivision(Division search)
throws IOException,
SQLException,
WingException,
SearchServiceException
search - The search division to contain the search-results division.
IOException
SQLException
WingException
SearchServiceException
protected void renderItem(List dspaceObjectsList,
Item item,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults)
throws WingException,
SQLException
dspaceObjectsList - a list of DSpace objectsitem - the DSpace item to be renderedhighlightedResults - the highlighted results
WingException
SQLException - Database failure in services this calls
protected void renderCollection(Collection collection,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
List collectionMetadata)
throws WingException
collection - the collection to be renderedhighlightedResults - the highlighted results
WingException
protected void renderCommunity(Community community,
DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
List communityMetadata)
throws WingException
community - the community to be renderedhighlightedResults - the highlighted results
WingException
protected void addMetadataField(DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
String metadataKey,
List metadataFieldList,
String value)
throws WingException
highlightedResults - the highlighted resultsmetadataKey - the metadata key {schema}.{element}.{qualifier}metadataFieldList - the wing list we need to add the metadata value tovalue - the metadata value
WingException
protected void addMetadataField(List metadataFieldList,
String value)
throws WingException
metadataFieldList - the metadata list we need to add the value tovalue - the metadata value to be rendered
WingException
protected void buildScopeList(Select scope)
throws SQLException,
WingException
scope - The current scope field.
SQLException
WingException
public void performSearch(DSpaceObject scope)
throws UIException,
SearchServiceException
scope - the dspace object parent
UIException
SearchServiceExceptionprotected Map<String,String[]> getParameterFilterQueries()
protected String[] getFilterQueries()
protected String[] getFacetsList()
protected int getParameterPage()
protected int getParameterRpp()
protected String getParameterSortBy()
protected String getParameterGroup()
protected String getParameterOrder()
protected String getParameterScope()
protected int getParameterEtAl()
protected boolean variableScope()
throws SQLException
SQLException
protected abstract String getQuery()
throws UIException
UIException
protected abstract String generateURL(Map<String,String> parameters)
throws UIException
parameters -
UIExceptionpublic void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class AbstractDSpaceTransformer
protected void buildSearchControls(Division div)
throws WingException,
SQLException
WingException
SQLException
protected DSpaceObject getScope()
throws SQLException
SQLExceptionprotected void logSearch()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||