Class MasterDataRegistrationTransaction
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl.MasterDataRegistrationTransaction
-
- All Implemented Interfaces:
IMasterDataRegistrationTransaction
public class MasterDataRegistrationTransaction extends java.lang.Object implements IMasterDataRegistrationTransaction
-
-
Constructor Summary
Constructors Constructor Description MasterDataRegistrationTransaction(EncapsulatedCommonServer commonServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPropertyAssignmentassignPropertyType(IEntityType entityType, IPropertyTypeImmutable propertyType)Assigns a property type to an entity type.voidcommit()IDataSetTypecreateNewDataSetType(java.lang.String code)Create a new data set type to register with the openBIS AS.IExperimentTypecreateNewExperimentType(java.lang.String code)Create a new experiment type to register with the openBIS AS.IExternalDataManagementSystemcreateNewExternalDataManagementSystem(java.lang.String code)Create a new external data management system to register with the openBIS AS.IFileFormatTypecreateNewFileFormatType(java.lang.String code)Create a new file format type to register with the openBIS AS.IMaterialTypecreateNewMaterialType(java.lang.String code)Create a new material type to register with the openBIS AS.IPropertyTypecreateNewPropertyType(java.lang.String code, DataType dataType)Create a new property type to register with the openBIS AS.ISampleTypecreateNewSampleType(java.lang.String code)Create a new sample type to register with the openBIS AS.IVocabularycreateNewVocabulary(java.lang.String code)Create a new sample type to register with the openBIS AS.IVocabularyTermcreateNewVocabularyTerm(java.lang.String code)Create a new vocabulary term.IDataSetTypeImmutablegetDataSetType(java.lang.String code)Get a data set type from the openBIS AS.IExperimentTypeImmutablegetExperimentType(java.lang.String code)Get an experiment type from the openBIS AS.IExternalDataManagementSystemImmutablegetExternalDataManagementSystem(java.lang.String code)Get an external data management system from the openBIS AS.IFileFormatTypeImmutablegetFileFormatType(java.lang.String code)Get a file format type from the openBIS AS.IMaterialTypeImmutablegetMaterialType(java.lang.String code)Get a material type from the openBIS AS.IDataSetTypegetOrCreateNewDataSetType(java.lang.String code)Gets or creates data set type from the openBIS AS.IExperimentTypegetOrCreateNewExperimentType(java.lang.String code)Gets or creates experiment type from the openBIS AS.IExternalDataManagementSystemgetOrCreateNewExternalDataManagementSystem(java.lang.String code)Gets or creates external data management system from the openBIS AS.IFileFormatTypegetOrCreateNewFileFormatType(java.lang.String code)Gets or creates file format type from the openBIS AS.IMaterialTypegetOrCreateNewMaterialType(java.lang.String code)Gets or creates material type from the openBIS AS.IPropertyTypegetOrCreateNewPropertyType(java.lang.String code, DataType dataType)Gets or creates property type from the openBIS AS.ISampleTypegetOrCreateNewSampleType(java.lang.String code)Gets or creates sample type from the openBIS AS.IScriptgetOrCreateNewScript(java.lang.String code)Gets or creates a script from the openBIS AS.IVocabularygetOrCreateNewVocabulary(java.lang.String code)Gets or creates vocabulary type from the openBIS AS.IPropertyTypeImmutablegetPropertyType(java.lang.String code)Get a property type from the openBIS AS.ISampleTypeImmutablegetSampleType(java.lang.String code)Get a sample type from the openBIS AS.IScriptImmutablegetScript(java.lang.String code)Get a script from the openBIS AS.MasterDataTransactionErrorsgetTransactionErrors()IVocabularyImmutablegetVocabulary(java.lang.String code)Get a vocabulary from the openBIS AS.IVocabularyTermgetVocabularyTerm(IVocabularyImmutable vocabulary, java.lang.String vocabularyTermCode)Returns the vocabulary term with specified code from the specified vocabulary.booleanhasErrors()java.util.List<IDataSetTypeImmutable>listDataSetTypes()Return all data set types existing in the openBIS AS.java.util.List<IExperimentTypeImmutable>listExperimentTypes()Return all experiment types existing in the openBIS AS.java.util.List<IExternalDataManagementSystemImmutable>listExternalDataManagementSystems()Return all external data management systems existing in the openBIS AS.java.util.List<IFileFormatTypeImmutable>listFileFormatTypes()Return all file format types existing in the openBIS AS.java.util.List<IMaterialTypeImmutable>listMaterialTypes()Return all material types existing in the openBIS AS.java.util.List<IPropertyAssignmentImmutable>listPropertyAssignments()Return a list of all existing property assignments.java.util.List<IPropertyTypeImmutable>listPropertyTypes()Return all property types existing in the openBIS AS.java.util.List<ISampleTypeImmutable>listSampleTypes()Return all sample types existing in the openBIS AS.java.util.List<IScriptImmutable>listScripts()Return all scripts existing in the openBIS AS.java.util.List<IVocabularyImmutable>listVocabularies()Return all vocabularies existing in the openBIS AS.voidupdateVocabularyTerm(IVocabularyTerm term)Updates the specified vocabulary term.
-
-
-
Constructor Detail
-
MasterDataRegistrationTransaction
public MasterDataRegistrationTransaction(EncapsulatedCommonServer commonServer)
-
-
Method Detail
-
getTransactionErrors
public MasterDataTransactionErrors getTransactionErrors()
-
hasErrors
public boolean hasErrors()
-
createNewExperimentType
public IExperimentType createNewExperimentType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new experiment type to register with the openBIS AS.- Specified by:
createNewExperimentTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the experiment type's code.
-
getExperimentType
public IExperimentTypeImmutable getExperimentType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet an experiment type from the openBIS AS. Returns null if the experiment type does not exist.- Specified by:
getExperimentTypein interfaceIMasterDataRegistrationTransaction- Returns:
- An experiment type or null
-
getOrCreateNewExperimentType
public IExperimentType getOrCreateNewExperimentType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates experiment type from the openBIS AS.- Specified by:
getOrCreateNewExperimentTypein interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listExperimentTypes
public java.util.List<IExperimentTypeImmutable> listExperimentTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all experiment types existing in the openBIS AS.- Specified by:
listExperimentTypesin interfaceIMasterDataRegistrationTransaction
-
createNewSampleType
public ISampleType createNewSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new sample type to register with the openBIS AS.- Specified by:
createNewSampleTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the sample type's code.
-
getSampleType
public ISampleTypeImmutable getSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a sample type from the openBIS AS. Returns null if the sample type does not exist.- Specified by:
getSampleTypein interfaceIMasterDataRegistrationTransaction- Returns:
- A sample type or null
-
getOrCreateNewSampleType
public ISampleType getOrCreateNewSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates sample type from the openBIS AS.- Specified by:
getOrCreateNewSampleTypein interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listSampleTypes
public java.util.List<ISampleTypeImmutable> listSampleTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all sample types existing in the openBIS AS.- Specified by:
listSampleTypesin interfaceIMasterDataRegistrationTransaction
-
createNewDataSetType
public IDataSetType createNewDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new data set type to register with the openBIS AS.- Specified by:
createNewDataSetTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the data set type's code.
-
getDataSetType
public IDataSetTypeImmutable getDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a data set type from the openBIS AS. Returns null if the data set type does not exist.- Specified by:
getDataSetTypein interfaceIMasterDataRegistrationTransaction- Returns:
- A data set type or null
-
getOrCreateNewDataSetType
public IDataSetType getOrCreateNewDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates data set type from the openBIS AS.- Specified by:
getOrCreateNewDataSetTypein interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listDataSetTypes
public java.util.List<IDataSetTypeImmutable> listDataSetTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all data set types existing in the openBIS AS.- Specified by:
listDataSetTypesin interfaceIMasterDataRegistrationTransaction
-
getScript
public IScriptImmutable getScript(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a script from the openBIS AS. Returns null if the script does not exist.- Specified by:
getScriptin interfaceIMasterDataRegistrationTransaction- Returns:
- A script or null
-
getOrCreateNewScript
public IScript getOrCreateNewScript(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates a script from the openBIS AS.- Specified by:
getOrCreateNewScriptin interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing script or a freshly created one if it doesn't exist. Setter methods on the returned script are ignored if the script already exists.
-
listScripts
public java.util.List<IScriptImmutable> listScripts()
Description copied from interface:IMasterDataRegistrationTransactionReturn all scripts existing in the openBIS AS.- Specified by:
listScriptsin interfaceIMasterDataRegistrationTransaction
-
createNewMaterialType
public IMaterialType createNewMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new material type to register with the openBIS AS.- Specified by:
createNewMaterialTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the material type's code.
-
getMaterialType
public IMaterialTypeImmutable getMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a material type from the openBIS AS. Returns null if the material type does not exist.- Specified by:
getMaterialTypein interfaceIMasterDataRegistrationTransaction- Returns:
- A material type or null
-
getOrCreateNewMaterialType
public IMaterialType getOrCreateNewMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates material type from the openBIS AS.- Specified by:
getOrCreateNewMaterialTypein interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listMaterialTypes
public java.util.List<IMaterialTypeImmutable> listMaterialTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all material types existing in the openBIS AS.- Specified by:
listMaterialTypesin interfaceIMasterDataRegistrationTransaction
-
createNewFileFormatType
public IFileFormatType createNewFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new file format type to register with the openBIS AS.- Specified by:
createNewFileFormatTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the file format type's code.
-
getFileFormatType
public IFileFormatTypeImmutable getFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a file format type from the openBIS AS. Returns null if the file format type does not exist.- Specified by:
getFileFormatTypein interfaceIMasterDataRegistrationTransaction- Returns:
- A file format type or null
-
getOrCreateNewFileFormatType
public IFileFormatType getOrCreateNewFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates file format type from the openBIS AS.- Specified by:
getOrCreateNewFileFormatTypein interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listFileFormatTypes
public java.util.List<IFileFormatTypeImmutable> listFileFormatTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all file format types existing in the openBIS AS.- Specified by:
listFileFormatTypesin interfaceIMasterDataRegistrationTransaction
-
createNewPropertyType
public IPropertyType createNewPropertyType(java.lang.String code, DataType dataType)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new property type to register with the openBIS AS.- Specified by:
createNewPropertyTypein interfaceIMasterDataRegistrationTransaction- Parameters:
code- the property type's code.dataType- the data type of the property
-
getPropertyType
public IPropertyTypeImmutable getPropertyType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a property type from the openBIS AS. Returns null if the property type does not exist.- Specified by:
getPropertyTypein interfaceIMasterDataRegistrationTransaction- Returns:
- A property type or null
-
getOrCreateNewPropertyType
public IPropertyType getOrCreateNewPropertyType(java.lang.String code, DataType dataType)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates property type from the openBIS AS.- Specified by:
getOrCreateNewPropertyTypein interfaceIMasterDataRegistrationTransactiondataType- the data type of the property in case it has to be created.- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listPropertyTypes
public java.util.List<IPropertyTypeImmutable> listPropertyTypes()
Description copied from interface:IMasterDataRegistrationTransactionReturn all property types existing in the openBIS AS.- Specified by:
listPropertyTypesin interfaceIMasterDataRegistrationTransaction
-
assignPropertyType
public IPropertyAssignment assignPropertyType(IEntityType entityType, IPropertyTypeImmutable propertyType)
Description copied from interface:IMasterDataRegistrationTransactionAssigns a property type to an entity type. If the assignment is already established an object is returned where all setter method invocations are silently be ignored.- Specified by:
assignPropertyTypein interfaceIMasterDataRegistrationTransaction- Parameters:
entityType- One of IExperimentTypeImmutable, ISampleTypeImmutable, IDataSetTypeImmutable, or IMaterialTypeImmutable.propertyType- The property type to assign to the entity type.- Returns:
- An object representing the assignment.
-
listPropertyAssignments
public java.util.List<IPropertyAssignmentImmutable> listPropertyAssignments()
Description copied from interface:IMasterDataRegistrationTransactionReturn a list of all existing property assignments.- Specified by:
listPropertyAssignmentsin interfaceIMasterDataRegistrationTransaction
-
createNewVocabularyTerm
public IVocabularyTerm createNewVocabularyTerm(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new vocabulary term. The resulting object can be added to a vocabulary via theIVocabulary.addTerm(IVocabularyTerm)method.- Specified by:
createNewVocabularyTermin interfaceIMasterDataRegistrationTransaction- Parameters:
code- the vocabulary term's code
-
createNewVocabulary
public IVocabulary createNewVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new sample type to register with the openBIS AS.- Specified by:
createNewVocabularyin interfaceIMasterDataRegistrationTransaction- Parameters:
code- the sample type's code.
-
getVocabularyTerm
public IVocabularyTerm getVocabularyTerm(IVocabularyImmutable vocabulary, java.lang.String vocabularyTermCode)
Description copied from interface:IMasterDataRegistrationTransactionReturns the vocabulary term with specified code from the specified vocabulary.- Specified by:
getVocabularyTermin interfaceIMasterDataRegistrationTransaction
-
updateVocabularyTerm
public void updateVocabularyTerm(IVocabularyTerm term)
Description copied from interface:IMasterDataRegistrationTransactionUpdates the specified vocabulary term.- Specified by:
updateVocabularyTermin interfaceIMasterDataRegistrationTransaction
-
getVocabulary
public IVocabularyImmutable getVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet a vocabulary from the openBIS AS. Returns null if the vocabulary does not exist.- Specified by:
getVocabularyin interfaceIMasterDataRegistrationTransaction- Returns:
- A vocabulary or null
-
getOrCreateNewVocabulary
public IVocabulary getOrCreateNewVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates vocabulary type from the openBIS AS.- Specified by:
getOrCreateNewVocabularyin interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing type or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listVocabularies
public java.util.List<IVocabularyImmutable> listVocabularies()
Description copied from interface:IMasterDataRegistrationTransactionReturn all vocabularies existing in the openBIS AS.- Specified by:
listVocabulariesin interfaceIMasterDataRegistrationTransaction
-
createNewExternalDataManagementSystem
public IExternalDataManagementSystem createNewExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionCreate a new external data management system to register with the openBIS AS.- Specified by:
createNewExternalDataManagementSystemin interfaceIMasterDataRegistrationTransaction- Parameters:
code- the external data management system's code.
-
getExternalDataManagementSystem
public IExternalDataManagementSystemImmutable getExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGet an external data management system from the openBIS AS. Returns null if the external data management system does not exist.- Specified by:
getExternalDataManagementSystemin interfaceIMasterDataRegistrationTransaction- Returns:
- An external data management system or null
-
getOrCreateNewExternalDataManagementSystem
public IExternalDataManagementSystem getOrCreateNewExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransactionGets or creates external data management system from the openBIS AS.- Specified by:
getOrCreateNewExternalDataManagementSystemin interfaceIMasterDataRegistrationTransaction- Returns:
- the already existing system or a freshly created one if it doesn't exist. Setter methods on the returned type are ignored if the type already exists.
-
listExternalDataManagementSystems
public java.util.List<IExternalDataManagementSystemImmutable> listExternalDataManagementSystems()
Description copied from interface:IMasterDataRegistrationTransactionReturn all external data management systems existing in the openBIS AS.- Specified by:
listExternalDataManagementSystemsin interfaceIMasterDataRegistrationTransaction
-
commit
public void commit()
-
-