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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StartSearchCommand.SearchEngine` The set of supported search engines, which may or may not be available on any given server

    - ### Nested classes/interfaces inherited from class org.labkey.remoteapi.Command

      `Command.CommonParameters, Command.Response`

  - ### Field Summary

    - ### Fields inherited from class org.labkey.remoteapi.Command

      `CONTENT_TYPE_JSON`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StartSearchCommand(StartSearchCommand.SearchEngine searchEngine, java.lang.String protocol, java.lang.String path, java.util.List<java.lang.String> files)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.apache.http.client.methods.HttpUriRequest` | `createRequest(java.net.URI uri)` Creates the appropriate HttpUriRequest 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, the HTTP status code, and parsed JSONObject.
    `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

      `_execute, copy, execute, getActionName, getActionUrl, getControllerName, getHttpRequest, 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`

- - ### Constructor Detail

    - #### 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 analysis
        `protocol` - the name of the search protocol that has already been defined on the server that should be used
        `path` - the path relative to the pipeline root for the target container, in which the files will be present
        `files` - the list of file names in the path specified that should be part of the search

  - ### Method Detail

    - #### 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

    - #### createRequest

          protected org.apache.http.client.methods.HttpUriRequest createRequest(java.net.URI uri)

      Description copied from class: `Command`
      Creates the appropriate HttpUriRequest instance. Override to create something other than `HttpGet`.
      Overrides:
        `createRequest` in class `Command<StartSearchResponse>`
      Returns:
        The HttpUriRequest 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, the HTTP status code, and parsed JSONObject.

      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.