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()
      Resets 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()
      Returns the current result list page number.
      Returns:
      the current result list page number
    • getLastPage

      int getLastPage()
      Returns 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

      void setActiveContext(String activeContext)
      Parameters:
      activeContext - result group name or advanced search template to activate
    • getSortString

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

      void setSortString(String sortString)
      Sets the sorting search string.
      Parameters:
      sortString - sort field and direction encoded as search string
    • isSearchInDcFlag

      boolean isSearchInDcFlag()
      Returns if search is performed only within a DC.
      Returns:
      true if the search is restricted to a specific DC (collection) field, false otherwise
    • isSearchInFacetFieldFlag

      boolean isSearchInFacetFieldFlag(String fieldName)
      Returns if search is performed only within a certain facet field.
      Parameters:
      fieldName - Solr facet field name to check
      Returns:
      true if the search is restricted to the given facet field, false otherwise
    • getFacets

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

      List<String> autocomplete(String suggestion) throws IndexUnreachableException
      Returns suggestions for autocomplete.
      Parameters:
      suggestion - partial input string to complete
      Returns:
      suggestions for autocomplete
      Throws:
      IndexUnreachableException - if any.
    • getSearchString

      String getSearchString()
      Gets the current search string for display.
      Returns:
      the current search string for display
    • getExactSearchString

      String getExactSearchString()
      Gets the actual search string.
      Returns:
      the actual search string
    • setSearchString

      void setSearchString(String searchString)
      Sets the actual search string.
      Parameters:
      searchString - raw search query to set
    • getSearchFilters

      List<SearchFilter> getSearchFilters()
      Gets a list of all available search filters.
      Returns:
      a list of all available search filters
    • getCurrentSearchFilterString

      String getCurrentSearchFilterString()
      Returns the current search filter as string.
      Returns:
      the current search filter as string
    • setCurrentSearchFilterString

      void setCurrentSearchFilterString(String filter)
      Sets the current search filter as string.
      Parameters:
      filter - search filter identifier string to activate
    • getActiveSearchType

      int getActiveSearchType()
      Get the currently active search type. The possible types are defined in SearchHelper
      Returns:
      the active search type
    • setActiveSearchType

      void setActiveSearchType(int type)
      Set the search type to use. The possible types are defined in SearchHelper
      Parameters:
      type - search type constant as defined in SearchHelper
    • isSearchPerformed

      boolean isSearchPerformed()
      Checks 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()
      Checks 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 the sort order of hits.
      Returns:
      Navigation outcome
      Throws:
      IOException
    • getCurrentSearchUrlRoot

      String getCurrentSearchUrlRoot()
      Returns 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()