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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getCreator()
String
getFileExtension()
DownloadFormat
getFormat()
Set<String>
getNotificationAddresses()
String
getNotificationAddressesAsString()
Returns the notification addresses as single string.Boolean
getSendNotification()
DownloadType
getType()
int
hashCode()
void
setCreator(String creator)
void
setFormat(DownloadFormat format)
This parameter determines the output format of the requested download.void
setNotificationAddresses(Set<String> notificationAddresses)
void
setNotificationAddressesAsString(String notificationAddressesAsString)
Sets the notificationAddresses using a single String value that is split by ','.void
setSendNotification(boolean sendNotification)
This parameter determines if the requested download must be notified to the created once it's ready.void
setType(DownloadType type)
Download type: Occurrence or Event.String
toString()
-
-
-
Constructor Detail
-
DownloadRequest
public DownloadRequest()
Default constructor.
-
DownloadRequest
public DownloadRequest(String creator, Collection<String> notificationAddresses, Boolean sendNotification, DownloadFormat format, DownloadType downloadType)
-
-
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.
-
getFileExtension
public String getFileExtension()
-
-