Class 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
    • Field Detail

      • DEFAULT_DATA_SET_FOLDER_NAME

        public static java.lang.String DEFAULT_DATA_SET_FOLDER_NAME
    • Constructor Detail

      • NewDataSetDTO

        public NewDataSetDTO​(NewDataSetDTO.DataSetOwner dataSetOwner,
                             java.io.File dataSetFile)
        Constructor
        Parameters:
        dataSetOwner - the owner of the new data set
        dataSetFile - 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 set
        dataSetFolderNameOrNull - 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 set
        dataSetOwner - The owner of the new data set
        dataSetFolderNameOrNull - 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 set
        dataSetFolderNameOrNull - 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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