public class NihmsPackageProvider extends Object implements org.dataconservancy.pass.deposit.assembler.shared.PackageProvider
| Constructor and Description |
|---|
NihmsPackageProvider() |
| Modifier and Type | Method and Description |
|---|---|
List<org.dataconservancy.pass.deposit.assembler.shared.PackageProvider.SupplementalResource> |
finish(org.dataconservancy.pass.deposit.model.DepositSubmission submission,
List<org.dataconservancy.pass.deposit.assembler.PackageStream.Resource> packageResources) |
static String |
getNonCollidingFilename(String fileName,
org.dataconservancy.pass.deposit.model.DepositFileType fileType)
Given a file name and type, returns a file name that can safely be used in a NIHMS deposit
without causing a collision with the names of files that are automatically included in the deposit package.
|
String |
packagePath(org.dataconservancy.pass.deposit.assembler.shared.DepositFileResource custodialResource) |
void |
start(org.dataconservancy.pass.deposit.model.DepositSubmission submission,
List<org.dataconservancy.pass.deposit.assembler.shared.DepositFileResource> custodialResources,
Map<String,Object> packageOptions) |
public static String getNonCollidingFilename(String fileName, org.dataconservancy.pass.deposit.model.DepositFileType fileType)
fileName - the name of a file to be included in the deposit, which may conflict with a reserved name.fileType - the type of the file whose name is being validated.public void start(org.dataconservancy.pass.deposit.model.DepositSubmission submission,
List<org.dataconservancy.pass.deposit.assembler.shared.DepositFileResource> custodialResources,
Map<String,Object> packageOptions)
start in interface org.dataconservancy.pass.deposit.assembler.shared.PackageProviderpublic String packagePath(org.dataconservancy.pass.deposit.assembler.shared.DepositFileResource custodialResource)
Returns the file name for the resource, or a modified version thereof if the name matches that of one of the default files that are included in a NIHMS deposit. The file type is not known at this point in the code, but we do know that it must be user-supplied and therefore not "bulksub_meta_xml" (the only type that warrants special treatment in getNoncollidingFilename()). So, the type is always passed as "supplement" to avoid that special treatment.
packagePath in interface org.dataconservancy.pass.deposit.assembler.shared.PackageProvidercustodialResource - the resource for which a safe file name will be returned.public List<org.dataconservancy.pass.deposit.assembler.shared.PackageProvider.SupplementalResource> finish(org.dataconservancy.pass.deposit.model.DepositSubmission submission, List<org.dataconservancy.pass.deposit.assembler.PackageStream.Resource> packageResources)
finish in interface org.dataconservancy.pass.deposit.assembler.shared.PackageProviderCopyright © 2019. All rights reserved.