gov.nih.nci.caarray.external.v1_0.sample
Class Characteristic

java.lang.Object
  extended by gov.nih.nci.caarray.external.v1_0.sample.Characteristic
All Implemented Interfaces:
java.io.Serializable

public class Characteristic
extends java.lang.Object
implements java.io.Serializable

Characteristic represents a loosely typed attribute associated with a sample. The attribute consists of a category and a value.

Author:
dkokotov
See Also:
Serialized Form

Constructor Summary
Characteristic()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 Category getCategory()
           
 java.lang.Float getMeasurementValue()
           
 Term getTermValue()
           
 AbstractValue getValue()
           
 int hashCode()
          
static Characteristic newMeasurementCharacteristic()
           
static Characteristic newTermCharacteristic()
           
static Characteristic newUserDefinedCharacteristic()
           
 void setCategory(Category category)
           
 void setMeasurementValue(java.lang.Float measurement)
          Set the value of this charactestic to be a MeasurementValue with given measurement.
 void setTermValue(Term term)
          Set the value of this charactestic to be a TermValue with given term.
 void setValue(AbstractValue value)
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Characteristic

public Characteristic()
Method Detail

getCategory

public Category getCategory()
Returns:
the category

setCategory

public void setCategory(Category category)
Parameters:
category - the category to set

getValue

public AbstractValue getValue()
Returns:
the value

setValue

public void setValue(AbstractValue value)
Parameters:
value - the value to set

newMeasurementCharacteristic

public static Characteristic newMeasurementCharacteristic()
Returns:
a new Characteristic initialized with a blank measurement value;

newTermCharacteristic

public static Characteristic newTermCharacteristic()
Returns:
a new Characteristic initialized with a blank term value;

newUserDefinedCharacteristic

public static Characteristic newUserDefinedCharacteristic()
Returns:
a new Characteristic initialized with a blank user defined value;

setTermValue

public void setTermValue(Term term)
Set the value of this charactestic to be a TermValue with given term.

Parameters:
term - the term

getTermValue

public Term getTermValue()
Returns:
if the value of this charactestic is a TermValue, return the term for that value, else return null.

setMeasurementValue

public void setMeasurementValue(java.lang.Float measurement)
Set the value of this charactestic to be a MeasurementValue with given measurement.

Parameters:
measurement - the measurement

getMeasurementValue

public java.lang.Float getMeasurementValue()
Returns:
if the value of this charactestic is a MeasurementValue, return the measurement for that value, else return null.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

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