Package io.ocfl.core

Class ObjectPaths

java.lang.Object
io.ocfl.core.ObjectPaths

public final class ObjectPaths extends Object
Centralizes common OCFL path locations
  • Method Details

    • inventoryPath

      public static Path inventoryPath(Path directory)
      Path to an inventory file within the given directory
      Parameters:
      directory - parent directory of an inventory file
      Returns:
      path to inventory file
    • inventoryPath

      public static String inventoryPath(String directory)
      Path to an inventory file within the given directory
      Parameters:
      directory - parent directory of an inventory file
      Returns:
      path to inventory file
    • inventorySidecarPath

      public static Path inventorySidecarPath(Path directory, Inventory inventory)
      Path to an inventory sidecar file within the given directory
      Parameters:
      directory - parent directory of an inventory file
      inventory - deserialized inventory
      Returns:
      path to inventory sidecar
    • inventorySidecarPath

      public static String inventorySidecarPath(String directory, Inventory inventory)
      Path to an inventory sidecar file within the given directory
      Parameters:
      directory - parent directory of an inventory file
      inventory - deserialized inventory
      Returns:
      path to inventory sidecar
    • findInventorySidecarPath

      public static Path findInventorySidecarPath(Path directory)
      Path to an inventory sidecar file within the given directory
      Parameters:
      directory - parent directory of an inventory file
      Returns:
      path to inventory sidecar
    • findMutableHeadRootInventorySidecarPath

      public static Path findMutableHeadRootInventorySidecarPath(Path directory)
      Path to the saved sidecar file within the mutable head extension
      Parameters:
      directory - parent directory of an inventory file
      Returns:
      path to the saved root inventory sidecar
    • logsPath

      public static Path logsPath(Path objectRoot)
      Path to the logs directory within an object
      Parameters:
      objectRoot - object root directory
      Returns:
      path to logs
    • logsPath

      public static String logsPath(String objectRoot)
      Path to the logs directory within an object
      Parameters:
      objectRoot - object root directory
      Returns:
      path to logs
    • extensionsPath

      public static Path extensionsPath(Path objectRoot)
      Path to the extensions directory within an object
      Parameters:
      objectRoot - object root directory
      Returns:
      path to extensions
    • extensionsPath

      public static String extensionsPath(String objectRoot)
      Path to the extensions directory within an object
      Parameters:
      objectRoot - object root directory
      Returns:
      path to extensions
    • mutableHeadInventoryPath

      public static Path mutableHeadInventoryPath(Path objectRootPath)
      Path to an inventory file within the mutable HEAD
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD inventory file
    • mutableHeadInventoryPath

      public static String mutableHeadInventoryPath(String objectRootPath)
      Path to an inventory file within the mutable HEAD
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD inventory file
    • mutableHeadInventorySidecarPath

      public static String mutableHeadInventorySidecarPath(String objectRootPath, Inventory inventory)
      Path to an inventory sidecar file within the given directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      inventory - deserialized inventory
      Returns:
      path to inventory sidecar
    • mutableHeadVersionPath

      public static String mutableHeadVersionPath(String objectRootPath)
      Path to the mutable HEAD extension version directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD extension version directory
    • mutableHeadVersionPath

      public static Path mutableHeadVersionPath(Path objectRootPath)
      Path to the mutable HEAD extension version directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD extension version directory
    • mutableHeadExtensionRoot

      public static String mutableHeadExtensionRoot(String objectRootPath)
      Path to the mutable HEAD extension root directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD extension root directory
    • mutableHeadExtensionRoot

      public static Path mutableHeadExtensionRoot(Path objectRootPath)
      Path to the mutable HEAD extension root directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      path to the mutable HEAD extension root directory
    • mutableHeadRevisionsPath

      public static String mutableHeadRevisionsPath(String objectRootPath)
      Path the revisions directory under the mutable HEAD extension directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      Path the revisions directory under the mutable HEAD extension directory
    • mutableHeadRevisionsPath

      public static Path mutableHeadRevisionsPath(Path objectRootPath)
      Path the revisions directory under the mutable HEAD extension directory
      Parameters:
      objectRootPath - path to the root of an ocfl object
      Returns:
      Path the revisions directory under the mutable HEAD extension directory
    • objectRoot

      public static ObjectPaths.ObjectRoot objectRoot(Inventory inventory)
      Creates a new ObjectRoot object
      Parameters:
      inventory - deserialized inventory
      Returns:
      ObjectRoot