Enum Class CdbFolders

java.lang.Object
java.lang.Enum<CdbFolders>
org.eso.ias.cdb.structuredtext.CdbFolders
All Implemented Interfaces:
Serializable, Comparable<CdbFolders>, Constable

public enum CdbFolders extends Enum<CdbFolders>

The structure of the folders and the names of the files of the CDB are described in the CDB wiki:

 
 +CDB
 	| ias.json
  |+ SUPERVISOR
     | <SupID-1>.json
     | ...
     | <SupID-n>.json
  |+ DASU
     | <DasuID-1>.json
     | ...
     | <DasuID-m>.json
  |+ TF
     | tfs.json
  |+ ASCE
     | <AsceID-1>.json
     | ...
     | <AsceID-t>.json
  |+ IASIO
     | IASIO.json
  |+ TEMPLATE
     | templates.json
  |+ CLIENT
     | <ClientId-1>.conf
     | ...
     | <ClientId-x>.conf
 
 CdbFolders returns the path and the names of the folders of the IAS CDB.
 
 CdbFolders only deals with the folders of the CDB 
 but not with the name of the files that ultimately depends on the selected format.
 The example shown above is for JSON files.
Author:
acaproni
  • Enum Constant Details

  • Field Details

    • folderName

      public final String folderName
      The name of the folder
  • Method Details

    • values

      public static CdbFolders[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CdbFolders valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFolder

      public Path getFolder(Path cdbParentPath) throws InvalidPathException
      Get the path of the CDB folder.
      Parameters:
      cdbParentPath - : The path to the parent of the CDB
      Returns:
      the path to the subfolder.
      Throws:
      InvalidPathException - If the path is not valid
    • exists

      public boolean exists(Path cdbParentPath)
      Check if the subfolder exists
      Parameters:
      cdbParentPath - The path of the folder
      Returns:
      true if the folder exists, false otherwise.
    • getSubfolder

      public static Path getSubfolder(Path cdbParentPath, CdbFolders folder) throws InvalidPathException
      Get the path of a CDB sub-folder.
      Parameters:
      cdbParentPath - : The path to the parent of the CDB
      folder - : the CDB folder to create
      Returns:
      the path to the subfolder.
      Throws:
      InvalidPathException - If the path is not valid