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 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
    • getSortString

      String getSortString()
      Return the search string for the selected sort option
      Returns:
      the search string for the selected sort option
    • setSortString

      void setSortString(String sortString)
      Set the sorting search string
      Parameters:
      sortString - a String object.
    • isSearchInDcFlag

      boolean isSearchInDcFlag()
      Return if search is performed only within a DC
      Returns:
      a boolean.
    • isSearchInFacetFieldFlag

      boolean isSearchInFacetFieldFlag(String fieldName)
      Return if search is performed only within a certain facet field
      Parameters:
      fieldName -
      Returns:
      a boolean.
    • getFacets

      SearchFacets getFacets()
      List all current SearchFacets
      Returns:
      all current SearchFacets
    • autocomplete

      List<String> autocomplete(String suggestion) throws IndexUnreachableException
      Return suggestions for autocomplete
      Parameters:
      suggestion - a String 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

      void setSearchString(String searchString)
      Set the actual search string
      Parameters:
      searchString - a String 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

      void setCurrentSearchFilterString(String filter)
      Set the current search filter as string
      Parameters:
      filter - a String object.
    • getActiveSearchType

      int getActiveSearchType()
      Get the currently active search type. The possible types are defined in {@link io.goobi.viewer.model.search.SearchHelper#}
      Returns:
      the active search type
    • setActiveSearchType

      void setActiveSearchType(int type)
      Set the search type to use. The possible types are defined in {@link io.goobi.viewer.model.search.SearchHelper#}
      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

      String changeSorting() throws IOException
      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()