Skip to content

Commit

Permalink
master-data script to add new xml property to openBIS
Browse files Browse the repository at this point in the history
  • Loading branch information
wow-such-code committed Nov 15, 2018
1 parent 4c4ef7b commit ebcebd2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions master-data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.DataType as DataType

print ("Importing Master Data...")

tr = service.transaction()


prop_type_Q_EXPERIMENTAL_SETUP = tr.getOrCreateNewPropertyType('Q_EXPERIMENTAL_SETUP', DataType.XML)
prop_type_Q_EXPERIMENTAL_SETUP.setLabel('Experimental design and properties')
prop_type_Q_EXPERIMENTAL_SETUP.setManagedInternally(False)
prop_type_Q_EXPERIMENTAL_SETUP.setInternalNamespace(False)

assignment_EXPERIMENT_Q_PROJECT_DETAILS_Q_EXPERIMENTAL_SETUP = tr.assignPropertyType(exp_type_Q_PROJECT_DETAILS, prop_type_Q_EXPERIMENTAL_SETUP)
assignment_EXPERIMENT_Q_PROJECT_DETAILS_Q_EXPERIMENTAL_SETUP.setMandatory(False)
assignment_EXPERIMENT_Q_PROJECT_DETAILS_Q_EXPERIMENTAL_SETUP.setSection(None)
assignment_EXPERIMENT_Q_PROJECT_DETAILS_Q_EXPERIMENTAL_SETUP.setPositionInForms(3)
assignment_EXPERIMENT_Q_PROJECT_DETAILS_Q_EXPERIMENTAL_SETUP.setShownEdit(True)

print ("Import of Master Data finished.")

0 comments on commit ebcebd2

Please sign in to comment.