Package org.fcrepo.storage.ocfl
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 Summary
Fields Modifier and Type Field Description static StringFCR_METADATAstatic StringROOT_HEADER_PATH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PersistencePathsaclResource(boolean describesRdfResource, String rootResourceId, String resourceId)Returns the paths for ACL resources.StringgetContentFilePath()StringgetHeaderFilePath()static StringheaderPath(String rootResourceId, String resourceId)Returns the path to the resourceId's header file.static booleanisHeaderFile(String path)Returns true if the path is a resource header file.static PersistencePathsnonRdfResource(String rootResourceId, String resourceId)Returns the paths for a non-RDF resource.static PersistencePathsrdfResource(String rootResourceId, String resourceId)Returns the paths for RDF resources.
-
-
-
Field Detail
-
FCR_METADATA
public static final String FCR_METADATA
- See Also:
- Constant Field Values
-
ROOT_HEADER_PATH
public static final String ROOT_HEADER_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 objectresourceId- 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 objectresourceId- 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 objectresourceId- 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 resourcerootResourceId- the id of the resource at the root of the OCFL objectresourceId- 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
-
-