Package org.gbif.api.model.occurrence
Class VerbatimOccurrence
- java.lang.Object
-
- org.gbif.api.model.occurrence.VerbatimOccurrence
-
- Direct Known Subclasses:
Event,Occurrence
public class VerbatimOccurrence extends Object
An extended map holding all core terms of an occurrence record. Major extensions that we index are also supported, i.e. media, identifiers and measurements or facts.
-
-
Constructor Summary
Constructors Constructor Description VerbatimOccurrence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IntegergetCrawlId()Crawling attempt id.@NotNull UUIDgetDatasetKey()@NotNull Map<String,List<Map<Term,String>>>getExtensions()A map holding all verbatim extension terms.UUIDgetHostingOrganizationKey()Organization key of the installation that hosts the occurrence record.UUIDgetInstallationKey()Technical installation that publishes this occurrence record.@NotNull LonggetKey()The GBIF assigned, persistent key to the occurrence record.DategetLastCrawled()The date this record was last crawled/harvested from the endpoint.DategetLastParsed()The date this record was last parsed from raw xml/json into verbatim verbatimFields.List<UUID>getNetworkKeys()The GBIF Network associated to the publishing dataset.StringgetProgrammeAcronym()GBIF programme acronym/identifier.StringgetProjectId()GBIF project identifier.@NotNull EndpointTypegetProtocol()GbifRegiongetPublishedByGbifRegion()CountrygetPublishingCountry()The country of the organization that publishes the dataset to which the occurrence belongs.@NotNull UUIDgetPublishingOrgKey()StringgetVerbatimField(Term term)Get the value of a specific field (Term).@NotNull Map<Term,String>getVerbatimFields()A map holding all verbatim core terms.inthashCode()booleanhasVerbatimField(Term term)voidsetCrawlId(Integer crawlId)voidsetDatasetKey(UUID datasetKey)voidsetExtensions(Map<String,List<Map<Term,String>>> extensions)voidsetHostingOrganizationKey(UUID hostingOrganizationKey)voidsetInstallationKey(UUID installationKey)voidsetKey(Long key)voidsetLastCrawled(Date lastCrawled)voidsetLastParsed(Date lastParsed)voidsetNetworkKeys(List<UUID> networkKeys)voidsetProgrammeAcronym(String programmeAcronym)voidsetProjectId(String projectId)voidsetProtocol(EndpointType protocol)voidsetPublishedByGbifRegion(String gbifRegion)voidsetPublishingCountry(Country publishingCountry)voidsetPublishingOrgKey(UUID publishingOrgKey)voidsetVerbatimField(Term term, String fieldValue)For setting a specific field without having to replace the entire verbatimFields Map.voidsetVerbatimFields(Map<Term,String> verbatimFields)StringtoString()
-
-
-
Constructor Detail
-
VerbatimOccurrence
public VerbatimOccurrence()
-
-
Method Detail
-
getVerbatimField
@Nullable public String getVerbatimField(Term term)
Get the value of a specific field (Term).
-
hasVerbatimField
public boolean hasVerbatimField(Term term)
- Returns:
- true if a verbatim field exists and is not null or an empty string
-
setVerbatimField
public void setVerbatimField(Term term, @Nullable String fieldValue)
For setting a specific field without having to replace the entire verbatimFields Map.- Parameters:
term- the field to setfieldValue- the field's value
-
getKey
@NotNull public @NotNull Long getKey()
The GBIF assigned, persistent key to the occurrence record. OccurrenceID itself is kept in the verbatim verbatimFields map.
-
getDatasetKey
@NotNull public @NotNull UUID getDatasetKey()
-
setDatasetKey
public void setDatasetKey(UUID datasetKey)
-
getPublishingOrgKey
@NotNull public @NotNull UUID getPublishingOrgKey()
-
setPublishingOrgKey
public void setPublishingOrgKey(UUID publishingOrgKey)
-
getNetworkKeys
@Nullable public List<UUID> getNetworkKeys()
The GBIF Network associated to the publishing dataset.
-
setNetworkKeys
public void setNetworkKeys(List<UUID> networkKeys)
-
getInstallationKey
@Nullable public UUID getInstallationKey()
Technical installation that publishes this occurrence record.
-
setInstallationKey
public void setInstallationKey(UUID installationKey)
-
getPublishingCountry
@Nullable public Country getPublishingCountry()
The country of the organization that publishes the dataset to which the occurrence belongs.
-
setPublishingCountry
public void setPublishingCountry(Country publishingCountry)
-
getPublishedByGbifRegion
@Nullable public GbifRegion getPublishedByGbifRegion()
-
setPublishedByGbifRegion
public void setPublishedByGbifRegion(String gbifRegion)
-
getProtocol
@NotNull public @NotNull EndpointType getProtocol()
-
setProtocol
public void setProtocol(EndpointType protocol)
-
getLastCrawled
@Nullable public Date getLastCrawled()
The date this record was last crawled/harvested from the endpoint.
-
setLastCrawled
public void setLastCrawled(@Nullable Date lastCrawled)
-
getLastParsed
@Nullable public Date getLastParsed()
The date this record was last parsed from raw xml/json into verbatim verbatimFields.
-
setLastParsed
public void setLastParsed(@Nullable Date lastParsed)
-
getCrawlId
@Nullable public Integer getCrawlId()
Crawling attempt id.
-
setCrawlId
public void setCrawlId(Integer crawlId)
-
getProjectId
@Nullable public String getProjectId()
GBIF project identifier.
-
setProjectId
public void setProjectId(String projectId)
-
getProgrammeAcronym
@Nullable public String getProgrammeAcronym()
GBIF programme acronym/identifier.
-
setProgrammeAcronym
public void setProgrammeAcronym(String programmeAcronym)
-
getHostingOrganizationKey
@Nullable public UUID getHostingOrganizationKey()
Organization key of the installation that hosts the occurrence record.
-
setHostingOrganizationKey
public void setHostingOrganizationKey(UUID hostingOrganizationKey)
-
getVerbatimFields
@NotNull public @NotNull Map<Term,String> getVerbatimFields()
A map holding all verbatim core terms.
-
setVerbatimFields
public void setVerbatimFields(Map<Term,String> verbatimFields)
-
getExtensions
@NotNull public @NotNull Map<String,List<Map<Term,String>>> getExtensions()
A map holding all verbatim extension terms.
-
-