Class NewDataSetDTO
- java.lang.Object
-
- ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO
-
- All Implemented Interfaces:
java.io.Serializable
@JsonObject("NewDataSetDTO") public class NewDataSetDTO extends java.lang.Object implements java.io.SerializableRepresents a new data set that the DSS should register.The information required to register a new data set are the owner of the data set, the name of the container of the data set (folder or file name), and file info about the files in the data set.
Optionally, a data set type and properties may be specified. The type and properties will override those inferred by the server.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNewDataSetDTO.DataSetOwnerThe identifier of the owner of the new data set.static classNewDataSetDTO.DataSetOwnerTypeThe different types of owners of data sets; there are two: experiment and sample.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_DATA_SET_FOLDER_NAME
-
Constructor Summary
Constructors Constructor Description NewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.io.File dataSetFile)ConstructorNewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)ConstructorNewDataSetDTO(NewDataSetMetadataDTO dataSetMetadata, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)ConstructorNewDataSetDTO(java.lang.String dataSetType, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUploadObserver(UploadObserver uploadObserver)java.lang.StringgetDataSetFolderName()The name of the folder containing the files in the data set.NewDataSetDTO.DataSetOwnergetDataSetOwner()The direct owner of the data set, either an experiment or a sample.java.util.List<FileInfoDssDTO>getFileInfos()FileInfoDssDTOobjects describing the files within the data set.java.util.List<java.lang.String>getParentDataSetCodes()The codes of the parent data sets for this new data set.java.util.Map<java.lang.String,java.lang.String>getProperties()voidnotifyUploadProgress(long totalBytesRead)voidsetDataSetTypeOrNull(java.lang.String dataSetTypeOrNull)voidsetParentDataSetCodes(java.util.List<java.lang.String> codesOrNull)Sets the parent data sets of this data set.voidsetProperties(java.util.Map<java.lang.String,java.lang.String> props)java.lang.StringtoString()java.lang.StringtryDataSetType()
-
-
-
Constructor Detail
-
NewDataSetDTO
public NewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.io.File dataSetFile)
Constructor- Parameters:
dataSetOwner- the owner of the new data setdataSetFile- a local file or directory whose contents will be uploaded to openBIS.
-
NewDataSetDTO
public NewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)
Constructor- Parameters:
dataSetOwner- The owner of the new data setdataSetFolderNameOrNull- The name of the folder the data is stored in. If the data set is just a single file and the folder name is null, a folder will be created.fileInfos- FileInfoDssDTO objects for each of the files in the data set.
-
NewDataSetDTO
public NewDataSetDTO(java.lang.String dataSetType, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)Constructor- Parameters:
dataSetType- The type of the new data setdataSetOwner- The owner of the new data setdataSetFolderNameOrNull- The name of the folder the data is stored in. If the data set is just a single file and the folder name is null, a folder will be created.fileInfos- FileInfoDssDTO objects for each of the files in the data set.
-
NewDataSetDTO
public NewDataSetDTO(NewDataSetMetadataDTO dataSetMetadata, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)
Constructor- Parameters:
dataSetMetadata- The metadata (type and properties) that will override those inferred by the server.dataSetOwner- The owner of the new data setdataSetFolderNameOrNull- The name of the folder the data is stored in. If the data set is just a single file and the folder name is null, a folder will be created.fileInfos- FileInfoDssDTO objects for each of the files in the data set.
-
-
Method Detail
-
addUploadObserver
public void addUploadObserver(UploadObserver uploadObserver)
-
notifyUploadProgress
public void notifyUploadProgress(long totalBytesRead)
-
getDataSetOwner
public NewDataSetDTO.DataSetOwner getDataSetOwner()
The direct owner of the data set, either an experiment or a sample.
-
getDataSetFolderName
public java.lang.String getDataSetFolderName()
The name of the folder containing the files in the data set.
-
getFileInfos
public java.util.List<FileInfoDssDTO> getFileInfos()
FileInfoDssDTOobjects describing the files within the data set.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
tryDataSetType
public java.lang.String tryDataSetType()
-
setDataSetTypeOrNull
public void setDataSetTypeOrNull(java.lang.String dataSetTypeOrNull)
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
-
getParentDataSetCodes
public java.util.List<java.lang.String> getParentDataSetCodes()
The codes of the parent data sets for this new data set. The list may be empty.- Since:
- 1.3
-
setParentDataSetCodes
public void setParentDataSetCodes(java.util.List<java.lang.String> codesOrNull)
Sets the parent data sets of this data set.- Parameters:
codesOrNull- If the value is null, the parents are cleared.- Since:
- 1.3
-
-