All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.labkey.remoteapi.assay.SaveAssayRunsResponse Maven / Gradle / Ivy

Go to download

The client-side library for Java developers is a separate JAR from the LabKey Server code base. It can be used by any Java program, including another Java web application.

There is a newer version: 6.2.0
Show newest version
package org.labkey.remoteapi.assay;

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.labkey.remoteapi.Command;
import org.labkey.remoteapi.CommandResponse;

import java.util.ArrayList;
import java.util.List;

public class SaveAssayRunsResponse extends CommandResponse
{
    private List _runs = new ArrayList<>();

    /**
     * Constructs a new CommandResponse, initialized with the provided
     * response text and status code.
     *
     * @param text          The response text
     * @param statusCode    The HTTP status code
     * @param contentType   The response content type
     * @param json          The parsed JSONObject (or null if JSON was not returned).
     * @param sourceCommand A copy of the command that created this response
     */
    public SaveAssayRunsResponse(String text, int statusCode, String contentType, JSONObject json, Command sourceCommand)
    {
        super(text, statusCode, contentType, json, sourceCommand);
        JSONArray array = (JSONArray)json.get("runs");
        for (Object o : array)
        {
            JSONObject run = (JSONObject) o;
            _runs.add(new Run(run));
        }
    }

    public List getRuns()
    {
        return _runs;
    }

    public void setRuns(List runs)
    {
        _runs = runs;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy