org.genepattern.client
Class GPServer
java.lang.Object
org.genepattern.client.GPServer
- Direct Known Subclasses:
- MatlabGPClient
- public class GPServer
- extends java.lang.Object
This class is used to communicate with a GenePattern server.
|
Constructor Summary |
GPServer(java.lang.String server,
java.lang.String userName)
Creates a new GPServer instance. |
|
Method Summary |
java.net.URL |
getTaskFileURL(java.lang.String taskNameOrLSID,
java.lang.String fileName)
Returns the url to retrieve the given file as part of the given task. |
JobResult |
runAnalysis(java.lang.String taskNameOrLSID,
Parameter[] parameters)
Submits the given task with the given parameters and waits for the job to
complete. |
void |
runVisualizer(java.lang.String taskNameOrLSID,
Parameter[] parameters)
Downloads the support files for the given task from the server and
executes the given task locally. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GPServer
public GPServer(java.lang.String server,
java.lang.String userName)
throws WebServiceException
- Creates a new GPServer instance.
- Parameters:
server - The server, for example http://127.0.0.1:8080userName - The user name.
- Throws:
WebServiceException - If an error occurs while connecting to the server
getTaskFileURL
public java.net.URL getTaskFileURL(java.lang.String taskNameOrLSID,
java.lang.String fileName)
- Returns the url to retrieve the given file as part of the given task.
- Parameters:
taskNameOrLSID - The task name or LSID of the task that contains the file. When
an LSID is provided that does not include a version, the
latest available version of the task identified by the LSID
will be used. If a task name is supplied, the latest version
of the task with the nearest authority is selected. The
nearest authority is the first match in the sequence: local
authority, Broad authority, other authority.fileName - The file name.
- Returns:
- The url.
runAnalysis
public JobResult runAnalysis(java.lang.String taskNameOrLSID,
Parameter[] parameters)
throws WebServiceException
- Submits the given task with the given parameters and waits for the job to
complete.
- Parameters:
taskNameOrLSID - The task name or LSID. When an LSID is provided that does not
include a version, the latest available version of the task
identified by the LSID will be used. If a task name is
supplied, the latest version of the task with the nearest
authority is selected. The nearest authority is the first
match in the sequence: local authority, Broad authority, other
authority.parameters - The parameters to run the task with.
- Returns:
- The job result.
- Throws:
WebServiceException - If an error occurs during the job submission and job result
retrieval process.
runVisualizer
public void runVisualizer(java.lang.String taskNameOrLSID,
Parameter[] parameters)
throws WebServiceException
- Downloads the support files for the given task from the server and
executes the given task locally.
- Parameters:
taskNameOrLSID - The task name or LSID. When an LSID is provided that does not
include a version, the latest available version of the task
identified by the LSID will be used. If a task name is
supplied, the latest version of the task with the nearest
authority is selected. The nearest authority is the first
match in the sequence: local authority, Broad authority, other
authority.parameters - The parameters to run the task with.
- Throws:
WebServiceException - If an error occurs while launching the visualizer.
|
|