Package org.cdlib.mrt.tools.loader
Class LoaderManifest
java.lang.Object
org.cdlib.mrt.tools.loader.LoaderManifest
Process required for constructing batch and object manifest data for emulating
mets feeder
- Author:
- loy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileComponentprotected Stringprotected longprotected Vector<FileComponent> protected URLprotected Fileprotected static final booleanprotected Fileprotected LoggerInfprotected static final Stringprotected static final Stringprotected long -
Constructor Summary
ConstructorsConstructorDescriptionLoaderManifest(String checksumType, FileComponent batchComponent, File dataDir, File loaderManifest, URL componentURLBase, LoggerInf logger) -
Method Summary
Modifier and TypeMethodDescriptionaddManifestRow(File file, String checksumType, String fileURLS, File sourceDir) Build a POST manifestprotected FileComponentBuild the METS component to be added to the component list for an individual object manifestintbuildManifest(ManifestRowAbs.ManifestType manifestType) longgetCnt()longprotected voidvoidrun(ManifestRowAbs.ManifestType manifestType) static LoaderManifestrun(ManifestRowAbs.ManifestType manifestType, String checksumType, FileComponent batchComponent, File dataDir, File loaderManifestFile, URL componentURLBase, LoggerInf logger) longBuild a POST manifest
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
batchComponent
-
dataDir
-
loaderManifest
-
componentURLBase
-
checksumType
-
logger
-
components
-
totSize
protected long totSize -
cnt
protected long cnt
-
-
Constructor Details
-
LoaderManifest
public LoaderManifest(String checksumType, FileComponent batchComponent, File dataDir, File loaderManifest, URL componentURLBase, LoggerInf logger) throws TException - Throws:
TException
-
-
Method Details
-
run
public static LoaderManifest run(ManifestRowAbs.ManifestType manifestType, String checksumType, FileComponent batchComponent, File dataDir, File loaderManifestFile, URL componentURLBase, LoggerInf logger) throws TException - Throws:
TException
-
run
- Throws:
TException
-
setComponents
Build a POST manifest- Parameters:
fileURLS- base URL for deriving manifest fileURLsextractDir- directory file containing files for manifest generationloaderManifest- output file to contain INGEST manifest- Returns:
- accumulated size of files referenced by manifest
- Throws:
TException- process exception
-
buildManifest
- Throws:
TException
-
addManifestRow
public FileComponent addManifestRow(File file, String checksumType, String fileURLS, File sourceDir) throws TException Build a POST manifest- Parameters:
fileURLS- base URL for deriving manifest fileURLssourceDir- directory file containing files for manifest generationpostManifest- output file to contain POST manifest- Returns:
- accumulated size of files referenced by manifest
- Throws:
TException- process exception
-
buildBatchManifestRow
Build the METS component to be added to the component list for an individual object manifest- Parameters:
info- object manifest information- Throws:
TException
-
log
-
getBatchComponent
-
getCnt
public long getCnt() -
getComponents
-
getTotSize
public long getTotSize()
-