Interface OccurrenceService


public interface OccurrenceService
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Long key)
    Attempt to find an occurrence matching the passed key.
    get(UUID datasetKey, String occurrenceId)
    Attempt to find an occurrence matching the passed dataset key and occurrenceId.
    getFragment(long key)
    Returns the "fragment" of raw data (either xml response fragment or json dwca fragment) for the passed in key.
    Attempt to find the verbatim values for an occurrence matching the passed key.
  • Method Details

    • get

      @Nullable Occurrence get(Long key)
      Attempt to find an occurrence matching the passed key.
      Parameters:
      key - that identifies an occurrence (Long rather than long for use in methods/classes using generic types)
      Returns:
      a matching occurrence, or null if no occurrence can be found
      Throws:
      ServiceUnavailableException - if the underlying data connection fails
    • get

      @Nullable Occurrence get(UUID datasetKey, String occurrenceId)
      Attempt to find an occurrence matching the passed dataset key and occurrenceId.
      Parameters:
      datasetKey - datasey key that should contain the occurrenceID
      occurrenceId - that identifies an occurrence in a dataset
      Returns:
      a matching occurrence, or null if no occurrence can be found
      Throws:
      ServiceUnavailableException - if the underlying data connection fails
    • getVerbatim

      Attempt to find the verbatim values for an occurrence matching the passed key.
      Parameters:
      key - that identifies the occurrence
      Returns:
      the verbatim occurrence, or null if no occurrence can be found
      Throws:
      ServiceUnavailableException - if the underlying data connection fails
    • getFragment

      @Nullable String getFragment(long key)
      Returns the "fragment" of raw data (either xml response fragment or json dwca fragment) for the passed in key. Returns null if no fragment exists.
      Parameters:
      key - that identifies an occurrence
      Returns:
      the raw data fragment as a String, or null if no fragment is found
      Throws:
      ServiceUnavailableException - if the underlying data connection fails