org.labkey.remoteapi.test.LineageDemo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of labkey-client-api Show documentation
Show all versions of labkey-client-api Show documentation
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.
package org.labkey.remoteapi.test;
import org.labkey.remoteapi.Connection;
import org.labkey.remoteapi.experiment.LineageCommand;
import org.labkey.remoteapi.experiment.LineageResponse;
class LineageDemo
{
public static void main(String[] args) throws Exception
{
String url = "http://localhost:8080/labkey";
String folderPath = "/AssayImportProvenance Test";
String user = "[email protected]";
String password = "xxxxxx";
String lsid = "urn:lsid:labkey.com:GeneralAssayRun.Folder-4780:40166791-3d3f-1039-a854-9b7575483a25";
LineageCommand cmd = new LineageCommand.Builder(lsid)
.setParents(false)
.setChildren(true)
.setIncludeProperties(true)
.setIncludeInputsAndOutputs(true)
.setIncludeRunSteps(true)
.build();
Connection conn = new Connection(url, user, password);
LineageResponse resp = cmd.execute(conn, folderPath);
System.out.println(resp.dump());
}
}