Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt
Within Fedora 4, snapshots of the current state of a resource may be saved into the version history.  The RDF for historic version shapshots versions may be browsed and old non-RDF content may be downloaded.  Furthermore, an object or subgraph may be reverted to the state that it existed in a historic version.

...

When you wish to save a snapshot of the current version of a node to the version history you can use the REST API.  When saving these versions you must provide a label that both serves to easily differentiate a version from another and allow easy retrieval of that versionThe version label will be automatically generated based on the current timestamp (with second granularity).

Expand
title Click to expand the full REST API Documentation...

Include Page
RESTful HTTP API - Versioning
RESTful HTTP API - Versioning


Note
title Duplicate Version Labels Versions
If a resource has a version with a given labeltimestamp, you may not create another version with that labeltimestamp.  If you later delete a labeled that version, you may then create a new version with that labeltimestamp.


Tip

Version creation is can be a relatively costly operation.  With the ability to create versions whenever you wish, you can develop workflows that maximize the utility of this feature.


Possible strategies include:

  • For batch operations, only create version checkpoints once nodes have been ingested, verified and tested.
  • For small (but high-level) data such as the descriptive metadata created by subject experts, set a versioning policy to store every modification, thereby capturing the entirety of the curatorial endeavor.
  • Create snapshot versions that correspond to released versions of content (i.e., version X of a shared dataset, controlled vocabulary or collection)

...

If you wish to restore an object to a previous version, you may must do so using the RESTful HTTP API - Versioning, or even the HTML view.  In the HTML view of a historic version, a button "Revert to this Version" exists, that when clicked restores the object (and possibly the sub-graph) to the version viewed.

Info

When restoring an old version, two operations occur:

  1. Immediately before restoring the old version, a version snapshot is made to reflect the current state of the object.  This version will not have a label starting with "auto-snapshot-before-".
  2. The current state of the resource will be updated to match the version being restored – but a new version will not be created.  You can create a version explicitly if you want to create a version that records the revert.

...