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.Serializable
Represents 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 class
NewDataSetDTO.DataSetOwner
The identifier of the owner of the new data set.static class
NewDataSetDTO.DataSetOwnerType
The different types of owners of data sets; there are two: experiment and sample.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_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 void
addUploadObserver(UploadObserver uploadObserver)
java.lang.String
getDataSetFolderName()
The name of the folder containing the files in the data set.NewDataSetDTO.DataSetOwner
getDataSetOwner()
The direct owner of the data set, either an experiment or a sample.java.util.List<FileInfoDssDTO>
getFileInfos()
FileInfoDssDTO
objects 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()
void
notifyUploadProgress(long totalBytesRead)
void
setDataSetTypeOrNull(java.lang.String dataSetTypeOrNull)
void
setParentDataSetCodes(java.util.List<java.lang.String> codesOrNull)
Sets the parent data sets of this data set.void
setProperties(java.util.Map<java.lang.String,java.lang.String> props)
java.lang.String
toString()
java.lang.String
tryDataSetType()
-
-
-
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()
FileInfoDssDTO
objects describing the files within the data set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-