At DANS we have developed a bridge to transfer datasets from a short-term repository to our long-term archive called Datavault. This bridge implements the SWORD protocol (v2.0). The bridge communicates via API with the short-term repository. Within EOSChub we have developed a B2SHARE module for communication between B2SHARE and the Bridge. The module is developed in a generic way; therefore it can be applied within any B2SHARE community by enabling the archiving function in the B2SHARE settings.
In the sections below more details are provided about:
- Architecture
- Sequence Diagram
- Changes needed in the B2share code and configuration examples
- Archived dataset
- Setting up the B2Share
A new module - called apiarchive - is developed. This endpoint API module handles the communication between B2Share and Bridge.
A new javascript file (archive.jsx) is created to manage archive and archiving progress buttons. This functionality can be enabled/disabled through settings.
Here are view examples.
The following figure shows the archive button enable. In this example the archive button is enable for "DANS" community.
# Enable archive button. Comma sparated communities list.
communities_enable_archive='DANS'
When the archive button is pressed, the archive process is started and the status will be shown in the button. Pressing the Archive in progress button will refresh the process status.
The archive.jsx also manage warning and DANS doi display.
When the archiving process is finished. The DANS DOI will be shown as the following figure:
The following figure shows possible error messages when error occurs.
Since an archived dataset at DANS cannot be changed, the Edit Metadata button is hided. However to display/hide the Edit Metadata button is configurable
# Hide edit metadata button. Comma sparated communities list.
communities_hide_editmetadata='DANS'
The following figures show the archived dataset on Datavault.
The original json metadata is added under Metadata export from B2Share folder.
This part describes how to set up and use development environment for B2Share.
It is assumed that you are working in a Mac OS X environment.
- Brew, to install some of the other stuff: see [brew], if you haven't installed it yet.
- Git (
brew install git
). - Vagrant (
brew cask install vagrant
) - VirtualBox: (Download link or
brew cask install virtualbox
.) - The vagrant-vbguest plugin for vagrant: (
vagrant plugin install vagrant-vbguest
). - Ansible (
brew install ansible
orsudo pip install ansible==2.4.0.0
) - DANS-Bridge
Requirement | Version |
---|---|
Git | 2.20.1 |
Vagrant | 2.2.3 |
Ansible | 2.7.5 |
VirtualBox | 5.2.22 |
-
Clone this project:
git clone https://github.com/ekoi/b2share-dtap.git
-
Create a static host name for the local VMs in your
/etc/hosts
file. Make sure the following lines are present:192.168.33.11 devb2share.dans.knaw.nl
The IP address on the left is from your
Vagrantfile
. -
Go to the
b2share-dtap
project directory:cd b2share-dtap
-
Edit the
provisioning/host_vars/devb2share.yml
file#B2Share Configuration b2access_consumer_key=REPLACE_WITH_YOUR_OWN_KEY b2access_secret_key=REPLACE_WITH_YOUR_OWN_SECRET #Bridge Configuration b2share_jsonschemas_host=your-chosen-domain-name:5000 b2share_jsonschemas_port=bridge-url:port/api/v1 bridge_ip_address=REPLACE_WITH_YOUR_BRIDGE_IP_ADDRESS bridge_port=REPLACE_WITH_YOUR_BRIDGE_PORT bridge_apikey=REPLACE_WITH_YOUR_BRIDGE_APIKEY #Digital Archive Repository Configuration bridge_dar_username=REPLACE_WITH_YOUR_DAR_USERNAME bridge_dar_password=REPLACE_WITH_YOUR_DAR_PASSWORD # Hide edit metadata button. Comma sparated communities list. communities_hide_editmetadata='DANS' # Enable archive button. Comma sparated communities list. communities_enable_archive='DANS'
-
Clone, install and follow instructions of DANS Bridge
-
To make a fresh start with the configured
devb2share.yml
:cd b2share-dtap
or wherever it is located on your macvagrant destroy
vagrant up
this may take half an hour