What is Admin Console?
openBIS Admin Console is a command line tool which allows to add metadata to openBIS using a simple scripting language.
It is particulary useful when one has to perform property types assignments many times, Admin Console
allows to do that much faster compared to the web browser interface.
It can:
- create sample/experiment/dataset/material types
- create property types and assign them to sample/experiment/dataset/material types
How to run Admin Console
- extract openbis-admin-console.jar from the from the openBIS Application Server installation package. You can find it in:
openBIS-server-*.zip / openBIS-server / openbis-admin-console.zip / openbis-admin-console / openbis-admin-console.jar
- create a file with commands. See the
Syntax
andExample
chapter to learn how to write them. Launch theAdmin Console
specifying the file as a parameter:where:java -jar openbis-admin-console.jar <OPENBIS-URL>/openbis/openbis commands.txt <USER> [<PASSWORD>]
- <OPENBIS-URL> is openBIS server URL
- <USER> is the openBIS user login
- if <PASSWORD> is not specified the console will ask for it
Syntax
- to define a variable
X
and assign it the valueV
:set X = V
- write
${X
} to referenceX
variable from other places. - comment lines should be started with
--
- to register sample/experiment/dataset/material type:
where:
register-type <ENTITY-KIND> <ENTITY-TYPE>
- <ENTITY-KIND> - one of SAMPLE, EXPERIMENT, DATA_SET or MATERIAL
- <ENTITY-TYPE> - sample/experiment/dataset/material type code
- when registerting a sample type one can additionally specify following sample type attributes:
listable=<false/true> show-container=<false/true> show-parents=<false/true>
- to create a property with code <PROPERTY-CODE>, label <PROPERTY-LABEL> and type <DATA-TYPE> type:
Possible values of <DATA-TYPE> are:
register-property-type <PROPERTY-CODE> with data type <DATA-TYPE> "label=<PROPERTY-LABEL>" "description=<PROPERTY-DESCRPTION>"
INTEGER, VARCHAR, MULTILINE_VARCHAR, REAL, TIMESTAMP, BOOLEAN, CONTROLLEDVOCABULARY(<VOCABULARY_CODE>), MATERIAL, MATERIAL(<MATERIAL_TYPE_CODE>), HYPERLINK, XML
- to assign property type to the sample/experiment/dataset/material type:
where:
assign-to <ENTITY-KIND>:<ENTITY-TYPE> <PROPERTY-CODE> [mandatory]
- <ENTITY-KIND> - one of SAMPLE, EXPERIMENT, DATA_SET or MATERIAL
- <ENTITY-TYPE> - sample/experiment/dataset/material type code
Examples
To execute commands from commands.txt
file on the infectx.biozentrum.unibas.ch
server type:
java -jar openbis-admin-console.jar https://infectx.biozentrum.unibas.ch/openbis/openbis commands.txt admin@unibas.ch
where commands.txt
file contains e.q.:
-- Experiment set type = OBSERVER_EMAILS register-property-type ${type} with data type VARCHAR "label=Observer e-mails" assign-to EXPERIMENT:COMPOUND_HCS ${type} set type = LIBRARY_TEMPLATE register-property-type ${type} with data type MULTILINE_VARCHAR "label=Library Template" assign-to EXPERIMENT:COMPOUND_HCS ${type} -- Sample register-type SAMPLE POSITIVE_CONTROL listable=false show-container=true show-parents=false register-type SAMPLE NEGATIVE_CONTROL listable=false show-container=true show-parents=false register-type SAMPLE COMPOUND_WELL listable=false show-container=true show-parents=false set type = CONCENTRATION_M register-property-type ${type} with data type REAL "label=Concentration (M)" assign-to SAMPLE:COMPOUND_WELL ${type} set type = COMPOUND register-property-type ${type} with data type MATERIAL(COMPOUND) "label=Compound" assign-to SAMPLE:COMPOUND_WELL ${type} -- Materials set type = COMPOUND_ID register-property-type ${type} with data type VARCHAR assign-to MATERIAL:COMPOUND ${type} set type = COMPOUND_BATCH_ID register-property-type ${type} with data type VARCHAR "label=Compound Batch" assign-to MATERIAL:COMPOUND ${type} -- Data Sets set type = ACQUISITION_BATCH register-property-type ${type} with data type VARCHAR "label=Acquisition Batch" assign-to DATA_SET:HCS_IMAGE_RAW ${type}