Current Release

This documentation covers the current version of Fedora. Looking for another version? See all documentation.

Fedora 6 persists all of its data to an OCFL repository using the ocfl-java library. While Fedora does have a runtime database component, the entirety of the database can be recreated from the contents of the OCFL repository.

By default, Fedora's OCFL repository is located at FCREPO_HOME/data/ocfl-root. Fedora uses the Hashed N-Tuple Storage Layout Extension to map OCFL object IDs to storage locations within the OCFL storage root. All of the extension's default settings are used.

In most cases, Fedora resource IDs are mapped directly to OCFL object IDs. For example, the resource ID "foo/bar" is internally represented as "info:fedora/foo/bar", and is mapped directly to an OCFL object ID, which is turn mapped to the path FCREPO_HOME/data/ocfl-root/70c/b11/831/70cb11831eda669bfa7ccbe0996d3df06186f47a6f3544cabff61b3f79509d73. This is the path where all of the data related to the "foo/bar" resource can be found.

The following one-liner translates a resource ID to its storage path relative the OCFL storage root:

id="foo/bar"; id_digest=$(echo -n "info:fedora/${id}" | sha256sum -); echo "${id_digest:0:3}/${id_digest:3:3}/${id_digest:6:3}/${id_digest}"

While it is possible to browse the contents of the OCFL repository by hand, it typically makes more sense to use an OCFL CLI client such as rocfl or ocfl-py. These tools make it easy to inspect the contents of OCFL objects.

Fedora stores the IDs of resources under its control using the placeholder "info:fedora/" in place of the schema, hostname, port and context of the server.

i.e. http://localhost:8080/rest/my/resource => info:fedora/my/resource

The format of the OCFL objects is described in detail in Fedora OCFL Object Structure.

Apart from side-loading new objects, you should not modify the contents of any object in the OCFL repository outside of Fedora. Fedora will not pickup these changes automatically, and it will likely corrupt the object.



  • No labels