public class PackageDownloaderV2
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
org.dataone.speedbagit.SpeedBagIt |
speedBag |
Constructor and Description |
---|
PackageDownloaderV2(org.dataone.service.types.v1.Identifier pid,
org.dspace.foresite.ResourceMap resourceMap,
org.dataone.service.types.v2.SystemMetadata resourceMapSystemMetadata)
Creates a PackageDownloader object
|
Modifier and Type | Method and Description |
---|---|
void |
addDataFile(org.dataone.service.types.v2.SystemMetadata systemMetadata,
java.io.InputStream inputStream)
Adds a data file's stream to the bag
|
void |
addResourceMap()
Adds the resource map to the bag.
|
void |
addScienceMetadata(org.dataone.service.types.v2.SystemMetadata sysMeta,
java.io.InputStream inputStream)
Adds a system metadata document and its InputStream to the class record
|
void |
addScienceMetadatas() |
void |
addScienceSystemMetadata(org.dataone.service.types.v1.Identifier scienceMetadataIdentifier)
Sets the science metadata
|
void |
addSystemMetadata(org.dataone.service.types.v2.SystemMetadata systemMetadata)
Adds a system metadata object to the bag
|
java.io.InputStream |
download()
Streams the completed bag to the caller.
|
java.util.List<org.dataone.service.types.v1.Identifier> |
getCoreMetadataIdentifiers()
Returns the core metadata identifiers
|
java.util.List<org.dataone.service.types.v1.Identifier> |
getScienceMetadataIdentifiers()
Gets all of the science metadata documents in the downloader
|
void |
getScienceMetadataIds() |
public PackageDownloaderV2(org.dataone.service.types.v1.Identifier pid, org.dspace.foresite.ResourceMap resourceMap, org.dataone.service.types.v2.SystemMetadata resourceMapSystemMetadata) throws org.dataone.service.exceptions.ServiceFailure
pid:
- The PID of the resource mapresourceMap:
- The package's resource maporg.dataone.service.exceptions.ServiceFailure
public java.util.List<org.dataone.service.types.v1.Identifier> getCoreMetadataIdentifiers()
public void addScienceSystemMetadata(org.dataone.service.types.v1.Identifier scienceMetadataIdentifier)
scienceMetadataIdentifier:
- The science metadata identifierpublic java.util.List<org.dataone.service.types.v1.Identifier> getScienceMetadataIdentifiers()
public void addScienceMetadata(org.dataone.service.types.v2.SystemMetadata sysMeta, java.io.InputStream inputStream)
sysMeta
- the system metadata being addedinputStream
- An InputStream to the science metadatapublic void addDataFile(org.dataone.service.types.v2.SystemMetadata systemMetadata, java.io.InputStream inputStream) throws org.dataone.service.exceptions.ServiceFailure
systemMetadata
- The object's system metadatainputStream
- An input stream to the data fileorg.dataone.service.exceptions.ServiceFailure
public void addScienceMetadatas() throws java.security.NoSuchAlgorithmException, org.dataone.service.exceptions.ServiceFailure
java.security.NoSuchAlgorithmException
org.dataone.service.exceptions.ServiceFailure
public void addResourceMap() throws java.security.NoSuchAlgorithmException, org.dataone.service.exceptions.ServiceFailure
java.security.NoSuchAlgorithmException
org.dataone.service.exceptions.ServiceFailure
public void addSystemMetadata(org.dataone.service.types.v2.SystemMetadata systemMetadata) throws java.security.NoSuchAlgorithmException
systemMetadata:
- The system metadata object being added to the bagjava.security.NoSuchAlgorithmException
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
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
public void getScienceMetadataIds()
Copyright © 2023 Regents of the University of California. All Rights Reserved.