ch.systemsx.cisd.openbis.generic.shared.api.v1.dto
Class DataSet

java.lang.Object
  extended by ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DataSet
All Implemented Interfaces:
ch.systemsx.cisd.openbis.generic.shared.basic.IIdHolder, java.io.Serializable

@JsonObject(value="DataSet")
public final class DataSet
extends java.lang.Object
implements java.io.Serializable, ch.systemsx.cisd.openbis.generic.shared.basic.IIdHolder

Immutable value object representing a data set.

See Also:
Serialized Form

Nested Class Summary
static class DataSet.Connections
           
static class DataSet.DataSetInitializer
          Class used to initialize a new data set instance.
 
Constructor Summary
DataSet(DataSet.DataSetInitializer initializer)
          Creates a new instance with the provided initializer
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<java.lang.String> getChildrenCodes()
          Return the children codes.
 java.lang.String getCode()
          Returns the data set code;
 java.util.List<DataSet> getContainedDataSets()
           
 DataSet getContainerOrNull()
           
 java.lang.String getDataSetTypeCode()
           
 java.lang.String getExperimentIdentifier()
          Returns the identifier of the Experiment to which this data set belongs.
 ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystem getExternalDataManagementSystem()
           
 java.lang.String getExternalDataSetCode()
           
 java.lang.String getExternalDataSetLink()
           
 DataSetFetchOptions getFetchOptions()
           
 java.lang.Long getId()
          Returns tech id of the data set.
 java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject> getMetaprojects()
           
 java.util.List<java.lang.String> getParentCodes()
          Return the parent codes.
 java.util.HashMap<java.lang.String,java.lang.String> getProperties()
           
 java.util.Date getRegistrationDate()
           
 EntityRegistrationDetails getRegistrationDetails()
          Return the data set registration details.
 java.util.EnumSet<DataSet.Connections> getRetrievedConnections()
           
 java.lang.String getSampleIdentifierOrNull()
           
 int hashCode()
           
 boolean isContainerDataSet()
           
 boolean isLinkDataSet()
           
 boolean isStorageConfirmed()
           
 boolean isStub()
           
 void setFetchOptions(DataSetFetchOptions fetchOptions)
           
 void setStorageConfirmed(boolean storageConfirmed)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSet

public DataSet(DataSet.DataSetInitializer initializer)
Creates a new instance with the provided initializer

Throws:
java.lang.IllegalArgumentException - if some of the required information is not provided.
Method Detail

getId

public java.lang.Long getId()
Returns tech id of the data set.

Specified by:
getId in interface ch.systemsx.cisd.openbis.generic.shared.basic.IIdHolder

getCode

public java.lang.String getCode()
Returns the data set code;


getExperimentIdentifier

public java.lang.String getExperimentIdentifier()
Returns the identifier of the Experiment to which this data set belongs.

Returns:
null if this data set is not completely filled with all information available. That is, getExperimentIdentifier() == null indicates that getSampleIdentifierOrNull(), getProperties(), getChildrenCodes(), getParentCodes(), and getContainedDataSets() do not return correct results.

getSampleIdentifierOrNull

public java.lang.String getSampleIdentifierOrNull()

getDataSetTypeCode

public java.lang.String getDataSetTypeCode()

getRegistrationDate

public java.util.Date getRegistrationDate()

getProperties

public java.util.HashMap<java.lang.String,java.lang.String> getProperties()

getMetaprojects

public java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject> getMetaprojects()
                                                                                              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getRetrievedConnections

public java.util.EnumSet<DataSet.Connections> getRetrievedConnections()

getParentCodes

public java.util.List<java.lang.String> getParentCodes()
                                                throws java.lang.IllegalArgumentException
Return the parent codes. This throws an IllegalArgumentException if the parent codes were not retrieved.

Returns:
A list of parent data set codes or an empty list if there are no parents.
Throws:
java.lang.IllegalArgumentException - Thrown if the parent codes were not retrieved from the server.

getChildrenCodes

public java.util.List<java.lang.String> getChildrenCodes()
                                                  throws java.lang.IllegalArgumentException
Return the children codes. This throws an IllegalArgumentException if the children codes were not retrieved.

Returns:
A list of chidlren data set codes or an empty list if there are no children.
Throws:
java.lang.IllegalArgumentException - Thrown if the children codes were not retrieved from the server.

getRegistrationDetails

public EntityRegistrationDetails getRegistrationDetails()
Return the data set registration details.

Since:
1.11

isContainerDataSet

public boolean isContainerDataSet()

getContainerOrNull

public DataSet getContainerOrNull()
Since:
1.20

isLinkDataSet

public boolean isLinkDataSet()

getExternalDataSetCode

public java.lang.String getExternalDataSetCode()

getExternalDataSetLink

public java.lang.String getExternalDataSetLink()

getExternalDataManagementSystem

public ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystem getExternalDataManagementSystem()

getContainedDataSets

public java.util.List<DataSet> getContainedDataSets()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFetchOptions

public DataSetFetchOptions getFetchOptions()

setFetchOptions

public void setFetchOptions(DataSetFetchOptions fetchOptions)

isStorageConfirmed

public boolean isStorageConfirmed()

setStorageConfirmed

public void setStorageConfirmed(boolean storageConfirmed)

isStub

public boolean isStub()