Class PersistencePaths

java.lang.Object
org.fcrepo.storage.ocfl.PersistencePaths

public final class PersistencePaths extends Object
This class maps Fedora resources to locations on disk. It is based on this wiki: https://wiki.lyrasis.org/display/FF/Design+-+Fedora+OCFL+Object+Structure
Since:
6.0.0
Author:
pwinckles
  • Field Details

  • Method Details

    • getContentFilePath

      public String getContentFilePath()
    • getHeaderFilePath

      public String getHeaderFilePath()
    • headerPath

      public static String headerPath(String rootResourceId, String resourceId)
      Returns the path to the resourceId's header file. The rootResourceId is the id of the resource that's at the root of the OCFL object. In the case of atomic resources the rootId and resourceId are one and the same. They are only different for archival parts.
      Parameters:
      rootResourceId - the id of the resource at the root of the OCFL object
      resourceId - the id of the resource to get the header path for
      Returns:
      path to header file
    • nonRdfResource

      public static PersistencePaths nonRdfResource(String rootResourceId, String resourceId)
      Returns the paths for a non-RDF resource. The rootResourceId is the id of the resource that's at the root of the OCFL object. In the case of atomic resources the rootResourceId and resourceId are one and the same. They are only different for archival parts.
      Parameters:
      rootResourceId - the id of the resource at the root of the OCFL object
      resourceId - the id of the non-rdf resource to get the paths for
      Returns:
      paths
    • rdfResource

      public static PersistencePaths rdfResource(String rootResourceId, String resourceId)
      Returns the paths for RDF resources. It should NOT be used for ACL resources. The resourceRootId is the id of the resource that's at the root of the OCFL object. In the case of atomic resources the rootResourceId and resourceId are one and the same. They are only different for archival parts.
      Parameters:
      rootResourceId - the id of the resource at the root of the OCFL object
      resourceId - the id of the rdf resource to get the paths for
      Returns:
      paths
    • aclResource

      public static PersistencePaths aclResource(boolean describesRdfResource, String rootResourceId, String resourceId)
      Returns the paths for ACL resources. The rootResourceId is the id of the resource that's at the root of the OCFL object. In the case of atomic resources the rootResourceId and resourceId are one and the same. They are only different for archival parts.
      Parameters:
      describesRdfResource - indicates if the acl is associated to a rdf resource
      rootResourceId - the id of the resource at the root of the OCFL object
      resourceId - the id of the acl resource to get the paths for
      Returns:
      paths
    • isHeaderFile

      public static boolean isHeaderFile(String path)
      Returns true if the path is a resource header file.
      Parameters:
      path - file path
      Returns:
      true if it's a resource header file