package org.col.api.model;

import java.util.Objects;

/**
 * Globally unique identifier across all datasets by combining the datasetKey and ID.
 * Useful for name, taxon and reference objects.
 */
public class DatasetID {
  private final Integer datasetKey;
  private final String id;
  
  public DatasetID(Integer datasetKey, String id) {
    this.datasetKey = datasetKey;
    this.id = id;
  }
  
  public DatasetID(Taxon t) {
    this.datasetKey = t.getDatasetKey();
    this.id = t.getId();
  }
  
  public Integer getDatasetKey() {
    return datasetKey;
  }
  
  public String getId() {
    return id;
  }
  
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    DatasetID datasetID = (DatasetID) o;
    return Objects.equals(datasetKey, datasetID.datasetKey) &&
        Objects.equals(id, datasetID.id);
  }
  
  @Override
  public int hashCode() {
    return Objects.hash(datasetKey, id);
  }
}

@@ -48,16 +48,124 @@
 jects;%0A%0A
+import com.fasterxml.jackson.annotation.JsonCreator;%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0A%0A
 /**%0A * G
@@ -386,24 +386,39 @@
 ring id;%0A  %0A
+  @JsonCreator%0A
   public Dat
@@ -428,27 +428,75 @@
 tID(
-Integer datasetKey,
+@JsonProperty(%22datasetKey%22) Integer datasetKey, @JsonProperty(%22id%22)
  Str

Fix DatasetID constructor for jackson