Package edu.wisc.library.ocfl.core
Class ObjectPaths
- java.lang.Object
-
- edu.wisc.library.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 classObjectPaths.ContentRootProvides methods for navigating a version's content directorystatic interfaceObjectPaths.HasInventorystatic classObjectPaths.ObjectRootProvides methods for navigating an OCFL object rootstatic classObjectPaths.VersionRootProvides methods for navigating an OCFL object version directory
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringextensionsPath(String objectRoot)Path to the extensions directory within an objectstatic PathextensionsPath(Path objectRoot)Path to the extensions directory within an objectstatic PathfindInventorySidecarPath(Path directory)Path to an inventory sidecar file within the given directorystatic PathfindMutableHeadRootInventorySidecarPath(Path directory)Path to the saved sidecar file within the mutable head extensionstatic StringinventoryPath(String directory)Path to an inventory file within the given directorystatic PathinventoryPath(Path directory)Path to an inventory file within the given directorystatic StringinventorySidecarPath(String directory, Inventory inventory)Path to an inventory sidecar file within the given directorystatic PathinventorySidecarPath(Path directory, Inventory inventory)Path to an inventory sidecar file within the given directorystatic StringlogsPath(String objectRoot)Path to the logs directory within an objectstatic PathlogsPath(Path objectRoot)Path to the logs directory within an objectstatic StringmutableHeadExtensionRoot(String objectRootPath)Path to the mutable HEAD extension root directorystatic PathmutableHeadExtensionRoot(Path objectRootPath)Path to the mutable HEAD extension root directorystatic StringmutableHeadInventoryPath(String objectRootPath)Path to an inventory file within the mutable HEADstatic PathmutableHeadInventoryPath(Path objectRootPath)Path to an inventory file within the mutable HEADstatic StringmutableHeadInventorySidecarPath(String objectRootPath, Inventory inventory)Path to an inventory sidecar file within the given directorystatic StringmutableHeadRevisionsPath(String objectRootPath)Path the revisions directory under the mutable HEAD extension directorystatic PathmutableHeadRevisionsPath(Path objectRootPath)Path the revisions directory under the mutable HEAD extension directorystatic StringmutableHeadVersionPath(String objectRootPath)Path to the mutable HEAD extension version directorystatic PathmutableHeadVersionPath(Path objectRootPath)Path to the mutable HEAD extension version directorystatic StringobjectNamastePath(String objectRoot)Path to the object's namaste file.static PathobjectNamastePath(Path objectRoot)Path to the object's namaste file.static ObjectPaths.ObjectRootobjectRoot(Inventory inventory)Creates a new ObjectRoot object
-
-
-
Method Detail
-
objectNamastePath
public static Path objectNamastePath(Path objectRoot)
Path to the object's namaste file.- Parameters:
objectRoot- path to the object root- Returns:
- path to namaste file
-
objectNamastePath
public static String objectNamastePath(String objectRoot)
Path to the object's namaste file.- Parameters:
objectRoot- path to the object root- Returns:
- path to namaste file
-
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
-
-