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 IPropertyAssignment
assignPropertyType(IEntityType entityType, IPropertyTypeImmutable propertyType)
Assigns a property type to an entity type.void
commit()
IDataSetType
createNewDataSetType(java.lang.String code)
Create a new data set type to register with the openBIS AS.IExperimentType
createNewExperimentType(java.lang.String code)
Create a new experiment type to register with the openBIS AS.IExternalDataManagementSystem
createNewExternalDataManagementSystem(java.lang.String code)
Create a new external data management system to register with the openBIS AS.IFileFormatType
createNewFileFormatType(java.lang.String code)
Create a new file format type to register with the openBIS AS.IMaterialType
createNewMaterialType(java.lang.String code)
Create a new material type to register with the openBIS AS.IPropertyType
createNewPropertyType(java.lang.String code, DataType dataType)
Create a new property type to register with the openBIS AS.ISampleType
createNewSampleType(java.lang.String code)
Create a new sample type to register with the openBIS AS.IVocabulary
createNewVocabulary(java.lang.String code)
Create a new sample type to register with the openBIS AS.IVocabularyTerm
createNewVocabularyTerm(java.lang.String code)
Create a new vocabulary term.IDataSetTypeImmutable
getDataSetType(java.lang.String code)
Get a data set type from the openBIS AS.IExperimentTypeImmutable
getExperimentType(java.lang.String code)
Get an experiment type from the openBIS AS.IExternalDataManagementSystemImmutable
getExternalDataManagementSystem(java.lang.String code)
Get an external data management system from the openBIS AS.IFileFormatTypeImmutable
getFileFormatType(java.lang.String code)
Get a file format type from the openBIS AS.IMaterialTypeImmutable
getMaterialType(java.lang.String code)
Get a material type from the openBIS AS.IDataSetType
getOrCreateNewDataSetType(java.lang.String code)
Gets or creates data set type from the openBIS AS.IExperimentType
getOrCreateNewExperimentType(java.lang.String code)
Gets or creates experiment type from the openBIS AS.IExternalDataManagementSystem
getOrCreateNewExternalDataManagementSystem(java.lang.String code)
Gets or creates external data management system from the openBIS AS.IFileFormatType
getOrCreateNewFileFormatType(java.lang.String code)
Gets or creates file format type from the openBIS AS.IMaterialType
getOrCreateNewMaterialType(java.lang.String code)
Gets or creates material type from the openBIS AS.IPropertyType
getOrCreateNewPropertyType(java.lang.String code, DataType dataType)
Gets or creates property type from the openBIS AS.ISampleType
getOrCreateNewSampleType(java.lang.String code)
Gets or creates sample type from the openBIS AS.IScript
getOrCreateNewScript(java.lang.String code)
Gets or creates a script from the openBIS AS.IVocabulary
getOrCreateNewVocabulary(java.lang.String code)
Gets or creates vocabulary type from the openBIS AS.IPropertyTypeImmutable
getPropertyType(java.lang.String code)
Get a property type from the openBIS AS.ISampleTypeImmutable
getSampleType(java.lang.String code)
Get a sample type from the openBIS AS.IScriptImmutable
getScript(java.lang.String code)
Get a script from the openBIS AS.MasterDataTransactionErrors
getTransactionErrors()
IVocabularyImmutable
getVocabulary(java.lang.String code)
Get a vocabulary from the openBIS AS.IVocabularyTerm
getVocabularyTerm(IVocabularyImmutable vocabulary, java.lang.String vocabularyTermCode)
Returns the vocabulary term with specified code from the specified vocabulary.boolean
hasErrors()
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.void
updateVocabularyTerm(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:IMasterDataRegistrationTransaction
Create a new experiment type to register with the openBIS AS.- Specified by:
createNewExperimentType
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the experiment type's code.
-
getExperimentType
public IExperimentTypeImmutable getExperimentType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get an experiment type from the openBIS AS. Returns null if the experiment type does not exist.- Specified by:
getExperimentType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- An experiment type or null
-
getOrCreateNewExperimentType
public IExperimentType getOrCreateNewExperimentType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates experiment type from the openBIS AS.- Specified by:
getOrCreateNewExperimentType
in 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:IMasterDataRegistrationTransaction
Return all experiment types existing in the openBIS AS.- Specified by:
listExperimentTypes
in interfaceIMasterDataRegistrationTransaction
-
createNewSampleType
public ISampleType createNewSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new sample type to register with the openBIS AS.- Specified by:
createNewSampleType
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the sample type's code.
-
getSampleType
public ISampleTypeImmutable getSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a sample type from the openBIS AS. Returns null if the sample type does not exist.- Specified by:
getSampleType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A sample type or null
-
getOrCreateNewSampleType
public ISampleType getOrCreateNewSampleType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates sample type from the openBIS AS.- Specified by:
getOrCreateNewSampleType
in 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:IMasterDataRegistrationTransaction
Return all sample types existing in the openBIS AS.- Specified by:
listSampleTypes
in interfaceIMasterDataRegistrationTransaction
-
createNewDataSetType
public IDataSetType createNewDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new data set type to register with the openBIS AS.- Specified by:
createNewDataSetType
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the data set type's code.
-
getDataSetType
public IDataSetTypeImmutable getDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a data set type from the openBIS AS. Returns null if the data set type does not exist.- Specified by:
getDataSetType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A data set type or null
-
getOrCreateNewDataSetType
public IDataSetType getOrCreateNewDataSetType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates data set type from the openBIS AS.- Specified by:
getOrCreateNewDataSetType
in 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:IMasterDataRegistrationTransaction
Return all data set types existing in the openBIS AS.- Specified by:
listDataSetTypes
in interfaceIMasterDataRegistrationTransaction
-
getScript
public IScriptImmutable getScript(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a script from the openBIS AS. Returns null if the script does not exist.- Specified by:
getScript
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A script or null
-
getOrCreateNewScript
public IScript getOrCreateNewScript(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates a script from the openBIS AS.- Specified by:
getOrCreateNewScript
in 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:IMasterDataRegistrationTransaction
Return all scripts existing in the openBIS AS.- Specified by:
listScripts
in interfaceIMasterDataRegistrationTransaction
-
createNewMaterialType
public IMaterialType createNewMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new material type to register with the openBIS AS.- Specified by:
createNewMaterialType
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the material type's code.
-
getMaterialType
public IMaterialTypeImmutable getMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a material type from the openBIS AS. Returns null if the material type does not exist.- Specified by:
getMaterialType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A material type or null
-
getOrCreateNewMaterialType
public IMaterialType getOrCreateNewMaterialType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates material type from the openBIS AS.- Specified by:
getOrCreateNewMaterialType
in 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:IMasterDataRegistrationTransaction
Return all material types existing in the openBIS AS.- Specified by:
listMaterialTypes
in interfaceIMasterDataRegistrationTransaction
-
createNewFileFormatType
public IFileFormatType createNewFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new file format type to register with the openBIS AS.- Specified by:
createNewFileFormatType
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the file format type's code.
-
getFileFormatType
public IFileFormatTypeImmutable getFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a file format type from the openBIS AS. Returns null if the file format type does not exist.- Specified by:
getFileFormatType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A file format type or null
-
getOrCreateNewFileFormatType
public IFileFormatType getOrCreateNewFileFormatType(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates file format type from the openBIS AS.- Specified by:
getOrCreateNewFileFormatType
in 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:IMasterDataRegistrationTransaction
Return all file format types existing in the openBIS AS.- Specified by:
listFileFormatTypes
in interfaceIMasterDataRegistrationTransaction
-
createNewPropertyType
public IPropertyType createNewPropertyType(java.lang.String code, DataType dataType)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new property type to register with the openBIS AS.- Specified by:
createNewPropertyType
in 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:IMasterDataRegistrationTransaction
Get a property type from the openBIS AS. Returns null if the property type does not exist.- Specified by:
getPropertyType
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A property type or null
-
getOrCreateNewPropertyType
public IPropertyType getOrCreateNewPropertyType(java.lang.String code, DataType dataType)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates property type from the openBIS AS.- Specified by:
getOrCreateNewPropertyType
in interfaceIMasterDataRegistrationTransaction
dataType
- 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:IMasterDataRegistrationTransaction
Return all property types existing in the openBIS AS.- Specified by:
listPropertyTypes
in interfaceIMasterDataRegistrationTransaction
-
assignPropertyType
public IPropertyAssignment assignPropertyType(IEntityType entityType, IPropertyTypeImmutable propertyType)
Description copied from interface:IMasterDataRegistrationTransaction
Assigns 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:
assignPropertyType
in 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:IMasterDataRegistrationTransaction
Return a list of all existing property assignments.- Specified by:
listPropertyAssignments
in interfaceIMasterDataRegistrationTransaction
-
createNewVocabularyTerm
public IVocabularyTerm createNewVocabularyTerm(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new vocabulary term. The resulting object can be added to a vocabulary via theIVocabulary.addTerm(IVocabularyTerm)
method.- Specified by:
createNewVocabularyTerm
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the vocabulary term's code
-
createNewVocabulary
public IVocabulary createNewVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new sample type to register with the openBIS AS.- Specified by:
createNewVocabulary
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the sample type's code.
-
getVocabularyTerm
public IVocabularyTerm getVocabularyTerm(IVocabularyImmutable vocabulary, java.lang.String vocabularyTermCode)
Description copied from interface:IMasterDataRegistrationTransaction
Returns the vocabulary term with specified code from the specified vocabulary.- Specified by:
getVocabularyTerm
in interfaceIMasterDataRegistrationTransaction
-
updateVocabularyTerm
public void updateVocabularyTerm(IVocabularyTerm term)
Description copied from interface:IMasterDataRegistrationTransaction
Updates the specified vocabulary term.- Specified by:
updateVocabularyTerm
in interfaceIMasterDataRegistrationTransaction
-
getVocabulary
public IVocabularyImmutable getVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get a vocabulary from the openBIS AS. Returns null if the vocabulary does not exist.- Specified by:
getVocabulary
in interfaceIMasterDataRegistrationTransaction
- Returns:
- A vocabulary or null
-
getOrCreateNewVocabulary
public IVocabulary getOrCreateNewVocabulary(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates vocabulary type from the openBIS AS.- Specified by:
getOrCreateNewVocabulary
in 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:IMasterDataRegistrationTransaction
Return all vocabularies existing in the openBIS AS.- Specified by:
listVocabularies
in interfaceIMasterDataRegistrationTransaction
-
createNewExternalDataManagementSystem
public IExternalDataManagementSystem createNewExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Create a new external data management system to register with the openBIS AS.- Specified by:
createNewExternalDataManagementSystem
in interfaceIMasterDataRegistrationTransaction
- Parameters:
code
- the external data management system's code.
-
getExternalDataManagementSystem
public IExternalDataManagementSystemImmutable getExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Get an external data management system from the openBIS AS. Returns null if the external data management system does not exist.- Specified by:
getExternalDataManagementSystem
in interfaceIMasterDataRegistrationTransaction
- Returns:
- An external data management system or null
-
getOrCreateNewExternalDataManagementSystem
public IExternalDataManagementSystem getOrCreateNewExternalDataManagementSystem(java.lang.String code)
Description copied from interface:IMasterDataRegistrationTransaction
Gets or creates external data management system from the openBIS AS.- Specified by:
getOrCreateNewExternalDataManagementSystem
in 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:IMasterDataRegistrationTransaction
Return all external data management systems existing in the openBIS AS.- Specified by:
listExternalDataManagementSystems
in interfaceIMasterDataRegistrationTransaction
-
commit
public void commit()
-
-