Package io.goobi.viewer.model.search
Interface SearchInterface
- All Known Implementing Classes:
QueryListFunctionality,SearchBean,SearchFunctionality
public interface SearchInterface
Interface that all classes must implement that may be used in jsf search masks
SearchBean is the default
implementation- Author:
- Florian Alpers
-
Method Summary
Modifier and TypeMethodDescriptionautocomplete(String suggestion) Return suggestions for autocompleteaction to execute to change sort sort order of hitsintGet the currently active search type.intReturn the current result list page numberReturn the current search filter as stringReturn the base url of the current search page, without any search parametersGet the actual search stringList all currentSearchFacetslongget total number of hits of the last searchintReturn the last result list page numberGet a list of all available search filtersGet the current search string for displayReturn the search string for the selected sort optionbooleanbooleanCheck if a search has been triggered by the user and not yet been resetbooleanReturn if search is performed only within a DCbooleanisSearchInFacetFieldFlag(String fieldName) Return if search is performed only within a certain facet fieldbooleanCheck if a search has been performed and any results are to be excepted (provided the search yielded any)Reset the current search including all results and search parametersPerform an advanced SearchPerform a simple SearchvoidsetActiveContext(String activeContext) voidsetActiveSearchType(int type) Set the search type to use.voidsetCurrentSearchFilterString(String filter) Set the current search filter as stringvoidsetSearchString(String searchString) Set the actual search stringvoidsetSortString(String sortString) Set the sorting search string
-
Method Details
-
searchSimple
String searchSimple()Perform a simple Search- Returns:
- the url to navigate to, or an empty string if naviation is handled internally
-
searchAdvanced
String searchAdvanced()Perform an advanced Search- Returns:
- the url to navigate to, or an empty string if naviation is handled internally
-
resetSearch
String resetSearch()Reset the current search including all results and search parameters- Returns:
- the url to navigate to, or an empty string if naviation is handled internally
-
getCurrentPage
int getCurrentPage()Return the current result list page number- Returns:
- the current result list page number
-
getLastPage
int getLastPage()Return the last result list page number- Returns:
- the last result list page number
-
getActiveContext
String getActiveContext()- Returns:
- The selected result group name or advanced search template
-
setActiveContext
- Parameters:
activeContext- aStringobject.
-
getSortString
String getSortString()Return the search string for the selected sort option- Returns:
- the search string for the selected sort option
-
setSortString
Set the sorting search string- Parameters:
sortString- aStringobject.
-
isSearchInDcFlag
boolean isSearchInDcFlag()Return if search is performed only within a DC- Returns:
- a boolean.
-
isSearchInFacetFieldFlag
Return if search is performed only within a certain facet field- Parameters:
fieldName-- Returns:
- a boolean.
-
getFacets
SearchFacets getFacets()List all currentSearchFacets- Returns:
- all current
SearchFacets
-
autocomplete
Return suggestions for autocomplete- Parameters:
suggestion- aStringobject.- Returns:
- suggestions for autocomplete
- Throws:
IndexUnreachableException- if any.
-
getSearchString
String getSearchString()Get the current search string for display- Returns:
- the current search string for display
-
getExactSearchString
String getExactSearchString()Get the actual search string- Returns:
- the actual search string
-
setSearchString
Set the actual search string- Parameters:
searchString- aStringobject.
-
getSearchFilters
List<SearchFilter> getSearchFilters()Get a list of all available search filters- Returns:
- a list of all available search filters
-
getCurrentSearchFilterString
String getCurrentSearchFilterString()Return the current search filter as string- Returns:
- the current search filter as string
-
setCurrentSearchFilterString
Set the current search filter as string- Parameters:
filter- aStringobject.
-
getActiveSearchType
int getActiveSearchType()Get the currently active search type. The possible types are defined inSearchHelper- Returns:
- the active search type
-
setActiveSearchType
void setActiveSearchType(int type) Set the search type to use. The possible types are defined inSearchHelper- Parameters:
type- a int.
-
isSearchPerformed
boolean isSearchPerformed()Check if a search has been performed and any results are to be excepted (provided the search yielded any)- Returns:
- whether a search has been performed after the last reset
-
isExplicitSearchPerformed
boolean isExplicitSearchPerformed()Check if a search has been triggered by the user and not yet been reset- Returns:
- if a search has been triggered by the user and not yet been reset
-
getHitsCount
long getHitsCount()get total number of hits of the last search- Returns:
- the total number of hits of the last search
-
changeSorting
action to execute to change sort sort order of hits- Returns:
- Navigation outcome
- Throws:
IOException
-
getCurrentSearchUrlRoot
String getCurrentSearchUrlRoot()Return the base url of the current search page, without any search parameters- Returns:
- the base url of the current search page, without any search parameters
-
hasGeoLocationHits
boolean hasGeoLocationHits() -
getHitsMap
GeoMap getHitsMap()
-