org.biomage.BioMaterial
Class CompoundMeasurement

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.BioMaterial.CompoundMeasurement
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasCompound, HasMeasurement, HasPropertySets

public class CompoundMeasurement
extends Extendable
implements java.io.Serializable, HasCompound, HasMeasurement

A CompoundMeasurement is a pairing of a source Compound and an amount (Measurement) of that Compound.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  Compound compound
          A Compound to be used to create another Compound.
protected  Measurement measurement
          The amount of the Compound.
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
CompoundMeasurement()
          Default constructor.
CompoundMeasurement(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 boolean emptyMAGEobject()
           
 Compound getCompound()
          Get method for compound
 Measurement getMeasurement()
          Get method for measurement
 java.lang.String getModelClassName()
           
 void setCompound(Compound compound)
          Set method for compound
 void setMeasurement(Measurement measurement)
          Set method for measurement
 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

compound

protected Compound compound
A Compound to be used to create another Compound.


measurement

protected Measurement measurement
The amount of the Compound.

Constructor Detail

CompoundMeasurement

public CompoundMeasurement()
Default constructor.


CompoundMeasurement

public CompoundMeasurement(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

getModelClassName

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

setCompound

public void setCompound(Compound compound)
Set method for compound

Specified by:
setCompound in interface HasCompound
Parameters:
value - to set

getCompound

public Compound getCompound()
Get method for compound

Specified by:
getCompound in interface HasCompound
Returns:
value of the attribute

setMeasurement

public void setMeasurement(Measurement measurement)
Set method for measurement

Specified by:
setMeasurement in interface HasMeasurement
Parameters:
value - to set

getMeasurement

public Measurement getMeasurement()
Get method for measurement

Specified by:
getMeasurement in interface HasMeasurement
Returns:
value of the attribute