Package org.fcrepo.storage.ocfl
Class PersistencePaths
java.lang.Object
org.fcrepo.storage.ocfl.PersistencePaths
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic PersistencePathsaclResource(boolean describesRdfResource, String rootResourceId, String resourceId) Returns the paths for ACL resources.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 Details
-
FCR_METADATA
- See Also:
-
FCR_ACL
- See Also:
-
ROOT_HEADER_PATH
- See Also:
-
-
Method Details
-
getContentFilePath
-
getHeaderFilePath
-
headerPath
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
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
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
Returns true if the path is a resource header file.- Parameters:
path- file path- Returns:
- true if it's a resource header file
-