gov.nih.nci.mageom.domain.Measurement.impl
Class MeasurementImpl

java.lang.Object
  extended by gov.nih.nci.mageom.domain.impl.MAGEOMObject
      extended by gov.nih.nci.mageom.domain.impl.ExtendableImpl
          extended by gov.nih.nci.mageom.domain.Measurement.impl.MeasurementImpl
All Implemented Interfaces:
Extendable, Measurement, java.io.Serializable

public class MeasurementImpl
extends ExtendableImpl
implements Measurement

A Measurement is a quantity with a unit.

Version:
%I%, %G%
See Also:
Serialized Form

Field Summary
protected static java.util.ArrayList allAssociationMethods
           
protected static java.util.Hashtable associationMethods
           
protected  java.lang.String kindCV
          One of the enumeration values to determine the controlled vocabulary of the value.
protected  java.lang.String otherKind
          Name of the controlled vocabulary if it isn't one of the Unit subclasses.
protected  java.lang.String type
          The type of measurement, for instance if the measurement is five feet, it can be either absolute feet tall) or change (five feet further along).
protected  Unit unit
          DOCUMENT ME
protected  java.lang.Long unitId
          The internal ID of the associated unit object.
protected  java.lang.String value
          The value of the measurement.
 
Fields inherited from class gov.nih.nci.mageom.domain.impl.ExtendableImpl
propertySets, propertySetsCount, securedElementId
 
Constructor Summary
MeasurementImpl()
          Default constructor
 
Method Summary
 java.lang.String getKindCV()
          Returns the value of this Measurement object's kindCV attribute.
 java.lang.String getOtherKind()
          Returns the value of this Measurement object's otherKind attribute.
 java.lang.String getType()
          Returns the value of this Measurement object's type attribute.
 Unit getUnit()
          Returns the value of this Measurement object's unit attribute.
 java.lang.String getValue()
          Returns the value of this Measurement object's value attribute.
 java.util.Hashtable getXMLMethodDescriptors()
          Returns a Hashtable containing XMLMethodDescriptors descriptors of the association methods of this object.
protected  void init()
           
 Measurement[] searchMeasurements(MeasurementSearchCriteria criteria)
          Returns an array of Measurement objects that satisfy the given MeasurementSearchCriteria.
 void setKindCV(java.lang.String p_kindCV)
          Sets the kindCV attribute.
 void setOtherKind(java.lang.String p_otherKind)
          Sets the otherKind attribute.
 void setType(java.lang.String p_type)
          Sets the type attribute.
 void setUnit(Unit p_unit)
          Sets the unit attribute.
 void setValue(java.lang.String p_value)
          Sets the value attribute.
 java.lang.String toString()
          Returns a String representation of this object suitable for console display.
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
           
 org.w3c.dom.Element toXMLDoc(org.w3c.dom.Document doc)
           
 org.w3c.dom.Element toXMLProcessor(org.w3c.dom.Document doc, java.util.ArrayList fillOutValues)
          Returns an XML representation of the object.
 
Methods inherited from class gov.nih.nci.mageom.domain.impl.ExtendableImpl
getPropertySets, getPropertySetsCount, getSecuredElementId, searchExtendables, setPropertySets, setSecuredElementId
 
Methods inherited from class gov.nih.nci.mageom.domain.impl.MAGEOMObject
getId, getIsEditable, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nih.nci.mageom.domain.Extendable
getPropertySets, setPropertySets
 

Field Detail

allAssociationMethods

protected static java.util.ArrayList allAssociationMethods

associationMethods

protected static java.util.Hashtable associationMethods

type

protected java.lang.String type
The type of measurement, for instance if the measurement is five feet, it can be either absolute feet tall) or change (five feet further along).


value

protected java.lang.String value
The value of the measurement. kindCV (and otherKind) determine with Unit the datatype of


kindCV

protected java.lang.String kindCV
One of the enumeration values to determine the controlled vocabulary of the value.


otherKind

protected java.lang.String otherKind
Name of the controlled vocabulary if it isn't one of the Unit subclasses.


unit

protected Unit unit
DOCUMENT ME


unitId

protected java.lang.Long unitId
The internal ID of the associated unit object.

Constructor Detail

MeasurementImpl

public MeasurementImpl()
Default constructor

Method Detail

init

protected void init()
Overrides:
init in class ExtendableImpl

searchMeasurements

public Measurement[] searchMeasurements(MeasurementSearchCriteria criteria)
                                 throws gov.nih.nci.common.search.SearchException
Returns an array of Measurement objects that satisfy the given MeasurementSearchCriteria.

Parameters:
criteria - The MeasurementSearchCriteria which represents a query for Measurement objects.
Returns:
An array of Measurement objects.
Throws:
A - gov.nih.nci.common.search.SearchException if there is a problem searching.
gov.nih.nci.common.search.SearchException

setType

public void setType(java.lang.String p_type)
Sets the type attribute. This API is currently read-only. So, calling this method does not affect the persistent state of a Measurement object.

Specified by:
setType in interface Measurement
Parameters:
p_type - The new value for type.
See Also:
Measurement.getType()

getType

public java.lang.String getType()
Description copied from interface: Measurement
Returns the value of this Measurement object's type attribute. Description of type: The type of measurement, for instance if the measurement is five feet, it can be either absolute (five feet tall) or change (five feet further along).

Specified by:
getType in interface Measurement
Returns:
enum {absolute,change} The value of type.
See Also:
Measurement.getType()

setValue

public void setValue(java.lang.String p_value)
Sets the value attribute. This API is currently read-only. So, calling this method does not affect the persistent state of a Measurement object.

Specified by:
setValue in interface Measurement
Parameters:
p_value - The new value for value.
See Also:
Measurement.getValue()

getValue

public java.lang.String getValue()
Description copied from interface: Measurement
Returns the value of this Measurement object's value attribute. Description of value: The value of the measurement. kindCV (and otherKind) determine with Unit the datatype of value.

Specified by:
getValue in interface Measurement
Returns:
any The value of value.
See Also:
Measurement.getValue()

setKindCV

public void setKindCV(java.lang.String p_kindCV)
Sets the kindCV attribute. This API is currently read-only. So, calling this method does not affect the persistent state of a Measurement object.

Specified by:
setKindCV in interface Measurement
Parameters:
p_kindCV - The new value for kindCV.
See Also:
Measurement.getKindCV()

getKindCV

public java.lang.String getKindCV()
Description copied from interface: Measurement
Returns the value of this Measurement object's kindCV attribute. Description of kindCV: One of the enumeration values to determine the controlled vocabulary of the value.

Specified by:
getKindCV in interface Measurement
Returns:
enum {time,distance,temperature,quantity,mass,volume,concentration,other} The value of kindCV.
See Also:
Measurement.getKindCV()

setOtherKind

public void setOtherKind(java.lang.String p_otherKind)
Sets the otherKind attribute. This API is currently read-only. So, calling this method does not affect the persistent state of a Measurement object.

Specified by:
setOtherKind in interface Measurement
Parameters:
p_otherKind - The new value for otherKind.
See Also:
Measurement.getOtherKind()

getOtherKind

public java.lang.String getOtherKind()
Description copied from interface: Measurement
Returns the value of this Measurement object's otherKind attribute. Description of otherKind: Name of the controlled vocabulary if it isn't one of the Unit subclasses.

Specified by:
getOtherKind in interface Measurement
Returns:
String The value of otherKind.
See Also:
Measurement.getOtherKind()

setUnit

public void setUnit(Unit p_unit)
Sets the unit attribute. This API is currently read-only. So, calling this method does not affect the persistent state of a Measurement object.

Specified by:
setUnit in interface Measurement
Parameters:
p_unit - The new value for unit.
See Also:
Measurement.getUnit()

getUnit

public Unit getUnit()
Description copied from interface: Measurement
Returns the value of this Measurement object's unit attribute.

Specified by:
getUnit in interface Measurement
Returns:
gov.nih.nci.mageom.bean.Measurement.Unit The value of unit.
See Also:
Measurement.getUnit()

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
Overrides:
toXML in class ExtendableImpl

toXMLDoc

public org.w3c.dom.Element toXMLDoc(org.w3c.dom.Document doc)
Overrides:
toXMLDoc in class ExtendableImpl

toXMLProcessor

public org.w3c.dom.Element toXMLProcessor(org.w3c.dom.Document doc,
                                          java.util.ArrayList fillOutValues)
Returns an XML representation of the object. The document is not modified.

Overrides:
toXMLProcessor in class ExtendableImpl
Parameters:
doc - the working document
fillOutValues - a list of attribute names that should have full XML for their values.
Returns:
org.w3c.dom.Element an XML representation

getXMLMethodDescriptors

public java.util.Hashtable getXMLMethodDescriptors()
Returns a Hashtable containing XMLMethodDescriptors descriptors of the association methods of this object.

Overrides:
getXMLMethodDescriptors in class ExtendableImpl
Returns:
Hashtable The Hashtable of descriptors.

toString

public java.lang.String toString()
Returns a String representation of this object suitable for console display.

Overrides:
toString in class ExtendableImpl
Returns:
the String representation.