org.biomage.BioMaterial
Class BioMaterial

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.BioMaterial
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasAuditTrail, HasCharacteristics, HasDescriptions, HasMaterialType, HasPropertySets, HasQualityControlStatistics, HasSecurity, HasTopBioMaterial, HasTreatments
Direct Known Subclasses:
BioSample, BioSource, LabeledExtract

public abstract class BioMaterial
extends Identifiable
implements java.io.Serializable, HasTreatments, HasMaterialType, HasCharacteristics, HasQualityControlStatistics, HasTopBioMaterial

BioMaterial is an abstract class that represents the important substances such as cells, tissues, DNA, proteins, etc... Biomaterials can be related to other biomaterial through a directed acyclic graph (represented by treatment(s)).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasTreatments
HasTreatments.Treatments_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasCharacteristics
HasCharacteristics.Characteristics_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasQualityControlStatistics
HasQualityControlStatistics.QualityControlStatistics_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasTopBioMaterial
HasTopBioMaterial.TopLevelBioMaterials_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 characteristics
          Innate properties of the biosource, such as genotype, cultivar, tissue type, cell type, ploidy, etc.
protected  java.lang.Boolean copied
          caARRAY internal flag to indicate if this BioMaterial is generated by copy of existing biomaterial.
protected  boolean imported
          caARRAY internal flag to indicate if this BioMaterial is imported.
protected  OntologyEntry materialType
          The type of material used, i.e.
protected  java.lang.String ojbConcreteClass
           
protected  java.util.List qualityControlStatistics
          Measures of the quality of the BioMaterial.
protected  java.util.List topLevelBioMaterials
          This association is one way from BioMaterial to it top most parent biomaterial.
protected  java.util.List treatments
          This association is one way from BioMaterial to Treatment.
 
Fields inherited from class org.biomage.Common.Describable
security
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
BioMaterial()
          Default constructor.
BioMaterial(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToCharacteristics(int position, OntologyEntry ontologyEntry)
          Method to add OntologyEntry at position to Characteristics_list
 void addToCharacteristics(OntologyEntry ontologyEntry)
          Method to add OntologyEntry to Characteristics_list
 void addToQualityControlStatistics(int position, NameValueType nameValueType)
          Method to add NameValueType at position to QualityControlStatistics_list
 void addToQualityControlStatistics(NameValueType nameValueType)
          Method to add NameValueType to QualityControlStatistics_list
 void addToTopLevelBioMaterials(BioMaterial bioMaterial)
          Method to add Treatment to Treatments_list
 void addToTopLevelBioMaterials(int position, BioMaterial bioMaterial)
          Method to add Treatment at position to Treatments_list
 void addToTreatments(int position, Treatment treatment)
          Method to add Treatment at position to Treatments_list
 void addToTreatments(Treatment treatment)
          Method to add Treatment to Treatments_list
 HasCharacteristics.Characteristics_list getCharacteristics()
          Get method for characteristics
 java.lang.Boolean getCopied()
           
 OntologyEntry getFromCharacteristics(int position)
          Method to get OntologyEntry from Characteristics_list
 NameValueType getFromQualityControlStatistics(int position)
          Method to get NameValueType from QualityControlStatistics_list
 BioMaterial getFromTopLevelBioMaterials(int position)
          Method to get Treatment from Treatments_list
 Treatment getFromTreatments(int position)
          Method to get Treatment from Treatments_list
 boolean getImported()
          Method to return if this BioMaterial is imported from MAGEML.
 OntologyEntry getMaterialType()
          Get method for materialType
 java.lang.String getModelClassName()
           
 HasQualityControlStatistics.QualityControlStatistics_list getQualityControlStatistics()
          Get method for qualityControlStatistics
 HasTopBioMaterial.TopLevelBioMaterials_list getTopLevelBioMaterials()
          Get method for treatments
 HasTreatments.Treatments_list getTreatments()
          Get method for treatments
 void removeElementAtFromCharacteristics(int position)
          Method to remove by position from Characteristics_list
 void removeElementAtFromQualityControlStatistics(int position)
          Method to remove by position from QualityControlStatistics_list
 void removeElementAtFromTopLevelBioMaterials(int position)
          Method to remove by position from Treatments_list
 void removeElementAtFromTreatments(int position)
          Method to remove by position from Treatments_list
 void removeFromCharacteristics(OntologyEntry ontologyEntry)
          Method to remove first OntologyEntry from Characteristics_list
 void removeFromQualityControlStatistics(NameValueType nameValueType)
          Method to remove first NameValueType from QualityControlStatistics_list
 void removeFromTopLevelBioMaterials(BioMaterial bioMaterial)
          Method to remove first Treatment from Treatments_list
 void removeFromTreatments(Treatment treatment)
          Method to remove first Treatment from Treatments_list
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setCharacteristics(HasCharacteristics.Characteristics_list characteristics)
          Set method for characteristics
 void setCopied(java.lang.Boolean copied)
           
 void setImported(boolean imported)
          Flags this BioMaterial if it is imported from MAGEML.
 void setMaterialType(OntologyEntry materialType)
          Set method for materialType
 void setQualityControlStatistics(HasQualityControlStatistics.QualityControlStatistics_list qualityControlStatistics)
          Set method for qualityControlStatistics
 void setTopLevelBioMaterials(HasTopBioMaterial.TopLevelBioMaterials_list biomaterials)
          Set method for treatments
 void setTreatments(HasTreatments.Treatments_list treatments)
          Set method for treatments
 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

ojbConcreteClass

protected java.lang.String ojbConcreteClass

imported

protected boolean imported
caARRAY internal flag to indicate if this BioMaterial is imported. This should only be set to TRUE by MAGEML importer and not be changed afterwards.


copied

protected java.lang.Boolean copied
caARRAY internal flag to indicate if this BioMaterial is generated by copy of existing biomaterial. This should only be set to TRUE when adding the biomaterial by copy of Labeledextract/Biomaterial and not be changed afterwards. This would allow to query biomaterial and ignore the ones generated by copy.


qualityControlStatistics

protected java.util.List qualityControlStatistics
Measures of the quality of the BioMaterial.


characteristics

protected java.util.List characteristics
Innate properties of the biosource, such as genotype, cultivar, tissue type, cell type, ploidy, etc.


materialType

protected OntologyEntry materialType
The type of material used, i.e. rna, dna, lipid, phosphoprotein, etc.


treatments

protected java.util.List treatments
This association is one way from BioMaterial to Treatment. From this a BioMaterial can discover the amount and type of BioMaterial that was part of the treatment that produced it.


topLevelBioMaterials

protected java.util.List topLevelBioMaterials
This association is one way from BioMaterial to it top most parent biomaterial. From this, a biomaterial can discover its topm parent biosource and the associated securedelementID. This relation is added for caArray to efficiently discover the parent bioseource and associated secured element id.

Constructor Detail

BioMaterial

public BioMaterial()
Default constructor.


BioMaterial

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

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

getModelClassName

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

setQualityControlStatistics

public void setQualityControlStatistics(HasQualityControlStatistics.QualityControlStatistics_list qualityControlStatistics)
Set method for qualityControlStatistics

Specified by:
setQualityControlStatistics in interface HasQualityControlStatistics
Parameters:
value - to set

getQualityControlStatistics

public HasQualityControlStatistics.QualityControlStatistics_list getQualityControlStatistics()
Get method for qualityControlStatistics

Specified by:
getQualityControlStatistics in interface HasQualityControlStatistics
Returns:
value of the attribute

addToQualityControlStatistics

public void addToQualityControlStatistics(NameValueType nameValueType)
Method to add NameValueType to QualityControlStatistics_list

Specified by:
addToQualityControlStatistics in interface HasQualityControlStatistics

addToQualityControlStatistics

public void addToQualityControlStatistics(int position,
                                          NameValueType nameValueType)
Method to add NameValueType at position to QualityControlStatistics_list

Specified by:
addToQualityControlStatistics in interface HasQualityControlStatistics

getFromQualityControlStatistics

public NameValueType getFromQualityControlStatistics(int position)
Method to get NameValueType from QualityControlStatistics_list

Specified by:
getFromQualityControlStatistics in interface HasQualityControlStatistics

removeElementAtFromQualityControlStatistics

public void removeElementAtFromQualityControlStatistics(int position)
Method to remove by position from QualityControlStatistics_list

Specified by:
removeElementAtFromQualityControlStatistics in interface HasQualityControlStatistics

removeFromQualityControlStatistics

public void removeFromQualityControlStatistics(NameValueType nameValueType)
Method to remove first NameValueType from QualityControlStatistics_list

Specified by:
removeFromQualityControlStatistics in interface HasQualityControlStatistics

setCharacteristics

public void setCharacteristics(HasCharacteristics.Characteristics_list characteristics)
Set method for characteristics

Specified by:
setCharacteristics in interface HasCharacteristics
Parameters:
value - to set

getCharacteristics

public HasCharacteristics.Characteristics_list getCharacteristics()
Get method for characteristics

Specified by:
getCharacteristics in interface HasCharacteristics
Returns:
value of the attribute

addToCharacteristics

public void addToCharacteristics(OntologyEntry ontologyEntry)
Method to add OntologyEntry to Characteristics_list

Specified by:
addToCharacteristics in interface HasCharacteristics

addToCharacteristics

public void addToCharacteristics(int position,
                                 OntologyEntry ontologyEntry)
Method to add OntologyEntry at position to Characteristics_list

Specified by:
addToCharacteristics in interface HasCharacteristics

getFromCharacteristics

public OntologyEntry getFromCharacteristics(int position)
Method to get OntologyEntry from Characteristics_list

Specified by:
getFromCharacteristics in interface HasCharacteristics

removeElementAtFromCharacteristics

public void removeElementAtFromCharacteristics(int position)
Method to remove by position from Characteristics_list

Specified by:
removeElementAtFromCharacteristics in interface HasCharacteristics

removeFromCharacteristics

public void removeFromCharacteristics(OntologyEntry ontologyEntry)
Method to remove first OntologyEntry from Characteristics_list

Specified by:
removeFromCharacteristics in interface HasCharacteristics

setMaterialType

public void setMaterialType(OntologyEntry materialType)
Set method for materialType

Specified by:
setMaterialType in interface HasMaterialType
Parameters:
value - to set

getMaterialType

public OntologyEntry getMaterialType()
Get method for materialType

Specified by:
getMaterialType in interface HasMaterialType
Returns:
value of the attribute

setTopLevelBioMaterials

public void setTopLevelBioMaterials(HasTopBioMaterial.TopLevelBioMaterials_list biomaterials)
Set method for treatments

Specified by:
setTopLevelBioMaterials in interface HasTopBioMaterial
Parameters:
value - to set

getTopLevelBioMaterials

public HasTopBioMaterial.TopLevelBioMaterials_list getTopLevelBioMaterials()
Get method for treatments

Specified by:
getTopLevelBioMaterials in interface HasTopBioMaterial
Returns:
value of the attribute

addToTopLevelBioMaterials

public void addToTopLevelBioMaterials(BioMaterial bioMaterial)
Method to add Treatment to Treatments_list

Specified by:
addToTopLevelBioMaterials in interface HasTopBioMaterial

addToTopLevelBioMaterials

public void addToTopLevelBioMaterials(int position,
                                      BioMaterial bioMaterial)
Method to add Treatment at position to Treatments_list

Specified by:
addToTopLevelBioMaterials in interface HasTopBioMaterial

getFromTopLevelBioMaterials

public BioMaterial getFromTopLevelBioMaterials(int position)
Method to get Treatment from Treatments_list

Specified by:
getFromTopLevelBioMaterials in interface HasTopBioMaterial

removeElementAtFromTopLevelBioMaterials

public void removeElementAtFromTopLevelBioMaterials(int position)
Method to remove by position from Treatments_list

Specified by:
removeElementAtFromTopLevelBioMaterials in interface HasTopBioMaterial

removeFromTopLevelBioMaterials

public void removeFromTopLevelBioMaterials(BioMaterial bioMaterial)
Method to remove first Treatment from Treatments_list

Specified by:
removeFromTopLevelBioMaterials in interface HasTopBioMaterial

getImported

public boolean getImported()
Method to return if this BioMaterial is imported from MAGEML.


setImported

public void setImported(boolean imported)
Flags this BioMaterial if it is imported from MAGEML. This should be used internally by caARRAY's MAGEML importer and should not be changed afterwards.

Parameters:
imported - - True to indicate this BioMaterial is imported from MAGEML.

getCopied

public java.lang.Boolean getCopied()
Returns:
Returns the copied.

setCopied

public void setCopied(java.lang.Boolean copied)
Parameters:
copied - The copied to set.

setTreatments

public void setTreatments(HasTreatments.Treatments_list treatments)
Set method for treatments

Specified by:
setTreatments in interface HasTreatments
Parameters:
value - to set

getTreatments

public HasTreatments.Treatments_list getTreatments()
Get method for treatments

Specified by:
getTreatments in interface HasTreatments
Returns:
value of the attribute

addToTreatments

public void addToTreatments(Treatment treatment)
Method to add Treatment to Treatments_list

Specified by:
addToTreatments in interface HasTreatments

addToTreatments

public void addToTreatments(int position,
                            Treatment treatment)
Method to add Treatment at position to Treatments_list

Specified by:
addToTreatments in interface HasTreatments

getFromTreatments

public Treatment getFromTreatments(int position)
Method to get Treatment from Treatments_list

Specified by:
getFromTreatments in interface HasTreatments

removeElementAtFromTreatments

public void removeElementAtFromTreatments(int position)
Method to remove by position from Treatments_list

Specified by:
removeElementAtFromTreatments in interface HasTreatments

removeFromTreatments

public void removeFromTreatments(Treatment treatment)
Method to remove first Treatment from Treatments_list

Specified by:
removeFromTreatments in interface HasTreatments