Package org.gbif.api.model.occurrence
Class DownloadRequest
- java.lang.Object
-
- org.gbif.api.model.occurrence.DownloadRequest
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PredicateDownloadRequest,SqlDownloadRequest
public abstract class DownloadRequest extends Object implements Serializable
Represents a request to download occurrence records. This is the base class for specific type of downloads: predicate based downloads and SQL downloads.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DownloadRequest()Default constructor.DownloadRequest(String creator, Collection<String> notificationAddresses, Boolean sendNotification, DownloadFormat format, DownloadType downloadType, String description, com.fasterxml.jackson.databind.JsonNode machineDescription, String checklistKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetChecklistKey()StringgetCreator()StringgetDescription()StringgetFileExtension()DownloadFormatgetFormat()com.fasterxml.jackson.databind.JsonNodegetMachineDescription()Set<String>getNotificationAddresses()StringgetNotificationAddressesAsString()Returns the notification addresses as single string.BooleangetSendNotification()DownloadTypegetType()inthashCode()voidsetChecklistKey(String checklistKey)voidsetCreator(String creator)voidsetDescription(String description)voidsetFormat(DownloadFormat format)This parameter determines the output format of the requested download.voidsetMachineDescription(com.fasterxml.jackson.databind.JsonNode machineDescription)voidsetNotificationAddresses(Set<String> notificationAddresses)voidsetNotificationAddressesAsString(String notificationAddressesAsString)Sets the notificationAddresses using a single String value that is split by ','.voidsetSendNotification(boolean sendNotification)This parameter determines if the requested download must be notified to the created once it's ready.voidsetType(DownloadType type)Download type: Occurrence or Event.StringtoString()
-
-
-
Constructor Detail
-
DownloadRequest
public DownloadRequest()
Default constructor.
-
DownloadRequest
public DownloadRequest(String creator, Collection<String> notificationAddresses, Boolean sendNotification, DownloadFormat format, DownloadType downloadType, String description, com.fasterxml.jackson.databind.JsonNode machineDescription, String checklistKey)
-
-
Method Detail
-
getCreator
@Nullable public String getCreator()
- Returns:
- the user account that initiated the download
-
setCreator
public void setCreator(String creator)
-
getNotificationAddresses
@Nullable public Set<String> getNotificationAddresses()
- Returns:
- set of email addresses for notifications
-
setNotificationAddresses
public void setNotificationAddresses(Set<String> notificationAddresses)
-
getNotificationAddressesAsString
@Nullable public String getNotificationAddressesAsString()
Returns the notification addresses as single string. The emails are separated by ','.
-
setNotificationAddressesAsString
public void setNotificationAddressesAsString(String notificationAddressesAsString)
Sets the notificationAddresses using a single String value that is split by ','.
-
getSendNotification
@Nullable public Boolean getSendNotification()
-
setSendNotification
public void setSendNotification(boolean sendNotification)
This parameter determines if the requested download must be notified to the created once it's ready.
-
getFormat
public DownloadFormat getFormat()
-
setFormat
public void setFormat(DownloadFormat format)
This parameter determines the output format of the requested download.
-
getType
public DownloadType getType()
-
setType
public void setType(DownloadType type)
Download type: Occurrence or Event.
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getMachineDescription
public com.fasterxml.jackson.databind.JsonNode getMachineDescription()
-
setMachineDescription
public void setMachineDescription(com.fasterxml.jackson.databind.JsonNode machineDescription)
-
getFileExtension
public String getFileExtension()
-
getChecklistKey
public String getChecklistKey()
-
setChecklistKey
public void setChecklistKey(String checklistKey)
-
-