Package org.cdlib.mrt.s3.tools
Class AddObjectComponentSave
java.lang.Object
org.cdlib.mrt.s3.tools.AddObjectComponentSave
this routine is used to build a manifest.xml file from content saved in cloud.
Note that the constructed manifest.xml will only contain additions and content replacement.
If any component was deleted in later versions it cannot be identified by this routine.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AddObjectComponentSave
(CloudStoreInf cloud, String container, org.cdlib.mrt.utility.LoggerInf logger) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(String objectIDS, int versionID, String fileID, File inputFile, boolean addIt, boolean replaceIt) Add new component to file (e.g.void
addComponent
(org.cdlib.mrt.core.Identifier objectID, int versionID, String fileID, File inputFile, boolean addIt, boolean replaceIt) Add new component to file (e.g.protected void
closeStream
(InputStream inStream) static AddObjectComponentSave
getAddObjectComponent
(CloudStoreInf cloud, String container, org.cdlib.mrt.utility.LoggerInf logger) Get object for constructing manifest
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
NL
-
logger
protected org.cdlib.mrt.utility.LoggerInf logger -
addFile
-
cloud
-
container
-
tika
protected org.cdlib.mrt.core.Tika tika
-
-
Constructor Details
-
AddObjectComponentSave
protected AddObjectComponentSave(CloudStoreInf cloud, String container, org.cdlib.mrt.utility.LoggerInf logger) throws org.cdlib.mrt.utility.TException Constructor- Parameters:
cloud
- Cloud access object interfacecontainer
- container/bucket of cloud storage containing objectdirectory
- local directory file to contain extracted content from cloudlogger
- Merritt logger- Throws:
org.cdlib.mrt.utility.TException
-
-
Method Details
-
getAddObjectComponent
public static AddObjectComponentSave getAddObjectComponent(CloudStoreInf cloud, String container, org.cdlib.mrt.utility.LoggerInf logger) throws org.cdlib.mrt.utility.TException Get object for constructing manifest- Parameters:
cloud
- Cloud access object interfacecontainer
- container/bucket of cloud storage containing objectdirectory
- local directory file to contain extracted content from cloudlogger
- Merritt logger- Throws:
org.cdlib.mrt.utility.TException
-
addComponent
public void addComponent(String objectIDS, int versionID, String fileID, File inputFile, boolean addIt, boolean replaceIt) throws org.cdlib.mrt.utility.TException Add new component to file (e.g. fix)- Parameters:
objectID
- object identifierversionID
- version identifierfileID
- file identifier/pathinputFile
- file to be addedaddIt
- true=physically add filereplaceIt
- true=replace file if already exists- Throws:
org.cdlib.mrt.utility.TException
-
addComponent
public void addComponent(org.cdlib.mrt.core.Identifier objectID, int versionID, String fileID, File inputFile, boolean addIt, boolean replaceIt) throws org.cdlib.mrt.utility.TException Add new component to file (e.g. fix)- Parameters:
objectID
- object identifierversionID
- version identifierfileID
- file identifier/pathinputFile
- file to be addedaddIt
- true=physically add filereplaceIt
- true=replace file if already exists- Throws:
org.cdlib.mrt.utility.TException
-
closeStream
- Throws:
org.cdlib.mrt.utility.TException
-