Link Data Sets

Introduction

Link Data Set is a special kind of data set. The data related with this kind of data set is not stored in the local openBIS instance itself, but in an external data managements system. This system can be either another openBIS instance, or a completely different management system. The only requirement of a data management system is that it must have a concept of a uniquely identifiable datasets and is able to display datasets in the web browser using a URL containing the unique id. The local openBIS instance stores this link to the data set in the external data management system, optionally along with additional properties. Except for the fact that no data are stored for the dataset, openBIS treats this kind of data set in the same way as regular data sets.

 

Link Data Set Type

Before registering a Link Data Set, a data set type of kind Link must be defined. This can be done in two different ways: via the openBIS web UI, or via master data registration script.

Registering Link Data Set Type via web UI

To register Link Data Set Type via the web UI, the user should go to Admin -> Types -> Data Set Types.

The Data Set Types browser will be opened. The user should click on Add button in the bottom right corner of the screen.

Add a new Data Set Type dialog window will be opened. The user can define all the properties of a Data Set Type. To make the type a Link Data Set Type, the user needs to select LINK in Data Set Kind selection widget. After clicking Save, the new Data Set Type will be created.

Registering Link Data Set Type via master data registration script

To register a new Link Data Set Type via master data registration script, the user should set DataSetKind property to LINK. Here is an example registration script that registers one Link Data Set Type:

tr = service.transaction()
 
data_set_type_LINK = tr.getOrCreateNewDataSetType('LINK_TYPE')
data_set_type_LINK.setDescription('Example Link Data Set Type')
data_set_type_LINK.setDataSetKind('LINK')
data_set_type_LINK.setDeletionDisallowed(False)

External Data Management System

At least one External Data Management System must be created in openBIS before it will be possible to register Link Data Sets. External Data Management System in openBIS represents a system, that is completely independent of openBIS, and that stores data sets that are referred by openBIS.

External Data Management System's properties

PropertyDescription
codeThe unique identifier of the External Data Management System in local openBIS instance.
labelThe descriptive label of the External Data Management System.
url_templateThe template of the URL referring the data set in the External Data Management System. The ${code} pattern in the template will be replaced by data set code in the External Data Management System.
is_openBISThe flag specifying if the External Data Management System is an another openBIS instance. If true the URL template has to be a template for an URL of a data set details view like https://sprint-openbis.ethz.ch/openbis/index.html?viewMode=SIMPLE#entity=DATA_SET&permId=${code}.

Registering External Data Management System

Currently there is only one way to register an External Data Management System: it can be done via master data registration script. Here is an example registering one External Data Management System:

tr = service.transaction()

external_data_management_system = tr.getOrCreateNewExternalDataManagementSystem('DMS')
external_data_management_system.setLabel('Example of External Data Management System')
external_data_management_system.setUrlTemplate('http://www.openbis.ch/openbis/?viewMode=normal#entity=DATA_SET&permId=${code}')
external_data_management_system.setOpenBIS(True)

Registering a Link Data Set

Currently Link Data Set can be registered only via Jython Dropbox. To register a Link Data Set, the script should create a data set of type that is defined as LINK kind, the code of the data set in external system should be set, together with referenced external data management system. Here is an example Jython Dropbox code that registers a link data set:

def process (transaction):
    expid = "/EXAMPLE_SPACE/EXAMPLE_PROJECT/EXAMPLE_EXPERIMENT"
    exp = transaction.getExperiment(expid)
    
    # Create a data set
    dataSet = transaction.createNewDataSet()
    dataSet.setDataSetType("LINK_TYPE")
    dataSet.setExperiment(exp)
    dataSet.setExternalCode("EX_CODE")
    dataSet.setExternalDataManagementSystem(transaction.getExternalDataManagementSystem("DMS"))

Link Data Set in openBIS

openBIS handles Link Data Sets like regular datasets: they have same metadata, they can have parent/children relationships, it is possible to attach this kind of data set to sample or experiment. The big difference is when user opens a Data Set Detail View – he/she won't see a regular Data View, but a rendered link, that will point to the data set in external data management system: