<commit_before>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;<commit_msg>Fix DatasetID constructor for jackson<commit_after>package org.col.api.model;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 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;
  
  @JsonCreator
  public DatasetID(@JsonProperty("datasetKey") Integer datasetKey, @JsonProperty("id") 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;
{'fraction_non_alphanumeric': 0.10594900849858357, 'fraction_numerical': 0.0, 'mean_word_length': 3.3821339950372207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '934290', 'n_tokens_mistral': 552, 'n_tokens_neox': 552, 'n_words': 164}