net.datacrow.core.services.plugin
Interface IServer


public interface IServer

This interface should be implemented for new (and custom) online services. The IServer class holds all information for a specific server such as its supported search modes and regions and the external location (URL).

Author:
Robert Jan van der Waals

Method Summary
 int getModule()
          The module to which this server belongs.
 java.lang.String getName()
          Name of the server (must be unique)
 java.util.Collection<Region> getRegions()
          The regions belonging to this server.
 java.util.Collection<SearchMode> getSearchModes()
          The search modes belonging to this server.
 SearchTask getSearchTask(IOnlineSearchClient listener, SearchMode mode, Region region, java.lang.String query, DcObject client)
          Retrieves an instance of the search task.
 java.util.Collection<Setting> getSettings()
          Specific settings for this server.
 java.lang.String getUrl()
          The URL of the main server.
 boolean isFullModeOnly()
           
 

Method Detail

getModule

int getModule()
The module to which this server belongs.

See Also:
DcModules, DcModule

getRegions

java.util.Collection<Region> getRegions()
The regions belonging to this server.

Returns:
Collection of regions or an empty collection.

getSearchModes

java.util.Collection<SearchMode> getSearchModes()
The search modes belonging to this server.

Returns:
Collection of search modes or an empty collection.

getName

java.lang.String getName()
Name of the server (must be unique)

Returns:
Unique name of the server

getSettings

java.util.Collection<Setting> getSettings()
Specific settings for this server. Returns null of there are no settings available.


isFullModeOnly

boolean isFullModeOnly()

getUrl

java.lang.String getUrl()
The URL of the main server.


getSearchTask

SearchTask getSearchTask(IOnlineSearchClient listener,
                         SearchMode mode,
                         Region region,
                         java.lang.String query,
                         DcObject client)
Retrieves an instance of the search task. This task will be used to perform the actual search.

Parameters:
listener - The class which requested the search. This class will be informed of errors and events.
mode - The selected search mode.
region - The selected region.
query - The query as specified by the user.
See Also:
SearchTask, SearchMode, Region