org.biomage.BioMaterial
Class Compound

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Common.Describable
          extended by org.biomage.Common.Identifiable
              extended by org.biomage.BioMaterial.Compound
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasAuditTrail, HasComponentCompounds, HasCompoundIndices, HasDescriptions, HasExternalLIMS, HasPropertySets, HasSecurity

public class Compound
extends Identifiable
implements java.io.Serializable, HasComponentCompounds, HasCompoundIndices, HasExternalLIMS

A Compound can be a simple compound such as SDS (sodium dodecyl sulfate). It may also be made of other Compounds in proportions using CompoundMeasurements to enumerate the Compounds and their amounts such as LB (Luria Broth) Media.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasComponentCompounds
HasComponentCompounds.ComponentCompounds_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasCompoundIndices
HasCompoundIndices.CompoundIndices_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasAuditTrail
HasAuditTrail.AuditTrail_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasDescriptions
HasDescriptions.Descriptions_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  java.util.List componentCompounds
          The Compounds and their amounts used to create this Compound.
protected  java.util.List compoundIndices
          Indices into common Compound Indices, such as the Merck Index, for this Compound.
protected  DatabaseEntry externalLIMS
          Reference to an entry in an external LIMS data source.
 
Fields inherited from class org.biomage.Common.Describable
security
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
Compound()
          Default constructor.
Compound(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToComponentCompounds(CompoundMeasurement compoundMeasurement)
          Method to add CompoundMeasurement to ComponentCompounds_list
 void addToComponentCompounds(int position, CompoundMeasurement compoundMeasurement)
          Method to add CompoundMeasurement at position to ComponentCompounds_list
 void addToCompoundIndices(int position, OntologyEntry ontologyEntry)
          Method to add OntologyEntry at position to CompoundIndices_list
 void addToCompoundIndices(OntologyEntry ontologyEntry)
          Method to add OntologyEntry to CompoundIndices_list
 boolean emptyMAGEobject()
           
 HasComponentCompounds.ComponentCompounds_list getComponentCompounds()
          Get method for componentCompounds
 HasCompoundIndices.CompoundIndices_list getCompoundIndices()
          Get method for compoundIndices
 DatabaseEntry getExternalLIMS()
          Get method for externalLIMS
 CompoundMeasurement getFromComponentCompounds(int position)
          Method to get CompoundMeasurement from ComponentCompounds_list
 OntologyEntry getFromCompoundIndices(int position)
          Method to get OntologyEntry from CompoundIndices_list
 java.lang.Boolean getIsSolvent()
          Get method for isSolvent
 java.lang.String getModelClassName()
           
 void removeElementAtFromComponentCompounds(int position)
          Method to remove by position from ComponentCompounds_list
 void removeElementAtFromCompoundIndices(int position)
          Method to remove by position from CompoundIndices_list
 void removeFromComponentCompounds(CompoundMeasurement compoundMeasurement)
          Method to remove first CompoundMeasurement from ComponentCompounds_list
 void removeFromCompoundIndices(OntologyEntry ontologyEntry)
          Method to remove first OntologyEntry from CompoundIndices_list
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setComponentCompounds(HasComponentCompounds.ComponentCompounds_list componentCompounds)
          Set method for componentCompounds
 void setCompoundIndices(HasCompoundIndices.CompoundIndices_list compoundIndices)
          Set method for compoundIndices
 void setExternalLIMS(DatabaseEntry externalLIMS)
          Set method for externalLIMS
 void setIsSolvent(java.lang.Boolean isSolvent)
          Set method for isSolvent
 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.Identifiable
getIdentifier, getName, setIdentifier, setName, toString
 
Methods inherited from class org.biomage.Common.Describable
addToAuditTrail, addToAuditTrail, addToDescriptions, addToDescriptions, getAuditTrail, getDescriptions, getFromAuditTrail, getFromDescriptions, getSecurity, removeElementAtFromAuditTrail, removeElementAtFromDescriptions, removeFromAuditTrail, removeFromDescriptions, setAuditTrail, setDescriptions, setSecurity
 
Methods inherited from class org.biomage.Common.Extendable
addToPropertySets, addToPropertySets, equals, getFromPropertySets, getId, getIsEditable, getPropertySets, getSecuredElementId, isEditable, removeElementAtFromPropertySets, removeFromPropertySets, setId, setIsEditable, setPropertySets, setSecuredElementId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

compoundIndices

protected java.util.List compoundIndices
Indices into common Compound Indices, such as the Merck Index, for this Compound.


componentCompounds

protected java.util.List componentCompounds
The Compounds and their amounts used to create this Compound.


externalLIMS

protected DatabaseEntry externalLIMS
Reference to an entry in an external LIMS data source.

Constructor Detail

Compound

public Compound()
Default constructor.


Compound

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

setAttributes

public void setAttributes(org.xml.sax.Attributes atts)
Overrides:
setAttributes in class Identifiable

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 Identifiable
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 Identifiable
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 Identifiable
Throws:
java.io.IOException

setIsSolvent

public void setIsSolvent(java.lang.Boolean isSolvent)
Set method for isSolvent

Parameters:
value - to set

getIsSolvent

public java.lang.Boolean getIsSolvent()
Get method for isSolvent

Returns:
value of the attribute

getModelClassName

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

setCompoundIndices

public void setCompoundIndices(HasCompoundIndices.CompoundIndices_list compoundIndices)
Set method for compoundIndices

Specified by:
setCompoundIndices in interface HasCompoundIndices
Parameters:
value - to set

getCompoundIndices

public HasCompoundIndices.CompoundIndices_list getCompoundIndices()
Get method for compoundIndices

Specified by:
getCompoundIndices in interface HasCompoundIndices
Returns:
value of the attribute

addToCompoundIndices

public void addToCompoundIndices(OntologyEntry ontologyEntry)
Method to add OntologyEntry to CompoundIndices_list

Specified by:
addToCompoundIndices in interface HasCompoundIndices

addToCompoundIndices

public void addToCompoundIndices(int position,
                                 OntologyEntry ontologyEntry)
Method to add OntologyEntry at position to CompoundIndices_list

Specified by:
addToCompoundIndices in interface HasCompoundIndices

getFromCompoundIndices

public OntologyEntry getFromCompoundIndices(int position)
Method to get OntologyEntry from CompoundIndices_list

Specified by:
getFromCompoundIndices in interface HasCompoundIndices

removeElementAtFromCompoundIndices

public void removeElementAtFromCompoundIndices(int position)
Method to remove by position from CompoundIndices_list

Specified by:
removeElementAtFromCompoundIndices in interface HasCompoundIndices

removeFromCompoundIndices

public void removeFromCompoundIndices(OntologyEntry ontologyEntry)
Method to remove first OntologyEntry from CompoundIndices_list

Specified by:
removeFromCompoundIndices in interface HasCompoundIndices

setComponentCompounds

public void setComponentCompounds(HasComponentCompounds.ComponentCompounds_list componentCompounds)
Set method for componentCompounds

Specified by:
setComponentCompounds in interface HasComponentCompounds
Parameters:
value - to set

getComponentCompounds

public HasComponentCompounds.ComponentCompounds_list getComponentCompounds()
Get method for componentCompounds

Specified by:
getComponentCompounds in interface HasComponentCompounds
Returns:
value of the attribute

addToComponentCompounds

public void addToComponentCompounds(CompoundMeasurement compoundMeasurement)
Method to add CompoundMeasurement to ComponentCompounds_list

Specified by:
addToComponentCompounds in interface HasComponentCompounds

addToComponentCompounds

public void addToComponentCompounds(int position,
                                    CompoundMeasurement compoundMeasurement)
Method to add CompoundMeasurement at position to ComponentCompounds_list

Specified by:
addToComponentCompounds in interface HasComponentCompounds

getFromComponentCompounds

public CompoundMeasurement getFromComponentCompounds(int position)
Method to get CompoundMeasurement from ComponentCompounds_list

Specified by:
getFromComponentCompounds in interface HasComponentCompounds

removeElementAtFromComponentCompounds

public void removeElementAtFromComponentCompounds(int position)
Method to remove by position from ComponentCompounds_list

Specified by:
removeElementAtFromComponentCompounds in interface HasComponentCompounds

removeFromComponentCompounds

public void removeFromComponentCompounds(CompoundMeasurement compoundMeasurement)
Method to remove first CompoundMeasurement from ComponentCompounds_list

Specified by:
removeFromComponentCompounds in interface HasComponentCompounds

setExternalLIMS

public void setExternalLIMS(DatabaseEntry externalLIMS)
Set method for externalLIMS

Specified by:
setExternalLIMS in interface HasExternalLIMS
Parameters:
value - to set

getExternalLIMS

public DatabaseEntry getExternalLIMS()
Get method for externalLIMS

Specified by:
getExternalLIMS in interface HasExternalLIMS
Returns:
value of the attribute