There are two interfaces for reading and changing meta data stored in openBIS:

ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationService : Reading meta data.

ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationChangingService : Changing some meta data


In a Java client application these services are created most easily with a ServiceFinder . Only host name and port of openBIS Application Server are needed. Here is an example for IGeneralInformationService:

ServiceFinder serviceFinder = new ServiceFinder("openbis", IGeneralInformationService.SERVICE_URL);
IGeneralInformationService infoService = 
    serviceFinder.createService(IGeneralInformationService.class, "");

Similar code is needed for IGeneralInformationChangingService.

In order to use IGeneralInformationChangingService you need to login into IGeneralInformationService and using the returned session token. Example:

String sessionToken = infoService.tryToAuthenticateForAllServices("user-id", "user-password");
infoChangingService.createMetaproject(sessionToken, "my-project", null);

The following library is needed: openbis-query-api.jar. It is part of the openBIS Clients and APIs distribution.

  • No labels