edu.ucsb.nceas.metacat.download

## Class PackageDownloaderV1

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

-     public class PackageDownloaderV1
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.Map<org.dataone.service.types.v1.Identifier,java.lang.String>` | `fileNames`
    `java.util.List<org.dataone.service.types.v1.Identifier>` | `packagePids`
    `java.lang.StringBuffer` | `pidMapping`
    `org.dataone.speedbagit.SpeedBagIt` | `speedBag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PackageDownloaderV1(org.dataone.service.types.v1.Identifier pid)` Creates a PackageDownloaderV1 object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSciPdf(java.io.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.
    `java.io.InputStream` | `download()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### packagePids

          public java.util.List<org.dataone.service.types.v1.Identifier> packagePids

    - #### speedBag

          public org.dataone.speedbagit.SpeedBagIt speedBag

    - #### pidMapping

          public java.lang.StringBuffer pidMapping

    - #### fileNames

          public java.util.Map<org.dataone.service.types.v1.Identifier,java.lang.String> fileNames

  - ### Constructor Detail

    - #### 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,
                                     java.io.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`
        `java.io.IOException`
        `org.dataone.service.exceptions.NotImplemented`

  - ### Method Detail

    - #### download

          public java.io.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(java.io.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.

Copyright © 2023 Regents of the University of California. All Rights Reserved.