Package org.gbif.api.service.occurrence
Interface OccurrenceService
public interface OccurrenceService
-
Method Summary
Modifier and TypeMethodDescriptionAttempt to find an occurrence matching the passed key.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.getVerbatim
(Long key) Attempt to find the verbatim values for an occurrence matching the passed key.
-
Method Details
-
get
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
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
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
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
-