ch.systemsx.cisd.openbis.dss.generic.shared.api.v1
Class NewDataSetDTO

java.lang.Object
  extended by ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO
All Implemented Interfaces:
java.io.Serializable

@JsonObject(value="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
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
static java.lang.String DEFAULT_DATA_SET_FOLDER_NAME
           
 
Constructor Summary
NewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.io.File dataSetFile)
          Constructor
NewDataSetDTO(NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)
          Constructor
NewDataSetDTO(NewDataSetMetadataDTO dataSetMetadata, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)
          Constructor
NewDataSetDTO(java.lang.String dataSetType, NewDataSetDTO.DataSetOwner dataSetOwner, java.lang.String dataSetFolderNameOrNull, java.util.List<FileInfoDssDTO> fileInfos)
          Constructor
 
Method Summary
 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 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()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

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 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