Versions Compared

Key

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

...

Excerpt
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.

Enabling Versioning

By default, versioning is disabled for all nodes.  In order to enable version-related operations for a node, you must first add the mix:versionable mixin.

To enable versioning for a single node using the REST API:

Code Block
languagebash
titleEnable Versioning via the REST API
echo "insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.jcp.org/jcr/mix/1.0versionable> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/path/to/object 

Enabling versioning for all nodes is incompatible with read/write filesystem federation.  If you are not using filesystem federation (or only read-only), you can make all nodes versionable by default.

Creating versions

Explicit version creation

...

Tip
titleFeature Note

Future versions of fedora will allow reversion to previous versions.

 

Turn off Node Versioning

...

versions

...

.

...

See how to make fedora nodes unversionable here.

 

 

...