Class StartSearchCommand

java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
org.labkey.remoteapi.PostCommand<StartSearchResponse>
org.labkey.remoteapi.ms2.StartSearchCommand
All Implemented Interfaces:
HasRequiredVersion

public class StartSearchCommand extends PostCommand<StartSearchResponse>
Initiates an MS2 search.
  • Constructor Details

    • StartSearchCommand

      public StartSearchCommand(StartSearchCommand.SearchEngine searchEngine, String protocol, String path, List<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 Details

    • getProtocol

      public 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(String protocol)
      Parameters:
      protocol - the name of the search protocol that has already been defined on the server that should be used
    • getPath

      public 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(String path)
      Parameters:
      path - the path relative to the pipeline root for the target container, in which the files will be present
    • getFiles

      public List<String> getFiles()
      Returns:
      the list of file names in the path specified that should be part of the search
    • setFiles

      public void setFiles(List<String> files)
      Parameters:
      files - the list of file names in the path specified that should be part of the search
    • createParameterMap

      protected Map<String,Object> createParameterMap()
      Description copied from class: Command
      Returns a new, mutable parameter map. Derived classes will typically override this method to put values passed to specialized setter methods into the map.
      Overrides:
      createParameterMap in class Command<StartSearchResponse,org.apache.hc.client5.http.classic.methods.HttpPost>
      Returns:
      The parameter map to use when building the URL.
    • createResponse

      protected StartSearchResponse createResponse(String text, int status, String contentType, org.json.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,org.apache.hc.client5.http.classic.methods.HttpPost>
      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.