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 hitsint
Get the currently active search type.int
Return 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 currentSearchFacets
long
get total number of hits of the last searchint
Return 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 optionboolean
boolean
Check if a search has been triggered by the user and not yet been resetboolean
Return if search is performed only within a DCboolean
isSearchInFacetFieldFlag
(String fieldName) Return if search is performed only within a certain facet fieldboolean
Check 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 Searchvoid
setActiveResultGroupName
(String activeResultGroupName) void
setActiveSearchType
(int type) Set the search type to use.void
setCurrentSearchFilterString
(String filter) Set the current search filter as stringvoid
setSearchString
(String searchString) Set the actual search stringvoid
setSortString
(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
-
getActiveResultGroupName
String getActiveResultGroupName()- Returns:
- The selected result group name
-
setActiveResultGroupName
- Parameters:
activeResultGroupName
- aString
object.
-
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
- aString
object.
-
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
- aString
object.- 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
- aString
object.
-
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
- aString
object.
-
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()
-