Klasse DownloadManager

java.lang.Object
de.dlr.proseo.api.aipclient.rest.DownloadManager

@Component public class DownloadManager extends Object
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
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • DownloadManager

      public DownloadManager()
  • Methodendetails

    • setProductMetadata

      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)
      Parameter:
      product - the product metadata as received from the archive
      missionCode - 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 for
      facility - the processing facility to store the downloaded product files in
      password - 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 found
      IllegalArgumentException - 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 type
      startTime - 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 in
      password - 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 found
      IllegalArgumentException - 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 type
      startTime - the start of the sensing time interval
      stopTime - the end of the sensing time interval
      facility - the processing facility to store the downloaded product files in
      password - 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 found
      IllegalArgumentException - if an invalid facility name, product type or sensing time was given
      SecurityException