Package de.dlr.proseo.api.aipclient.rest
Klasse DownloadManager
java.lang.Object
de.dlr.proseo.api.aipclient.rest.DownloadManager
Class to handle product downloads from remote Long-term Archives
Archive queries are restricted to the logged-in mission using the first three characters of the file name, as per the EO GS File Format Standard (PE-TN-ESA-GS-0001), issue 3.01, sec. 4.1
Archive queries are restricted to the logged-in mission using the first three characters of the file name, as per the EO GS File Format Standard (PE-TN-ESA-GS-0001), issue 3.01, sec. 4.1
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdownloadAllBySensingTime
(String productType, String startTime, String stopTime, String facility, String password) Provide all products with the given product type at the given processing facility, whose sensing times intersect with the given sensing time interval.downloadByName
(String filename, String facility, String password) Provide the product with the given file name at the given processing facility.downloadBySensingTime
(String productType, String startTime, String stopTime, String facility, String password) Provide the product with the given product type and the exact sensing start and stop times (at millisecond precision) at the given processing facility.protected IngestorProduct
setProductMetadata
(RestProduct product, String missionCode) Create product representation for Ingestor (mission-specific subclasses may want to override this method to set the attributes from inspecting the downloaded product)
-
Konstruktordetails
-
DownloadManager
public DownloadManager()
-
-
Methodendetails
-
setProductMetadata
Create product representation for Ingestor (mission-specific subclasses may want to override this method to set the attributes from inspecting the downloaded product)- Parameter:
product
- the product metadata as received from the archivemissionCode
- the code of the mission to ingest to- Gibt zurück:
- a product representation suitable for ingestion
-
downloadByName
public RestProduct downloadByName(String filename, String facility, String password) throws javax.persistence.NoResultException, IllegalArgumentException Provide the product with the given file name at the given processing facility. If it already is available there, do nothing and just return the product metadata. If it is not available locally, query all configured LTAs for a product with the given file name, the first response is returned to the caller, then download from the LTA and ingested at the given processing facility.- Parameter:
filename
- the (unique) product file name to search forfacility
- the processing facility to store the downloaded product files inpassword
- password for Ingestor login- Gibt zurück:
- the product provided
- Löst aus:
javax.persistence.NoResultException
- if no products matching the given selection criteria were foundIllegalArgumentException
- if an invalid processing facility name was given
-
downloadBySensingTime
public RestProduct downloadBySensingTime(String productType, String startTime, String stopTime, String facility, String password) throws javax.persistence.NoResultException, IllegalArgumentException Provide the product with the given product type and the exact sensing start and stop times (at millisecond precision) at the given processing facility. If it already is available there, do nothing and just return the product metadata. If it is not available locally, query all configured LTAs for a product with the given search criteria. The first response is evaluated: If multiple products fulfilling the criteria are found in the LTA, the product with the most recent generation time will be used. In the (unlikely) case of several products having the same generation time, the product with the greatest file name (alphanumeric string comparison) will be used. The product metadata is returned to the caller, then the product is downloaded from the LTA and ingested at the given processing facility.- Parameter:
productType
- the product typestartTime
- start of the sensing time interval (at millisecond precision)stopTime
- end of the sensing time interval (at millisecond precision)facility
- the processing facility to store the downloaded product files inpassword
- password for Ingestor login- Gibt zurück:
- the product provided
- Löst aus:
javax.persistence.NoResultException
- if no products matching the given selection criteria were foundIllegalArgumentException
- if an invalid facility name, product type or sensing time was given
-
downloadAllBySensingTime
public List<RestProduct> downloadAllBySensingTime(String productType, String startTime, String stopTime, String facility, String password) throws javax.persistence.NoResultException, IllegalArgumentException, SecurityException Provide all products with the given product type at the given processing facility, whose sensing times intersect with the given sensing time interval. Query all configured LTAs for products with the given search criteria, the first response is evaluated. The product metadata is returned to the caller, then the products are downloaded from the LTA and ingested at the given processing facility, unless they are already available there.- Parameter:
productType
- the product typestartTime
- the start of the sensing time intervalstopTime
- the end of the sensing time intervalfacility
- the processing facility to store the downloaded product files inpassword
- password for Ingestor login- Gibt zurück:
- a list of the products provided from the LTA
- Löst aus:
javax.persistence.NoResultException
- if no products matching the given selection criteria were foundIllegalArgumentException
- if an invalid facility name, product type or sensing time was givenSecurityException
-