Class AddObjectComponent

java.lang.Object
org.cdlib.mrt.s3.tools.AddObjectComponent

public class AddObjectComponent extends Object
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 Details

    • NAME

      protected static final String NAME
      See Also:
    • MESSAGE

      protected static final String MESSAGE
      See Also:
    • DEBUG

      protected static final boolean DEBUG
      See Also:
    • NL

      protected static final String NL
    • logger

      protected org.cdlib.mrt.utility.LoggerInf logger
    • addFile

      protected File addFile
    • cloud

      protected CloudStoreInf cloud
    • container

      protected String 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 interface
      container - container/bucket of cloud storage containing object
      directory - local directory file to contain extracted content from cloud
      logger - 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 interface
      container - container/bucket of cloud storage containing object
      directory - local directory file to contain extracted content from cloud
      logger - 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 identifier
      versionID - version identifier
      fileID - file identifier/path
      inputFile - file to be added
      addIt - true=physically add file
      replaceIt - 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 identifier
      versionID - version identifier
      fileID - file identifier/path
      inputFile - file to be added
      addIt - true=physically add file
      replaceIt - 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 key
      inputFile - file to be added
      addIt - true=physically add file
      replaceIt - true=replace file if already exists
      Throws:
      org.cdlib.mrt.utility.TException
    • closeStream

      protected void closeStream(InputStream inStream) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • displayResponse

      protected void displayResponse(String header, CloudResponse response)