org.biomage.Measurement
Class Measurement

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Measurement.Measurement
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasPropertySets, HasUnit

public class Measurement
extends Extendable
implements java.io.Serializable, HasUnit

A Measurement is a quantity with a unit.

See Also:
Serialized Form

Nested Class Summary
 class Measurement.KindCV
          Inner class for the enumeration values that the attribute kindCV can assume.
 class Measurement.Type
          Inner class for the enumeration values that the attribute type can assume.
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  Unit unit
          The Unit associated with the Measurement.
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
Measurement()
          Default constructor.
Measurement(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 boolean emptyMAGEobject()
           
 Measurement.KindCV getKindCV()
          Get method for kindCV
 java.lang.String getModelClassName()
           
 java.lang.String getNameByValueKindCV(int val)
          For KindCV get the Name of the Enumeration type by passing a Value to it.
 java.lang.String getNameByValueType(int val)
          For Type get the Name of the Enumeration type by passing a Value to it.
 java.lang.String getNameKindCV()
          Return the current name of the Enumeration type of KindCV.
 java.lang.String getNameType()
          Return the current name of the Enumeration type of Type.
 java.lang.String getOtherKind()
          Get method for otherKind
 Measurement.Type getType()
          Get method for type
 Unit getUnit()
          Get method for unit
 java.lang.Object getValue()
          Get method for value
 int getValueByNameKindCV(java.lang.String name)
          For KindCV get the Value of the Enumeration type by passing a Name to it.
 int getValueByNameType(java.lang.String name)
          For Type get the Value of the Enumeration type by passing a Name to it.
 int getValueKindCV()
          Return the currrent value of the Enumeration type of KindCV.
 int getValueType()
          Return the currrent value of the Enumeration type of Type.
 void setKindCV(Measurement.KindCV kindCV)
          Set method for kindCV
 java.lang.String setNameByValueKindCV(int val)
          For KindCV set the Name of the Enumeration type by passing a value (int)
 java.lang.String setNameByValueType(int val)
          For Type set the Name of the Enumeration type by passing a value (int)
 void setOtherKind(java.lang.String otherKind)
          Set method for otherKind
 void setType(Measurement.Type type)
          Set method for type
 void setUnit(Unit unit)
          Set method for unit
 void setValue(java.lang.Object value)
          Set method for value
 int setValueByNameKindCV(java.lang.String name)
          For KindCV set the Value of the Enumeration type by passing a Name to it.
 int setValueByNameType(java.lang.String name)
          For Type set the Value of the Enumeration type by passing a Name to it.
 void writeAssociations(java.io.Writer out)
          writeAssociations This method is responsible for assembling the association data into XML.
 void writeAttributes(java.io.Writer out)
          writeAttributes This method is responsible for assembling the attribute data into XML.
 void writeMAGEML(java.io.Writer out)
          writeMAGEML This method is responsible for assembling the attribute and association data into XML.
 
Methods inherited from class org.biomage.Common.Extendable
addToPropertySets, addToPropertySets, equals, getFromPropertySets, getId, getIsEditable, getPropertySets, getSecuredElementId, isEditable, removeElementAtFromPropertySets, removeFromPropertySets, setAttributes, setId, setIsEditable, setPropertySets, setSecuredElementId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

unit

protected Unit unit
The Unit associated with the Measurement.

Constructor Detail

Measurement

public Measurement()
Default constructor.


Measurement

public Measurement(org.xml.sax.Attributes atts)
Attribute constructor. Looks up the attributes in the parameter and casts them from strings appropriately

Parameters:
atts: - the attribute list.
Method Detail

writeMAGEML

public void writeMAGEML(java.io.Writer out)
                 throws java.io.IOException
writeMAGEML This method is responsible for assembling the attribute and association data into XML. It creates the object tag and then calls the writeAttributes and writeAssociation methods.

Overrides:
writeMAGEML in class Extendable
Throws:
java.io.IOException

emptyMAGEobject

public boolean emptyMAGEobject()

writeAttributes

public void writeAttributes(java.io.Writer out)
                     throws java.io.IOException
writeAttributes This method is responsible for assembling the attribute data into XML. It calls the super method to write out all attributes of this class and it's ancestors.

Overrides:
writeAttributes in class Extendable
Throws:
java.io.IOException

writeAssociations

public void writeAssociations(java.io.Writer out)
                       throws java.io.IOException
writeAssociations This method is responsible for assembling the association data into XML. It calls the super method to write out all associations of this class's ancestors.

Overrides:
writeAssociations in class Extendable
Throws:
java.io.IOException

setType

public void setType(Measurement.Type type)
Set method for type

Parameters:
value - to set

getType

public Measurement.Type getType()
Get method for type

Returns:
value of the attribute

setNameByValueType

public java.lang.String setNameByValueType(int val)
For Type set the Name of the Enumeration type by passing a value (int)

Parameters:
int - value The value to be mapped to the name

setValueByNameType

public int setValueByNameType(java.lang.String name)
For Type set the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value

getNameByValueType

public java.lang.String getNameByValueType(int val)
For Type get the Name of the Enumeration type by passing a Value to it.

Parameters:
int - val The value for which the Mapped String will be returned.

getValueByNameType

public int getValueByNameType(java.lang.String name)
For Type get the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value.

getNameType

public java.lang.String getNameType()
Return the current name of the Enumeration type of Type.


getValueType

public int getValueType()
Return the currrent value of the Enumeration type of Type.


setValue

public void setValue(java.lang.Object value)
Set method for value

Parameters:
value - to set

getValue

public java.lang.Object getValue()
Get method for value

Returns:
value of the attribute

setKindCV

public void setKindCV(Measurement.KindCV kindCV)
Set method for kindCV

Parameters:
value - to set

getKindCV

public Measurement.KindCV getKindCV()
Get method for kindCV

Returns:
value of the attribute

setNameByValueKindCV

public java.lang.String setNameByValueKindCV(int val)
For KindCV set the Name of the Enumeration type by passing a value (int)

Parameters:
int - value The value to be mapped to the name

setValueByNameKindCV

public int setValueByNameKindCV(java.lang.String name)
For KindCV set the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value

getNameByValueKindCV

public java.lang.String getNameByValueKindCV(int val)
For KindCV get the Name of the Enumeration type by passing a Value to it.

Parameters:
int - val The value for which the Mapped String will be returned.

getValueByNameKindCV

public int getValueByNameKindCV(java.lang.String name)
For KindCV get the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value.

getNameKindCV

public java.lang.String getNameKindCV()
Return the current name of the Enumeration type of KindCV.


getValueKindCV

public int getValueKindCV()
Return the currrent value of the Enumeration type of KindCV.


setOtherKind

public void setOtherKind(java.lang.String otherKind)
Set method for otherKind

Parameters:
value - to set

getOtherKind

public java.lang.String getOtherKind()
Get method for otherKind

Returns:
value of the attribute

getModelClassName

public java.lang.String getModelClassName()
Overrides:
getModelClassName in class Extendable

setUnit

public void setUnit(Unit unit)
Set method for unit

Specified by:
setUnit in interface HasUnit
Parameters:
value - to set

getUnit

public Unit getUnit()
Get method for unit

Specified by:
getUnit in interface HasUnit
Returns:
value of the attribute