Package io.ocfl.core
Class ObjectPaths
- java.lang.Object
-
- io.ocfl.core.ObjectPaths
-
public final class ObjectPaths extends Object
Centralizes common OCFL path locations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectPaths.ContentRoot
Provides methods for navigating a version's content directorystatic interface
ObjectPaths.HasInventory
static class
ObjectPaths.ObjectRoot
Provides methods for navigating an OCFL object rootstatic class
ObjectPaths.VersionRoot
Provides methods for navigating an OCFL object version directory
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
extensionsPath(String objectRoot)
Path to the extensions directory within an objectstatic Path
extensionsPath(Path objectRoot)
Path to the extensions directory within an objectstatic Path
findInventorySidecarPath(Path directory)
Path to an inventory sidecar file within the given directorystatic Path
findMutableHeadRootInventorySidecarPath(Path directory)
Path to the saved sidecar file within the mutable head extensionstatic String
inventoryPath(String directory)
Path to an inventory file within the given directorystatic Path
inventoryPath(Path directory)
Path to an inventory file within the given directorystatic String
inventorySidecarPath(String directory, Inventory inventory)
Path to an inventory sidecar file within the given directorystatic Path
inventorySidecarPath(Path directory, Inventory inventory)
Path to an inventory sidecar file within the given directorystatic String
logsPath(String objectRoot)
Path to the logs directory within an objectstatic Path
logsPath(Path objectRoot)
Path to the logs directory within an objectstatic String
mutableHeadExtensionRoot(String objectRootPath)
Path to the mutable HEAD extension root directorystatic Path
mutableHeadExtensionRoot(Path objectRootPath)
Path to the mutable HEAD extension root directorystatic String
mutableHeadInventoryPath(String objectRootPath)
Path to an inventory file within the mutable HEADstatic Path
mutableHeadInventoryPath(Path objectRootPath)
Path to an inventory file within the mutable HEADstatic String
mutableHeadInventorySidecarPath(String objectRootPath, Inventory inventory)
Path to an inventory sidecar file within the given directorystatic String
mutableHeadRevisionsPath(String objectRootPath)
Path the revisions directory under the mutable HEAD extension directorystatic Path
mutableHeadRevisionsPath(Path objectRootPath)
Path the revisions directory under the mutable HEAD extension directorystatic String
mutableHeadVersionPath(String objectRootPath)
Path to the mutable HEAD extension version directorystatic Path
mutableHeadVersionPath(Path objectRootPath)
Path to the mutable HEAD extension version directorystatic ObjectPaths.ObjectRoot
objectRoot(Inventory inventory)
Creates a new ObjectRoot object
-
-
-
Method Detail
-
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 fileinventory
- 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 fileinventory
- 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 objectinventory
- 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
-
-