public abstract class AbstractSearch extends AbstractDSpaceTransformer implements org.apache.cocoon.caching.CacheableProcessingComponent
| Modifier and Type | Field and Description |
|---|---|
protected DiscoverQuery |
queryArgs
Cached query arguments
|
protected DiscoverResult |
queryResults
Cached query results
|
context, contextPath, eperson, knot, objectModel, parameters, servletPath, sitemapURI, url| Constructor and Description |
|---|
AbstractSearch() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addBody(Body body)
Build the resulting search DRI document.
|
protected java.lang.String |
addFilterQueriesToUrl(java.lang.String pageURLMask) |
protected void |
addMetadataField(DiscoverResult.DSpaceObjectHighlightResult highlightedResults,
java.lang.String metadataKey,
List metadataFieldList,
java.lang.String value)
Add the current value to the wing list
|
protected void |
addMetadataField(List metadataFieldList,
java.lang.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 java.lang.String |
generateURL(java.util.Map<java.lang.String,java.lang.String> parameters)
Generate a url to the given search implementation with the associated
parameters included.
|
protected abstract java.lang.String |
getBasicUrl() |
protected java.lang.String[] |
getFacetsList() |
protected java.lang.String[] |
getFilterQueries()
Returns all the filter queries for use by solr
This method returns more expanded filter queries then the getParameterFilterQueries
|
java.io.Serializable |
getKey()
Generate the unique caching key.
|
protected int |
getParameterEtAl() |
protected java.util.Map<java.lang.String,java.lang.String[]> |
getParameterFilterQueries()
Returns a list of the filter queries for use in rendering pages, creating page more urls, ....
|
protected java.lang.String |
getParameterGroup() |
protected java.lang.String |
getParameterOrder() |
protected int |
getParameterPage() |
protected int |
getParameterRpp() |
protected java.lang.String |
getParameterScope() |
protected java.lang.String |
getParameterSortBy() |
protected abstract java.lang.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.
|
addOptions, addPageMeta, addUserMeta, decodeFromURL, dispose, encodeForURL, generateURL, getComponentName, getObjectManager, handleException, setupcreateWingDocument, endDocument, endElement, endPrefixMapping, getDefaultMessageCatalogue, message, message, setupWing, startDocument, startElement, startPrefixMappingcharacters, comment, endCDATA, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntitysetConsumer, setContentHandler, setLexicalHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharacters, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntityprotected DiscoverResult queryResults
protected DiscoverQuery queryArgs
public java.io.Serializable getKey()
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic org.apache.excalibur.source.SourceValidity getValidity()
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic abstract void addBody(Body body) throws org.xml.sax.SAXException, WingException, UIException, java.sql.SQLException, java.io.IOException, AuthorizeException
addBody in interface DSpaceTransformeraddBody in interface WingTransformeraddBody in class AbstractDSpaceTransformerorg.xml.sax.SAXExceptionWingExceptionUIExceptionjava.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionprotected void buildMainForm(Division searchDiv) throws WingException, java.sql.SQLException
searchDiv - the division to add the form toWingExceptionjava.sql.SQLExceptionprotected abstract java.lang.String getBasicUrl()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void buildSearchResultsDivision(Division search) throws java.io.IOException, java.sql.SQLException, WingException, SearchServiceException
search - The search division to contain the search-results division.java.io.IOExceptionjava.sql.SQLExceptionWingExceptionSearchServiceExceptionprotected java.lang.String addFilterQueriesToUrl(java.lang.String pageURLMask)
throws UIException
UIExceptionprotected void renderItem(List dspaceObjectsList, Item item, DiscoverResult.DSpaceObjectHighlightResult highlightedResults) throws WingException, java.sql.SQLException
dspaceObjectsList - a list of DSpace objectsitem - the DSpace item to be renderedhighlightedResults - the highlighted resultsWingExceptionjava.sql.SQLException - Database failure in services this callsprotected void renderCollection(Collection collection, DiscoverResult.DSpaceObjectHighlightResult highlightedResults, List collectionMetadata) throws WingException
collection - the collection to be renderedhighlightedResults - the highlighted resultsWingExceptionprotected void renderCommunity(Community community, DiscoverResult.DSpaceObjectHighlightResult highlightedResults, List communityMetadata) throws WingException
community - the community to be renderedhighlightedResults - the highlighted resultsWingExceptionprotected void addMetadataField(DiscoverResult.DSpaceObjectHighlightResult highlightedResults, java.lang.String metadataKey, List metadataFieldList, java.lang.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 valueWingExceptionprotected void addMetadataField(List metadataFieldList, java.lang.String value) throws WingException
metadataFieldList - the metadata list we need to add the value tovalue - the metadata value to be renderedWingExceptionprotected void buildScopeList(Select scope) throws java.sql.SQLException, WingException
scope - The current scope field.java.sql.SQLExceptionWingExceptionpublic void performSearch(DSpaceObject scope) throws UIException, SearchServiceException
scope - the dspace object parentUIExceptionSearchServiceExceptionprotected java.util.Map<java.lang.String,java.lang.String[]> getParameterFilterQueries()
protected java.lang.String[] getFilterQueries()
protected java.lang.String[] getFacetsList()
protected int getParameterPage()
protected int getParameterRpp()
protected java.lang.String getParameterSortBy()
protected java.lang.String getParameterGroup()
protected java.lang.String getParameterOrder()
protected java.lang.String getParameterScope()
protected int getParameterEtAl()
protected boolean variableScope()
throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract java.lang.String getQuery()
throws UIException
UIExceptionprotected abstract java.lang.String generateURL(java.util.Map<java.lang.String,java.lang.String> parameters)
throws UIException
parameters - UIExceptionpublic void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class AbstractDSpaceTransformerprotected void buildSearchControls(Division div) throws WingException, java.sql.SQLException
WingExceptionjava.sql.SQLExceptionprotected DSpaceObject getScope() throws java.sql.SQLException
java.sql.SQLExceptionprotected void logSearch()
Copyright © 2018 DuraSpace. All Rights Reserved.