// Path: modules/common/app/edu/berkeley/ground/common/model/version/Item.java
// public class Item {
// 
//   @JsonProperty("id")
//   private final long id;
// 
//   @JsonProperty("tags")
//   private final Map<String, Tag> tags;
// 
//   @JsonCreator
//   public Item(@JsonProperty("id") long id, @JsonProperty("tags") Map<String, Tag> tags) {
//     this.id = id;
// 
//     if (tags == null) {
//       this.tags = new HashMap<>();
//     } else {
//       this.tags = tags;
//     }
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public Map<String, Tag> getTags() {
//     return this.tags;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/model/version/Tag.java
// public class Tag {
// 
//   @JsonProperty("id")
//   private long id;
// 
//   @JsonProperty("key")
//   private final String key;
// 
//   @JsonProperty("value")
//   private final Object value;
// 
//   @JsonProperty("type")
//   private final GroundType valueType;
// 
//   /**
//    * Create a new tag.
//    *
//    * @param id the id of the version containing this tag
//    * @param key the key of the tag
//    * @param value the value of the tag
//    * @param valueType the type of the value
//    */
//   @JsonCreator
//   public Tag(@JsonProperty("item_id") long id, @JsonProperty("key") String key, @JsonProperty("value") Object value,
//               @JsonProperty("type") GroundType valueType)
//     throws edu.berkeley.ground.common.exception.GroundException {
// 
//     if (!((value != null) == (valueType != null))
//           || (value != null && !(value.getClass().equals(valueType.getTypeClass())))) {
// 
//       throw new GroundException(ExceptionType.OTHER, "Mismatch between value (" + value + ") and given type (" + valueType.toString() + ").");
//     }
// 
//     if (value != null) {
//       assert (value.getClass().equals(valueType.getTypeClass()));
//     }
// 
//     this.id = id;
//     this.key = key;
//     this.value = value;
//     this.valueType = valueType;
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public String getKey() {
//     return this.key;
//   }
// 
//   public Object getValue() {
//     return this.value;
//   }
// 
//   public GroundType getValueType() {
//     return this.valueType;
//   }
// 
//   @Override
//   public boolean equals(Object other) {
//     if (!(other instanceof Tag)) {
//       return false;
//     }
// 
//     Tag otherTag = (Tag) other;
// 
//     return this.key.equals(otherTag.key)
//              && Objects.equals(this.value, otherTag.value)
//              && Objects.equals(this.valueType, otherTag.valueType);
//   }
// }


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import edu.berkeley.ground.common.model.version.Item;
import edu.berkeley.ground.common.model.version.Tag;
import java.util.Map;
/**
 * 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
 *
 * <p>http://www.apache.org/licenses/LICENSE-2.0
 *
 * <p>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 edu.berkeley.ground.common.model.usage;


public class LineageEdge extends Item {

  // the name of this LineageEdge
  @JsonProperty("name")
  private final String name;

  // the source key for this Node
  @JsonProperty("sourceKey")
  private final String sourceKey;

  /**
   * Create a new lineage edge.
   *
   * @param id the id of the lineage edge
   * @param name the name of the lineage edge
   * @param sourceKey the user-generated unique key for the lineage edge
   * @param tags the tags associated with this lineage edge
   */

  @JsonCreator
  public LineageEdge(@JsonProperty("itemId") long id, @JsonProperty("name") String name,
// Path: modules/common/app/edu/berkeley/ground/common/model/version/Item.java
// public class Item {
// 
//   @JsonProperty("id")
//   private final long id;
// 
//   @JsonProperty("tags")
//   private final Map<String, Tag> tags;
// 
//   @JsonCreator
//   public Item(@JsonProperty("id") long id, @JsonProperty("tags") Map<String, Tag> tags) {
//     this.id = id;
// 
//     if (tags == null) {
//       this.tags = new HashMap<>();
//     } else {
//       this.tags = tags;
//     }
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public Map<String, Tag> getTags() {
//     return this.tags;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/model/version/Tag.java
// public class Tag {
// 
//   @JsonProperty("id")
//   private long id;
// 
//   @JsonProperty("key")
//   private final String key;
// 
//   @JsonProperty("value")
//   private final Object value;
// 
//   @JsonProperty("type")
//   private final GroundType valueType;
// 
//   /**
//    * Create a new tag.
//    *
//    * @param id the id of the version containing this tag
//    * @param key the key of the tag
//    * @param value the value of the tag
//    * @param valueType the type of the value
//    */
//   @JsonCreator
//   public Tag(@JsonProperty("item_id") long id, @JsonProperty("key") String key, @JsonProperty("value") Object value,
//               @JsonProperty("type") GroundType valueType)
//     throws edu.berkeley.ground.common.exception.GroundException {
// 
//     if (!((value != null) == (valueType != null))
//           || (value != null && !(value.getClass().equals(valueType.getTypeClass())))) {
// 
//       throw new GroundException(ExceptionType.OTHER, "Mismatch between value (" + value + ") and given type (" + valueType.toString() + ").");
//     }
// 
//     if (value != null) {
//       assert (value.getClass().equals(valueType.getTypeClass()));
//     }
// 
//     this.id = id;
//     this.key = key;
//     this.value = value;
//     this.valueType = valueType;
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public String getKey() {
//     return this.key;
//   }
// 
//   public Object getValue() {
//     return this.value;
//   }
// 
//   public GroundType getValueType() {
//     return this.valueType;
//   }
// 
//   @Override
//   public boolean equals(Object other) {
//     if (!(other instanceof Tag)) {
//       return false;
//     }
// 
//     Tag otherTag = (Tag) other;
// 
//     return this.key.equals(otherTag.key)
//              && Objects.equals(this.value, otherTag.value)
//              && Objects.equals(this.valueType, otherTag.valueType);
//   }
// }


// Path: modules/common/app/edu/berkeley/ground/common/model/usage/LineageEdge.java
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import edu.berkeley.ground.common.model.version.Item;
import edu.berkeley.ground.common.model.version.Tag;
import java.util.Map;

/**
 * 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
 *
 * <p>http://www.apache.org/licenses/LICENSE-2.0
 *
 * <p>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 edu.berkeley.ground.common.model.usage;


public class LineageEdge extends Item {

  // the name of this LineageEdge
  @JsonProperty("name")
  private final String name;

  // the source key for this Node
  @JsonProperty("sourceKey")
  private final String sourceKey;

  /**
   * Create a new lineage edge.
   *
   * @param id the id of the lineage edge
   * @param name the name of the lineage edge
   * @param sourceKey the user-generated unique key for the lineage edge
   * @param tags the tags associated with this lineage edge
   */

  @JsonCreator
  public LineageEdge(@JsonProperty("itemId") long id, @JsonProperty("name") String name,
                      @JsonProperty("sourceKey") String sourceKey, @JsonProperty("tags") Map<String, Tag> tags) {