Class AddObjectComponentSave

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

public class AddObjectComponentSave 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

  • 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 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 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 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
    • closeStream

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