Package org.gbif.api.service.occurrence
Interface OccurrenceService
-
public interface OccurrenceService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Occurrence
get(Long key)
Attempt to find an occurrence matching the passed key.Occurrence
get(UUID datasetKey, String occurrenceId)
Attempt to find an occurrence matching the passed dataset key and occurrenceId.String
getFragment(long key)
Returns the "fragment" of raw data (either xml response fragment or json dwca fragment) for the passed in key.VerbatimOccurrence
getVerbatim(Long key)
Attempt to find the verbatim values for an occurrence matching the passed key.
-
-
-
Method Detail
-
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 occurrenceIDoccurrenceId
- 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
@Nullable VerbatimOccurrence getVerbatim(Long key)
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
-
-