org.geworkbench.bison.datastructure.bioobjects.microarray
Class CSMicroarray

java.lang.Object
  extended by org.geworkbench.bison.datastructure.bioobjects.microarray.CSMicroarray
All Implemented Interfaces:
java.io.Serializable, DSBioObject, DSMicroarray, DSDescribable, DSExtendable, DSIdentifiable, DSNamed, DSSequential

public class CSMicroarray
extends java.lang.Object
implements DSMicroarray, java.io.Serializable

Version:
$Id: CSMicroarray.java 10496 2013-05-02 21:33:13Z zji $
Author:
zji
See Also:
Serialized Form

Constructor Summary
CSMicroarray(int markerNo)
           
CSMicroarray(int serial, int markerNo, java.lang.String label, int type)
           
 
Method Summary
 void addNameValuePair(java.lang.String name, java.lang.Object value)
          Adds a new name-value mapping.
 void allowMultipleValues(java.lang.String name)
          Conjugate method for forceUniqueValue.
 void clearName(java.lang.String name)
          Removes all values associated with the given name.
 DSMicroarray deepCopy()
           
 void forceUniqueValue(java.lang.String name)
          Forces that the name be associated with at most one value.
 java.lang.String getDescription()
          Get the description..
 java.lang.String getID()
          Return the ID of the implementing object.
 java.lang.String getLabel()
          Gets the label for this object.
 int getMarkerNo()
          Returns the number of features in the chip
 DSMarkerValue getMarkerValue(DSGeneMarker mInfo)
           
 DSMarkerValue getMarkerValue(int i)
           
 DSMarkerValue[] getMarkerValues()
           
 float[] getRawMarkerData()
           
 int getSerial()
          Gets the serial for this object.
 java.lang.Object[] getValuesForName(java.lang.String name)
          Returns all values mapped to the designated name.
 boolean isMarkerUndefined(int i)
          Convenience method to access the undefined status of the i-th feature directly
 boolean isMarkerValid(int i)
          Convenience method to access the valid status of the i-th feature directly
 boolean isUniqueValue(java.lang.String name)
          Check if forceUniqueValue() is in effect for the designated name.
 void resize(int size)
          Resize the number of features to a new value.
 void setDescription(java.lang.String desc)
          Set new description.
 void setID(java.lang.String id)
          Sets the ID of the implementing object.
 void setLabel(java.lang.String label)
          Sets the label for this object.
 void setMarkerValue(int index, DSMarkerValue markerValue)
          Add the designated marker value at the specified index
 void setSerial(int id)
          Sets the serial for this object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CSMicroarray

public CSMicroarray(int markerNo)

CSMicroarray

public CSMicroarray(int serial,
                    int markerNo,
                    java.lang.String label,
                    int type)
Method Detail

isMarkerValid

public boolean isMarkerValid(int i)
Description copied from interface: DSMicroarray
Convenience method to access the valid status of the i-th feature directly

Specified by:
isMarkerValid in interface DSMicroarray
Parameters:
i - int
Returns:
boolean

isMarkerUndefined

public boolean isMarkerUndefined(int i)
Description copied from interface: DSMicroarray
Convenience method to access the undefined status of the i-th feature directly

Specified by:
isMarkerUndefined in interface DSMicroarray
Parameters:
i - int
Returns:
boolean

getMarkerNo

public int getMarkerNo()
Description copied from interface: DSMicroarray
Returns the number of features in the chip

Specified by:
getMarkerNo in interface DSMicroarray
Returns:
int

setMarkerValue

public void setMarkerValue(int index,
                           DSMarkerValue markerValue)
Description copied from interface: DSMicroarray
Add the designated marker value at the specified index

Specified by:
setMarkerValue in interface DSMicroarray
Parameters:
index - int at which marker vale is to be added
markerValue - MarkerValue to be added

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: DSNamed
Sets the label for this object.

Specified by:
setLabel in interface DSNamed
Parameters:
label - the new label for this object.

getLabel

public java.lang.String getLabel()
Description copied from interface: DSNamed
Gets the label for this object.

Specified by:
getLabel in interface DSNamed
Returns:
the label.

getSerial

public int getSerial()
Description copied from interface: DSSequential
Gets the serial for this object.

Specified by:
getSerial in interface DSSequential
Returns:
the serial index.

setSerial

public void setSerial(int id)
Description copied from interface: DSSequential
Sets the serial for this object

Specified by:
setSerial in interface DSSequential
Parameters:
id - the new serial.

getID

public java.lang.String getID()
Description copied from interface: DSIdentifiable
Return the ID of the implementing object.

Specified by:
getID in interface DSIdentifiable
Returns:

setID

public void setID(java.lang.String id)
Description copied from interface: DSIdentifiable
Sets the ID of the implementing object.

Specified by:
setID in interface DSIdentifiable

toString

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

setDescription

public void setDescription(java.lang.String desc)
Description copied from interface: DSDescribable
Set new description.

Specified by:
setDescription in interface DSDescribable
Parameters:
desc - The new description.

getDescription

public java.lang.String getDescription()
Description copied from interface: DSDescribable
Get the description..

Specified by:
getDescription in interface DSDescribable
Returns:
A description.

addNameValuePair

public void addNameValuePair(java.lang.String name,
                             java.lang.Object value)
Description copied from interface: DSExtendable
Adds a new name-value mapping.

Specified by:
addNameValuePair in interface DSExtendable

getValuesForName

public java.lang.Object[] getValuesForName(java.lang.String name)
Description copied from interface: DSExtendable
Returns all values mapped to the designated name.

Specified by:
getValuesForName in interface DSExtendable
Returns:
All values associated with the argument name.

forceUniqueValue

public void forceUniqueValue(java.lang.String name)
Description copied from interface: DSExtendable
Forces that the name be associated with at most one value. Attempting to add a name-value pair for a 'name' that already has an associate value, results in old name-value association be replaced by the new one.

Calling this method for an existing 'name' results in all the associated name-value pairs to be cleared.

Specified by:
forceUniqueValue in interface DSExtendable
Parameters:
name - The 'name' upon which uniqueness of value will be enforced.

allowMultipleValues

public void allowMultipleValues(java.lang.String name)
Description copied from interface: DSExtendable
Conjugate method for forceUniqueValue. Enables a 'name' to accept mulptiple name-value asscociations.

Specified by:
allowMultipleValues in interface DSExtendable
Parameters:
name - The 'name' for which multiplicity of value is enabled.

isUniqueValue

public boolean isUniqueValue(java.lang.String name)
Description copied from interface: DSExtendable
Check if forceUniqueValue() is in effect for the designated name.

Specified by:
isUniqueValue in interface DSExtendable
Returns:

clearName

public void clearName(java.lang.String name)
Description copied from interface: DSExtendable
Removes all values associated with the given name.

Specified by:
clearName in interface DSExtendable

getMarkerValues

public DSMarkerValue[] getMarkerValues()
Specified by:
getMarkerValues in interface DSMicroarray
Returns:
an array of microarray features.

getMarkerValue

public DSMarkerValue getMarkerValue(DSGeneMarker mInfo)
Specified by:
getMarkerValue in interface DSMicroarray
Parameters:
mInfo - A marker whose value is requested.
Returns:
The MarkerValue for the designated marker within this microarray, if the marker exists in the microarray. Null, otherwise.

getMarkerValue

public DSMarkerValue getMarkerValue(int i)
Specified by:
getMarkerValue in interface DSMicroarray
Parameters:
i - The relative position (index) of a marker within the microarray.
Returns:
The marker value for the desiganted index position, if index is non-negative and no larger than the microarray size. null, otherwise.

deepCopy

public DSMicroarray deepCopy()
Specified by:
deepCopy in interface DSMicroarray
Returns:
A deep copy of the microarray.

resize

public void resize(int size)
Description copied from interface: DSMicroarray
Resize the number of features to a new value. This destroys all previous values

Specified by:
resize in interface DSMicroarray

getRawMarkerData

public float[] getRawMarkerData()
Specified by:
getRawMarkerData in interface DSMicroarray