Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.
/*
* Copyright (c) 2017-2018 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.labkey.remoteapi.experiment;
import org.apache.commons.logging.LogFactory;
import org.labkey.remoteapi.ResponseObject;
import org.labkey.remoteapi.query.DateParser;
import org.labkey.remoteapi.query.Filter;
import org.labkey.remoteapi.query.SelectRowsResponse;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
public class LineageNode extends ResponseObject
{
private final String _lsid;
private final Integer _id;
private final String _name;
private final String _container;
private final String _url;
private final String _type;
private final String _cpasType;
private final String _expType;
private final Date _created;
private final String _createdBy;
private final Date _modified;
private final String _modifiedBy;
private final String _comment;
// query reference
private final String _schemaName;
private final String _queryName;
private final List _pkFilters;
private final Map _properties;
private List _parents;
private List _children;
public LineageNode(String lsid, Map map)
{
super(map);
_lsid = lsid;
_id = ((Number)map.getOrDefault("id", -1)).intValue();
_name = (String)map.get("name");
_container = (String)map.get("container");
_type = (String)map.get("type");
_cpasType = (String)map.get("cpasType");
_expType = (String)map.get("expType");
_url = (String)map.get("url");
Date created = null;
Date modified = null;
DateParser dateParser = new DateParser();
try
{
String createdStr = (String) map.get("created");
if (createdStr != null && createdStr.length() > 0)
created = dateParser.parse(createdStr);
String modifiedStr = (String) map.get("modified");
if (modifiedStr != null && modifiedStr.length() > 0)
modified = dateParser.parse(modifiedStr);
}
catch (ParseException e)
{
//just log it--if it doesn't parse, we can't fix it up
LogFactory.getLog(SelectRowsResponse.class).warn("Failed to parse date: " + e.getMessage(), e);
}
_created = created;
_modified = modified;
_createdBy = (String) map.get("createdBy");
_modifiedBy = (String)map.get("modifiedBy");
_comment = (String)map.get("comment");
// query row ref
_schemaName = (String)map.get("schemaName");
_queryName = (String)map.get("queryName");
_pkFilters = createPkFilters((List