Prerelease f4 |
---|
toc
Overview
By default, whenever a REST call is made that results in one or more modifications to data in the fedora 4 repository, a new version is created. A relationship is made from an object to its version history, it's base version and its predecessors.
Browsing old versions
From the HTML view of the REST interface
- Create a node, then update its properties or content.
- Follow the link to the "predecessors" which will take you to a "version" node
- Follow the link to the first child, which is a "frozenNode" that represents the last version of the node
- Follow the link to that version node's "predecessors" which will take you to the version prior to that one
Configuration
Whether and how versions are made of nodes depends on how the node type is configured. Node types that have the "mix:versionable" mixin are versionable, node types without it are not and won't retain historical versions when updated.
Within fedora 4, snapshots of the current state of an object may be saved into the version history either through explicit user requests or during each update to that object. The properties or content of a node saved in these version checkpoints may be accessed later to serve as a historical record of the object. Future feature development may allow for easy reversion to prior versions, export of the entire history or other useful actions.
Creating versions
When you wish to save a snapshot of the current version of a node to the version history you can use the REST API.
Tip |
---|
Version creation is a relatively costly operation. With the ability to create versions whenever you wish, you can develop workflows that maximize the utility of the version history. Possible strategies include:
|
If you wish to save a full history of a node by having versions created every time the node is updated, you can set the property "fedora:version-policy" to "auto-version".
Tip |
---|
If your needs for digital preservation are highest and you're willing to sacrifice a little bit of performance, you can alter the node type definition to automatically set the auto-versioning policy on newly created objects and automatically save every revision. |
Viewing old Versions
From the HTML view (or by issuing HTTP GET methods in a browser) you can get the version history of a node by appending "/fcr:versions" to it's base URL.
Turn off Node Versioning
The fedora repository can operate with unversionable nodes as well as versionable nodes. By default, the "mix:versionable" mixin is applied to newly created fedora nodes. This enables versioning (though does not necessarily result in the creation of versions) for that node. Version-related operations will not work against unversionable nodes, an the presence of the "versioning-policy" will have no effect.
...
To disable versioning, remove mix:versionable from the node type definitions for the fedora:resource node type.
Brute force method: edit fcrepo-kernel/src/main/resources/fedora-node-types.cnd and remove the "mix:versionable" property from "fedora:resource", then run "mvn clean install" in fcrepo-kernel.
Customize Property Versioning
TBD
Related Links:
Reverting to an old version
TBD