Class SearchEngineRegistry

    • Method Detail

      • getBestSearchEngine

        public SearchEngine getBestSearchEngine​(SearchConfiguration searchConfiguration,
                                                Boolean considerFeasibility)
        Determines the best SearchEngine for this search based on the Quality. If no SearchEngine is found for the search, then jadice search is used as a fallback.
        Parameters:
        searchConfiguration - provides information about the demanded search
        considerFeasibility - specifies whether the feasibility of a SearchEngine should be taken into account
      • registerSearchEngine

        public void registerSearchEngine​(SearchEngine searchEngine,
                                         int priority)
        SearchEngines get registered if they are not already registered.
        Parameters:
        searchEngine - the SearchEngine to be registered
        priority - the priority of the SearchEngine
      • deregisterSearchEngine

        public void deregisterSearchEngine​(SearchEngine searchEngine)
        If the SearchEngine is registered the SearchEngine gets deregistered.
        Parameters:
        searchEngine - the SearchEngine to be deregistered
      • changePriority

        public void changePriority​(SearchEngine searchEngine,
                                   int priority)
        Change the priority of a already registered SearchEngine.
        Parameters:
        searchEngine - the SearchEngine whose priority is being changed
        priority - the new priority
      • getRegisteredEngines

        public Collection<SearchEngine> getRegisteredEngines()
        Returns:
        a collection of registered SearchEngines
      • getPriority

        public int getPriority​(SearchEngine searchEngine)
        Retrieve the priority of a given search engine
        Parameters:
        searchEngine - The search engine for which the priority shall be retrieved
        Returns:
        The priority if the search engine is registered, otherwise -1
      • executableSearchEngine

        public boolean executableSearchEngine​(SearchConfiguration searchConfiguration)
        It gets checked whether at least one of the registered search engines is executable for the current SearchConfiguration. If no SearchEngine is registered, the JadiceSearchEngine, which is then set by default, is checked for feasibility.
        Returns:
        true if at least one executable SearchEngine is available, false otherwise