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:
java.io.Serializable

@JsonObject(value="DataSet")
public final class DataSet
extends java.lang.Object
implements java.io.Serializable

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 sample code;
 java.util.List<DataSet> getContainedDataSets()
           
 java.lang.String getDataSetTypeCode()
           
 java.lang.String getExperimentIdentifier()
          Returns the identifier of the Experiment to which this data set belongs.
 DataSetFetchOptions getFetchOptions()
           
 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()
           
 void setContainedDataSets(java.util.List<DataSet> containedDataSets)
           
 void setContainerDataSet(boolean containerDataSet)
           
 void setFetchOptions(DataSetFetchOptions fetchOptions)
           
 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

getCode

public java.lang.String getCode()
Returns the sample 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()

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

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

setContainerDataSet

public void setContainerDataSet(boolean containerDataSet)

setContainedDataSets

public void setContainedDataSets(java.util.List<DataSet> containedDataSets)

getFetchOptions

public DataSetFetchOptions getFetchOptions()

setFetchOptions

public void setFetchOptions(DataSetFetchOptions fetchOptions)