gov.nih.nci.caarray.domain.data
Class AbstractDataColumn

java.lang.Object
  extended by gov.nih.nci.caarray.domain.AbstractCaArrayObject
      extended by gov.nih.nci.caarray.domain.data.AbstractDataColumn
All Implemented Interfaces:
com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, java.io.Serializable
Direct Known Subclasses:
BooleanColumn, DoubleColumn, FloatColumn, IntegerColumn, LongColumn, ShortColumn, StringColumn

public abstract class AbstractDataColumn
extends AbstractCaArrayObject

Subclasses of AbstractDataColumn contain the actual array data corresponding to a single QuantitationType.

Note: AbstractDataColumn is not a normal hibernate object. The values API (getValuesAsArray, initializeArray, and setValuesFromArray) does not manipulate hibernate-managed information. Instead, values are managed by the DataStorageFacade. To properly initialize this class, ParsedDataPersister must be utilized. NPEs will result from incorrect usage.

See Also:
Serialized Form

Field Summary
protected static java.lang.String ERROR_NOT_INITIALIZED
          Error message for incorrect usage of uninitialized values array.
protected static java.lang.String SEPARATOR
          separator to use for encoding an array of values as string, except for StringColumn.
 
Fields inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
DEFAULT_BATCH_SIZE, DEFAULT_STRING_COLUMN_SIZE, LARGE_TEXT_FIELD_LENGTH
 
Constructor Summary
AbstractDataColumn()
           
 
Method Summary
 java.net.URI getDataHandle()
           
 HybridizationData getHybridizationData()
           
 QuantitationType getQuantitationType()
           
abstract  java.io.Serializable getValuesAsArray()
          Serialized values, from the DataStorageFacade.
abstract  java.lang.String getValuesAsString()
           
abstract  void initializeArray(int numberOfValues)
          Initializes this column to hold the number of values given.
abstract  boolean isLoaded()
          Indicates whether this column is already loaded, meaning its populated with an array of values.
 void setDataHandle(java.net.URI dataHandle)
           
 void setHybridizationData(HybridizationData hybridizationData)
           
 void setQuantitationType(QuantitationType quantitationType)
           
abstract  void setValuesAsString(java.lang.String s)
          Set values from a String representation.
abstract  void setValuesFromArray(java.io.Serializable array)
          Set the values of this column from a value array.
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
equals, getCaBigId, getId, getPostLoadSecurityPolicies, getRemoteApiSecurityPolicies, hashCode, setCaBigId, setId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

protected static final java.lang.String SEPARATOR
separator to use for encoding an array of values as string, except for StringColumn.

See Also:
Constant Field Values

ERROR_NOT_INITIALIZED

protected static final java.lang.String ERROR_NOT_INITIALIZED
Error message for incorrect usage of uninitialized values array.

See Also:
Constant Field Values
Constructor Detail

AbstractDataColumn

public AbstractDataColumn()
Method Detail

getQuantitationType

public QuantitationType getQuantitationType()
Returns:
the quantitationType

setQuantitationType

public void setQuantitationType(QuantitationType quantitationType)
Parameters:
quantitationType - the quantitationType to set

isLoaded

public abstract boolean isLoaded()
Indicates whether this column is already loaded, meaning its populated with an array of values.

Returns:
true if data has been loaded.

getHybridizationData

public HybridizationData getHybridizationData()
Returns:
the hybridizationData

setHybridizationData

public void setHybridizationData(HybridizationData hybridizationData)
Parameters:
hybridizationData - the hybridizationData to set

getDataHandle

public java.net.URI getDataHandle()
Returns:
the dataHandle

setDataHandle

public void setDataHandle(java.net.URI dataHandle)
Parameters:
dataHandle - the dataHandle to set

getValuesAsArray

public abstract java.io.Serializable getValuesAsArray()
Serialized values, from the DataStorageFacade.

Returns:
the values in this column as an array. Subclasses should return an array of the appropriate primitive type or String.

setValuesFromArray

public abstract void setValuesFromArray(java.io.Serializable array)
Set the values of this column from a value array. The incoming values should be coming from either a parsed file, or the DataStorageFacade.

Parameters:
array - the values for this column. Should be an array of the appropriate primitive or String type.

getValuesAsString

public abstract java.lang.String getValuesAsString()
Returns:
the values of this column, in a space-separated representation, where each value is encoded using the literal representation of the xs:short type defined in the XML Schema standard.

setValuesAsString

public abstract void setValuesAsString(java.lang.String s)
Set values from a String representation. The string should contain a list of space-separated values, with each value encoded using the literal representation of the xs:boolean type defined in XML Schema.

Parameters:
s - the string containing the space-separated values

initializeArray

public abstract void initializeArray(int numberOfValues)
Initializes this column to hold the number of values given.

Parameters:
numberOfValues - number of values