Package org.gbif.api.model.occurrence
Class Download
- java.lang.Object
-
- org.gbif.api.model.occurrence.Download
-
- All Implemented Interfaces:
Serializable
public class Download extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Download.Status
Reflects the possibles statuses of a download during its execution.
-
Constructor Summary
Constructors Constructor Description Download()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
getCreated()
DOI
getDoi()
Occurrence download Digital Object Identifier.String
getDownloadLink()
Date
getEraseAfter()
Date
getErasureNotification()
@NotNull String
getKey()
License
getLicense()
Get the license assigned to this occurrence download.@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
getModified()
Long
getNumberDatasets()
Number of datasets in the download file.Long
getNumberOrganizations()
Long
getNumberPublishingCountries()
@NotNull DownloadRequest
getRequest()
Request that originated the download.long
getSize()
Size in bytes of the produced file.String
getSource()
Source of the download to determine how the download was originated.@NotNull Download.Status
getStatus()
long
getTotalRecords()
Number of occurrence records in the download file.boolean
isAvailable()
void
setCreated(Date created)
void
setDoi(DOI doi)
void
setDownloadLink(String downloadLink)
void
setEraseAfter(Date eraseAfter)
void
setErasureNotification(Date erasureNotification)
void
setKey(String key)
void
setLicense(License license)
void
setModified(Date modified)
void
setNumberDatasets(Long numberDatasets)
void
setNumberOrganizations(Long numberOrganizations)
void
setNumberPublishingCountries(Long numberPublishingCountries)
void
setRequest(DownloadRequest request)
void
setSize(long size)
void
setSource(String source)
void
setStatus(Download.Status status)
void
setTotalRecords(long totalRecords)
-
-
-
Constructor Detail
-
Download
public Download()
-
-
Method Detail
-
getCreated
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) @Nullable public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated()
- Returns:
- timestamp when the download was created
-
getDownloadLink
@Nullable public String getDownloadLink()
- Returns:
- the downloadLink
-
getKey
@NotNull public @NotNull String getKey()
- Returns:
- unique key that can be used in the REST service to retrieve its status
-
getModified
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) @Nullable public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getModified()
- Returns:
- timestamp when the download result was last modified
-
getEraseAfter
@Nullable public Date getEraseAfter()
- Returns:
- timestamp after which the download file may be erased
-
getErasureNotification
@Nullable public Date getErasureNotification()
- Returns:
- timestamp when a notification of an impending file erasure was sent
-
getRequest
@NotNull public @NotNull DownloadRequest getRequest()
Request that originated the download.
-
getStatus
@NotNull public @NotNull Download.Status getStatus()
- Returns:
- the current download status
-
isAvailable
public boolean isAvailable()
- Returns:
- true if the download is completed and a result is available
-
getSize
public long getSize()
Size in bytes of the produced file.
-
getTotalRecords
public long getTotalRecords()
Number of occurrence records in the download file.
-
getNumberDatasets
@Nullable public Long getNumberDatasets()
Number of datasets in the download file.
-
getSource
public String getSource()
Source of the download to determine how the download was originated.
-
getLicense
public License getLicense()
Get the license assigned to this occurrence download.
-
setCreated
public void setCreated(Date created)
-
setDownloadLink
public void setDownloadLink(String downloadLink)
-
setLicense
public void setLicense(License license)
-
setModified
public void setModified(Date modified)
-
setEraseAfter
public void setEraseAfter(Date eraseAfter)
-
setErasureNotification
public void setErasureNotification(Date erasureNotification)
-
setRequest
public void setRequest(DownloadRequest request)
-
setStatus
public void setStatus(Download.Status status)
-
setSize
public void setSize(long size)
-
setTotalRecords
public void setTotalRecords(long totalRecords)
-
setNumberDatasets
public void setNumberDatasets(Long numberDatasets)
-
getNumberOrganizations
@Nullable public Long getNumberOrganizations()
-
setNumberOrganizations
public void setNumberOrganizations(Long numberOrganizations)
-
getNumberPublishingCountries
@Nullable public Long getNumberPublishingCountries()
-
setNumberPublishingCountries
public void setNumberPublishingCountries(Long numberPublishingCountries)
-
-