Package org.cdlib.mrt.s3.tools
Class AddObjectComponent
java.lang.Object
org.cdlib.mrt.s3.tools.AddObjectComponent
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
FieldsModifier and TypeFieldDescriptionprotected File
protected CloudStoreInf
protected String
protected static final boolean
protected boolean
protected org.cdlib.mrt.utility.LoggerInf
protected static final String
protected static final String
protected static final String
protected org.cdlib.mrt.core.Tika
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AddObjectComponent
(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
(String key, 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) protected void
displayResponse
(String header, CloudResponse response) static AddObjectComponent
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 -
displayFile
protected boolean displayFile
-
-
Constructor Details
-
AddObjectComponent
protected AddObjectComponent(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 AddObjectComponent 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
-
addComponent
public void addComponent(String key, File inputFile, boolean addIt, boolean replaceIt) throws org.cdlib.mrt.utility.TException Add new component to file (e.g. fix)- Parameters:
key
- rackspace keyinputFile
- 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
-
displayResponse
-