Class ProjectFunctions

java.lang.Object
mgui.interfaces.Utility
mgui.interfaces.projects.util.ProjectFunctions

public class ProjectFunctions
extends Utility
Utilities for InterfaceProject objects.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Summary

    Constructors
    Constructor Description
    ProjectFunctions()  
  • Method Summary

    Modifier and Type Method Description
    static boolean consolidateDirectories​(java.util.HashMap<java.lang.String,​java.lang.Object> parameters)
    Consolidates the contents of a set of directories into a single directory.
    static boolean consolidateDirectories​(java.util.HashMap<java.lang.String,​java.lang.Object> parameters, ProgressUpdater progress)
    Consolidates the contents of a set of directories into a single directory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProjectFunctions

      public ProjectFunctions()
  • Method Details

    • consolidateDirectories

      public static boolean consolidateDirectories​(java.util.HashMap<java.lang.String,​java.lang.Object> parameters)
      Consolidates the contents of a set of directories into a single directory. Can optionally modify top-level subdirectory names to reflect their original directory. Parameters are a key-value map of Objects; as follows:

      Parameters:

      • directories Type ArrayList<String>: The directories to consolidate
      • target_dir Type String: The directory into which to move/copy the contents
      • retain_original No type: If this key exists, the original data will not be deleted; otherwise it will.
      • clobber No type: If this key exists, any existing files at target locations will be overwritten; otherwise they will be skipped. Not that if the original data is not being retained, this will result in the loss of that data.
      • prefix [Optional] Type String: If specified, this string will be inserted into the top-level subdirectory names; use "{dir}" to insert the name of the containing directory.
      • suffix [Optional] Type String: If specified, this string will be appended after the top-level subdirectory names; use "{dir}" to insert the name of the containing directory.
      Parameters:
      parameters -
      Returns:
    • consolidateDirectories

      public static boolean consolidateDirectories​(java.util.HashMap<java.lang.String,​java.lang.Object> parameters, ProgressUpdater progress)
      Consolidates the contents of a set of directories into a single directory. Can optionally modify top-level subdirectory names to reflect their original directory. Parameters are a key-value map of Objects; as follows:

      Parameters:

      • directories Type ArrayList<String>: The directories to consolidate
      • target_dir Type String: The directory into which to move/copy the contents
      • retain_original No type: If this key exists, the original data will not be deleted; otherwise it will.
      • clobber No type: If this key exists, any existing files at target locations will be overwritten; otherwise they will be skipped. Not that if the original data is not being retained, this will result in the loss of that data.
      • prefix [Optional] Type String: If specified, this string will be inserted into the top-level subdirectory names; use "{dir}" to insert the name of the containing directory.
      • suffix [Optional] Type String: If specified, this string will be appended after the top-level subdirectory names; use "{dir}" to insert the name of the containing directory.
      Parameters:
      parameters -
      Returns: