org.labkey.remoteapi.ms2
Class StartSearchCommand
java.lang.Object
org.labkey.remoteapi.Command<StartSearchResponse>
org.labkey.remoteapi.ms2.StartSearchCommand
public class StartSearchCommand
- extends Command<StartSearchResponse>
Initiates an MS2 search.
User: jeckels
Date: Feb 11, 2011
|
Nested Class Summary |
static class |
StartSearchCommand.SearchEngine
The set of supported search engines, which may or may not be available on any given server |
|
Method Summary |
protected org.apache.commons.httpclient.HttpMethod |
createMethod()
Creates the appropriate HttpMethod instance. |
protected StartSearchResponse |
createResponse(java.lang.String text,
int status,
java.lang.String contentType,
org.json.simple.JSONObject json)
Creates an instance of the response class, initialized with
the response text and the HTTP status code. |
java.util.List<java.lang.String> |
getFiles()
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Returns the current parameter map, or null if a map has not yet been set. |
java.lang.String |
getPath()
|
java.lang.String |
getProtocol()
|
void |
setFiles(java.util.List<java.lang.String> files)
|
void |
setPath(java.lang.String path)
|
void |
setProtocol(java.lang.String protocol)
|
| Methods inherited from class org.labkey.remoteapi.Command |
copy, execute, getActionName, getActionUrl, getControllerName, getHttpMethod, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StartSearchCommand
public StartSearchCommand(StartSearchCommand.SearchEngine searchEngine,
java.lang.String protocol,
java.lang.String path,
java.util.List<java.lang.String> files)
- Parameters:
searchEngine - the search engine to be used for the analysisprotocol - the name of the search protocol that has already been defined on the server that should be usedpath - the path relative to the pipeline root for the target container, in which the files will be presentfiles - the list of file names in the path specified that should be part of the search
getProtocol
public java.lang.String getProtocol()
- Returns:
- the name of the search protocol that has already been defined on the server that should be used
setProtocol
public void setProtocol(java.lang.String protocol)
- Parameters:
protocol - the name of the search protocol that has already been defined on the server that should be used
getPath
public java.lang.String getPath()
- Returns:
- the path relative to the pipeline root for the target container, in which the files will be present
setPath
public void setPath(java.lang.String path)
- Parameters:
path - the path relative to the pipeline root for the target container, in which the files will be present
getFiles
public java.util.List<java.lang.String> getFiles()
- Returns:
- the list of file names in the path specified that should be part of the search
setFiles
public void setFiles(java.util.List<java.lang.String> files)
- Parameters:
files - the list of file names in the path specified that should be part of the search
createMethod
protected org.apache.commons.httpclient.HttpMethod createMethod()
- Description copied from class:
Command
- Creates the appropriate HttpMethod instance. Override to create something
other than
GetMethod.
- Overrides:
createMethod in class Command<StartSearchResponse>
- Returns:
- The HttpMethod instance.
getParameters
public java.util.Map<java.lang.String,java.lang.Object> getParameters()
- Description copied from class:
Command
- Returns the current parameter map, or null if a map has not yet been set.
Derived classes will typically override this method to provide a parameter
map based on data members set by specialized setter methods.
- Overrides:
getParameters in class Command<StartSearchResponse>
- Returns:
- The current parameter map.
createResponse
protected StartSearchResponse createResponse(java.lang.String text,
int status,
java.lang.String contentType,
org.json.simple.JSONObject json)
- Description copied from class:
Command
- Creates an instance of the response class, initialized with
the response text and the HTTP status code.
Override this method
to create an instance of a different class that extends CommandResponse
- Overrides:
createResponse in class Command<StartSearchResponse>
- Parameters:
text - The response text from the server.status - The HTTP status code.contentType - The Content-Type header value.json - The parsed JSONObject (or null if no JSON was returned).
- Returns:
- An instance of the response object.