... | ... | @@ -32,5 +32,41 @@ There are two major scripts for the B2SHARE connection component b2shareclient.p |
|
|
* `iRODS` - connection information of the iRODS instance: the name of the iRODS zone like **zone_name=cinecaDMPZone** and the endpoint consisting of the host_name:port information like **zone_ep=dmp1.novalocal:1247** and the information about the iRODS **resources** to be used as well as the logical home directory in iRODS like **irods_home_dir=/cinecaDMPZone/home**.
|
|
|
|
|
|
# Example Workflow
|
|
|
Following workflow was considered during the component development:
|
|
|
|
|
|
1. The user is registered at B2SHARE and has an B2SHARE access token. The user provides the b2share token to the B2SAFE administrator, who adds it to the user metadata: `imeta add -u \<irods_user_name\> access_token \<token_value\>`
|
|
|
2. The user adds a specific metadata attribute to the collection, which will be used to create a draft:
|
|
|
`imeta add -C \<collection_X\> EUDAT_B2SHARE_DRAFT EUDAT` (the last value is the community name)
|
|
|
3. The B2SAFE administrator executes a rule to scan the repository for drafts:
|
|
|
`irule "EUDATScanForB2shareDrafts(*user)" "*user=rods" ruleExecOut`
|
|
|
- The user in this case is the iRODS administrator user. The result of this action is the creation of a draft in B2SHARE and of a new metadata attribute in B2SAFE containing the record ID: `imeta ls -C \<collection_X\>`
|
|
|
```
|
|
|
AVUs defined for collection collection_X:
|
|
|
attribute: EUDAT_B2SHARE_RECORD_ID
|
|
|
value: f77de1f5ff5c434d97a54c116737e7d7
|
|
|
units:
|
|
|
\----
|
|
|
attribute: EUDAT_B2SHARE_DRAFT
|
|
|
value: EUDAT
|
|
|
units:
|
|
|
```
|
|
|
4. The user can modify the draft via B2SHARE or the drafted collection in B2SAFE. Once she is ready, she can add a specific metadata attribute to the collection:
|
|
|
`imeta add -C \<collection_X\> EUDAT_B2SHARE_PUBLISHME null`
|
|
|
|
|
|
5. The B2SAFE administrator executes a rule to scan the repository for publications:
|
|
|
`irule "EUDATScanForPublishingOnB2share(*publishingPath, *user)"
|
|
|
"*publishingPath=/cinecaDMPZone1/publishing%*user=rods" ruleExecOut`
|
|
|
The publishing path is the restricted iRODS collection where are copied the data to be published, the user in this case is the B2SAFE administrator.
|
|
|
The result of this action is:
|
|
|
* the copy of the collection to the publishing path
|
|
|
* the creation of PIDs
|
|
|
* the update of the draft with the new PIDs
|
|
|
* the publication in B2SHARE
|
|
|
|
|
|
Following assumptions was made:
|
|
|
* the collection hast flat structure. Sub collections will be ignored and needed to be published individually.
|
|
|
* there is just one owner for each collection.
|
|
|
* the drafts are registered in B2SHARE just one time, even if the rule to scan for draft is executed multiple times.
|
|
|
* the collections are copied and published just one time, even if the rule to publish them is executed multiple times.
|
|
|
|
|
|
# Available functions of the python scripts |