Package org.gbif.api.model.crawler
Class CrawlJob
- java.lang.Object
-
- org.gbif.api.model.crawler.CrawlJob
-
-
Constructor Summary
Constructors Constructor Description CrawlJob(UUID datasetKey, Integer attempt, EndpointType endpointType, URI targetUrl)
Constructor with mandatory fields.CrawlJob(UUID datasetKey, EndpointType endpointType, URI targetUrl, int attempt, Map<String,String> properties)
Creates a new crawl job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
getAttempt()
UUID
getDatasetKey()
EndpointType
getEndpointType()
Map<String,String>
getProperties()
Used to save protocol specific information (e.g.String
getProperty(String name)
URI
getTargetUrl()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
CrawlJob
public CrawlJob(UUID datasetKey, EndpointType endpointType, URI targetUrl, int attempt, @Nullable Map<String,String> properties)
Creates a new crawl job.- Parameters:
datasetKey
- of the dataset to crawlendpointType
- of the datasettargetUrl
- of the datasetattempt
- a monotonously increasing counter, increased every time we try to crawl a dataset whether that attempt is successful or notproperties
- a way to provide protocol or crawl specific options
-
CrawlJob
public CrawlJob(UUID datasetKey, Integer attempt, EndpointType endpointType, URI targetUrl)
Constructor with mandatory fields. Properties field is set to null.- Parameters:
datasetKey
- of the dataset to crawlendpointType
- of the datasettargetUrl
- of the datasetattempt
- a monotonously increasing counter, increased every time we try to crawl a dataset whether that attempt is successful or not
-
-
Method Detail
-
getDatasetKey
public UUID getDatasetKey()
-
getEndpointType
public EndpointType getEndpointType()
-
getProperties
public Map<String,String> getProperties()
Used to save protocol specific information (e.g. contentNamespace for TAPIR and BioCASe).- Returns:
- an immutable map of all the properties
-
getTargetUrl
public URI getTargetUrl()
-
getAttempt
public int getAttempt()
-
getProperty
public String getProperty(String name)
-
-