<commit_before>package org.gbif.api.vocabulary;

import org.gbif.dwc.terms.DcTerm;
import org.gbif.dwc.terms.DwcTerm;
import org.gbif.dwc.terms.GbifTerm;
import org.gbif.dwc.terms.Term;
import org.gbif.utils.AnnotationUtils;

import java.util.Collections;
import java.util.List;
import java.util.Set;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.ERROR;
import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.INFO;
import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.WARNING;

/**
 * An enumeration of validation rules for single occurrence records.
 */
public enum OccurrenceIssue implements InterpretationRemark {

  /**
   * Coordinate is the exact 0/0 coordinate, often indicating a bad null coordinate.
   */
  ZERO_COORDINATE(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Coordinate has invalid lat/lon values out of their decimal max range.
   */
  COORDINATE_OUT_OF_RANGE(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Coordinate value given in some form but GBIF is unable to interpret it.
   */
  COORDINATE_INVALID(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Original coordinate modified by rounding to 5 decimals.
   */
  COORDINATE_ROUNDED(INFO, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * The geodetic datum given could not be interpreted.
   */
  GEODETIC_DATUM_INVALID(WARNING, DwcTerm.geodeticDatum),

  /**
   * Indicating that the interpreted coordinates assume they are based on WGS84 datum as the datum was either not
   * indicated or interpretable. See GEODETIC_DATUM_INVALID.
   */
  GEODETIC_DATUM_ASSUMED_WGS84(INFO, DwcTerm.geodeticDatum),

  /**
   * The original coordinate was successfully reprojected from a different geodetic datum to WGS84.
   */
  COORDINATE_REPROJECTED(WARNING, TermsGroup.COORDINATES_TERMS),

  /**
   * The given decimal latitude and longitude could not be reprojected to WGS84 based on the provided datum.
   */<commit_msg>Reduce successful coordinate reprojection to INFO level.<commit_after>package org.gbif.api.vocabulary;

import org.gbif.dwc.terms.DcTerm;
import org.gbif.dwc.terms.DwcTerm;
import org.gbif.dwc.terms.GbifTerm;
import org.gbif.dwc.terms.Term;
import org.gbif.utils.AnnotationUtils;

import java.util.Collections;
import java.util.List;
import java.util.Set;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.ERROR;
import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.INFO;
import static org.gbif.api.vocabulary.InterpretationRemarkSeverity.WARNING;

/**
 * An enumeration of validation rules for single occurrence records.
 */
public enum OccurrenceIssue implements InterpretationRemark {

  /**
   * Coordinate is the exact 0/0 coordinate, often indicating a bad null coordinate.
   */
  ZERO_COORDINATE(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Coordinate has invalid lat/lon values out of their decimal max range.
   */
  COORDINATE_OUT_OF_RANGE(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Coordinate value given in some form but GBIF is unable to interpret it.
   */
  COORDINATE_INVALID(WARNING, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * Original coordinate modified by rounding to 5 decimals.
   */
  COORDINATE_ROUNDED(INFO, TermsGroup.COORDINATES_TERMS_NO_DATUM),

  /**
   * The geodetic datum given could not be interpreted.
   */
  GEODETIC_DATUM_INVALID(WARNING, DwcTerm.geodeticDatum),

  /**
   * Indicating that the interpreted coordinates assume they are based on WGS84 datum as the datum was either not
   * indicated or interpretable. See GEODETIC_DATUM_INVALID.
   */
  GEODETIC_DATUM_ASSUMED_WGS84(INFO, DwcTerm.geodeticDatum),

  /**
   * The original coordinate was successfully reprojected from a different geodetic datum to WGS84.
   */
  COORDINATE_REPROJECTED(INFO, TermsGroup.COORDINATES_TERMS),

  /**
   * The given decimal latitude and longitude could not be reprojected to WGS84 based on the provided datum.
   */
{'fraction_non_alphanumeric': 0.08226037195994278, 'fraction_numerical': 0.005245588936576061, 'mean_word_length': 4.519736842105263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '934576', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1362, 'n_words': 334}