Class PackageDownloaderV1

java.lang.Object
edu.ucsb.nceas.metacat.download.PackageDownloaderV1

public class PackageDownloaderV1 extends Object
  • Field Details

    • packagePids

      public List<org.dataone.service.types.v1.Identifier> packagePids
    • speedBag

      public org.dataone.speedbagit.SpeedBagIt speedBag
    • pidMapping

      public StringBuffer pidMapping
    • fileNames

      public Map<org.dataone.service.types.v1.Identifier,String> fileNames
  • Constructor Details

    • PackageDownloaderV1

      public PackageDownloaderV1(org.dataone.service.types.v1.Identifier pid) throws org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.ServiceFailure, org.dataone.service.exceptions.NotFound, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.InvalidRequest, IOException, org.dataone.service.exceptions.NotImplemented
      Creates a PackageDownloaderV1 object. This initializes the member variables and creates the bag filesystem structure.
      Parameters:
      pid - : The PID of the resource map
      Throws:
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.ServiceFailure
      org.dataone.service.exceptions.NotFound
      org.dataone.service.exceptions.NotAuthorized
      org.dataone.service.exceptions.InvalidRequest
      IOException
      org.dataone.service.exceptions.NotImplemented
  • Method Details

    • download

      public InputStream download() throws org.dataone.service.exceptions.ServiceFailure, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.NotFound, org.dataone.service.exceptions.NotImplemented
      Throws:
      org.dataone.service.exceptions.ServiceFailure
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.NotAuthorized
      org.dataone.service.exceptions.NotFound
      org.dataone.service.exceptions.NotImplemented
    • addSciPdf

      public void addSciPdf(InputStream metadataStream, org.dataone.service.types.v2.SystemMetadata metadataSysMeta, org.dataone.service.types.v1.Identifier metadataID)
      Creates a pdf out of the science metadata and adds it to the bag.