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 boolean
equals(Object o)
Integer
getCrawlId()
Crawling attempt id.@NotNull UUID
getDatasetKey()
@NotNull Map<String,List<Map<Term,String>>>
getExtensions()
A map holding all verbatim extension terms.UUID
getHostingOrganizationKey()
Organization key of the installation that hosts the occurrence record.UUID
getInstallationKey()
Technical installation that publishes this occurrence record.@NotNull Long
getKey()
The GBIF assigned, persistent key to the occurrence record.Date
getLastCrawled()
The date this record was last crawled/harvested from the endpoint.Date
getLastParsed()
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.String
getProgrammeAcronym()
GBIF programme acronym/identifier.String
getProjectId()
GBIF project identifier.@NotNull EndpointType
getProtocol()
GbifRegion
getPublishedByGbifRegion()
Country
getPublishingCountry()
The country of the organization that publishes the dataset to which the occurrence belongs.@NotNull UUID
getPublishingOrgKey()
String
getVerbatimField(Term term)
Get the value of a specific field (Term).@NotNull Map<Term,String>
getVerbatimFields()
A map holding all verbatim core terms.int
hashCode()
boolean
hasVerbatimField(Term term)
void
setCrawlId(Integer crawlId)
void
setDatasetKey(UUID datasetKey)
void
setExtensions(Map<String,List<Map<Term,String>>> extensions)
void
setHostingOrganizationKey(UUID hostingOrganizationKey)
void
setInstallationKey(UUID installationKey)
void
setKey(Long key)
void
setLastCrawled(Date lastCrawled)
void
setLastParsed(Date lastParsed)
void
setNetworkKeys(List<UUID> networkKeys)
void
setProgrammeAcronym(String programmeAcronym)
void
setProjectId(String projectId)
void
setProtocol(EndpointType protocol)
void
setPublishedByGbifRegion(String gbifRegion)
void
setPublishingCountry(Country publishingCountry)
void
setPublishingOrgKey(UUID publishingOrgKey)
void
setVerbatimField(Term term, String fieldValue)
For setting a specific field without having to replace the entire verbatimFields Map.void
setVerbatimFields(Map<Term,String> verbatimFields)
String
toString()
-
-
-
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.
-
-