clj-osf.revision.diff

Send a Revision Diff Query to a OSF Revision Diff web service endpoint

The Revision: Diff web service endpoint is used to compare two revisions of the same record. A ChangeSet which contains all the added and removed triples between the two revisions is returned.

To use the Revision: Diff code, you have to:

;; Use/require the namespace
(require '[clj-osf.revision.diff :as revision-diff])

;; Define the OSF Sandbox credentials (or your own):
(require '[clj-osf.core :as osf])

(osf/defosf osf-test-endpoint {:protocol :http
                               :domain "sandbox.opensemanticframework.org"
                               :api-key "EDC33DA4D977CFDF7B90545565E07324"
                               :app-id "administer"})

(osf/defuser osf-test-user {:uri "http://sandbox.opensemanticframework.org/wsf/users/admin"})

Open Semantic Framework Endpoint Documentation

dataset

(dataset uri)

Specifies the dataset URI where the record is indexed.

The usage of this function is Required

Parameters
  • [uri] The dataset URI where the record is indexed. This is the URI of the dataset, and not the URI of the revisions dataset.
Usage
(revision/diff
  (revision/dataset "http://sandbox.opensemanticframework.org/datasets/test/"))

diff

(diff & body)

Revision: Diff query.

Required

Usage
;; Compare two revisions and return the differences between the two
(revision-diff/diff
  (revision-diff/dataset "http://sandbox.opensemanticframework.org/datasets/test/")
  (revision-diff/left-revision "http://sandbox.opensemanticframework.org/datasets/test/revisions/1417180339.0395")
  (revision-diff/right-revision "http://sandbox.opensemanticframework.org/datasets/test/revisions/1417186032.4905"))

left-revision

(left-revision uri)

Specifies the first revision URI to compare.

The usage of this function is Required

Parameters
  • [uri] First revision URI to compare.
Usage
(revision/diff
  (revision/left-revision "http://sandbox.opensemanticframework.org/datasets/test/revisions/1417180339.0395"))

right-revision

(right-revision uri)

Specifies the second revision URI to compare.

The usage of this function is Required

Parameters
  • [uri] Second revision URI to compare.
Usage
(revision/diff
  (revision/left-revision "http://sandbox.opensemanticframework.org/datasets/test/revisions/14171485932.0395"))