org.biomage.Description
Class OntologyEntry

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Description.Ontology.BioMaterialCharacteristic
          extended by org.biomage.Description.OntologyEntry
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasAssociations, HasOntologyReference, HasPropertySets
Direct Known Subclasses:
Age, Biometrics, ChromosomalAberration, MGEDOntologyEntry

public class OntologyEntry
extends BioMaterialCharacteristic
implements java.io.Serializable, HasOntologyReference, HasAssociations

A single entry from an ontology or a controlled vocabulary. For instance, category could be 'species name', value could be 'homo sapiens' and ontology would be taxonomy database, NCBI.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasAssociations
HasAssociations.Associations_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  DatabaseEntry ontologyReference
          Many ontology entries will not yet have formalized ontologies.
 
Fields inherited from class org.biomage.Description.Ontology.BioMaterialCharacteristic
ojbConcreteClass
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
OntologyEntry()
          Default constructor.
OntologyEntry(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToAssociations(int position, OntologyEntry ontologyEntry)
          Method to add OntologyEntry at position to Associations_list
 void addToAssociations(OntologyEntry ontologyEntry)
          Method to add OntologyEntry to Associations_list
 boolean emptyMAGEobject()
           
 HasAssociations.Associations_list getAssociations()
          Get method for associations
 java.lang.String getCategory()
          Get method for category
 java.lang.String getDescription()
          Get method for description
 OntologyEntry getFromAssociations(int position)
          Method to get OntologyEntry from Associations_list
 java.lang.String getModelClassName()
           
 DatabaseEntry getOntologyReference()
          Get method for ontologyReference
 java.lang.String getValue()
          Get method for value
 void removeElementAtFromAssociations(int position)
          Method to remove by position from Associations_list
 void removeFromAssociations(OntologyEntry ontologyEntry)
          Method to remove first OntologyEntry from Associations_list
 void setAssociations(HasAssociations.Associations_list associations)
          Set method for associations
 void setCategory(java.lang.String category)
          Set method for category
 void setDescription(java.lang.String description)
          Set method for description
 void setOntologyReference(DatabaseEntry ontologyReference)
          Set method for ontologyReference
 void setValue(java.lang.String value)
          Set method for value
 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.Description.Ontology.BioMaterialCharacteristic
createMGEDMeasurementRestriction
 
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

ontologyReference

protected DatabaseEntry ontologyReference
Many ontology entries will not yet have formalized ontologies. In those cases, they will not have a database reference to the ontology. In the future it is highly encouraged that these ontologies be developed and ontologyEntry be subclassed from DatabaseReference.

Constructor Detail

OntologyEntry

public OntologyEntry()
Default constructor.


OntologyEntry

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

setCategory

public void setCategory(java.lang.String category)
Set method for category

Specified by:
setCategory in class BioMaterialCharacteristic
Parameters:
value - to set

getCategory

public java.lang.String getCategory()
Get method for category

Specified by:
getCategory in class BioMaterialCharacteristic
Returns:
value of the attribute

setValue

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

Specified by:
setValue in class BioMaterialCharacteristic
Parameters:
value - to set

getValue

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

Specified by:
getValue in class BioMaterialCharacteristic
Returns:
value of the attribute

setDescription

public void setDescription(java.lang.String description)
Set method for description

Specified by:
setDescription in class BioMaterialCharacteristic
Parameters:
value - to set

getDescription

public java.lang.String getDescription()
Get method for description

Specified by:
getDescription in class BioMaterialCharacteristic
Returns:
value of the attribute

getModelClassName

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

setOntologyReference

public void setOntologyReference(DatabaseEntry ontologyReference)
Set method for ontologyReference

Specified by:
setOntologyReference in interface HasOntologyReference
Specified by:
setOntologyReference in class BioMaterialCharacteristic
Parameters:
value - to set

getOntologyReference

public DatabaseEntry getOntologyReference()
Get method for ontologyReference

Specified by:
getOntologyReference in interface HasOntologyReference
Specified by:
getOntologyReference in class BioMaterialCharacteristic
Returns:
value of the attribute

setAssociations

public void setAssociations(HasAssociations.Associations_list associations)
Set method for associations

Specified by:
setAssociations in interface HasAssociations
Specified by:
setAssociations in class BioMaterialCharacteristic
Parameters:
value - to set

getAssociations

public HasAssociations.Associations_list getAssociations()
Get method for associations

Specified by:
getAssociations in interface HasAssociations
Specified by:
getAssociations in class BioMaterialCharacteristic
Returns:
value of the attribute

addToAssociations

public void addToAssociations(OntologyEntry ontologyEntry)
Method to add OntologyEntry to Associations_list

Specified by:
addToAssociations in interface HasAssociations
Specified by:
addToAssociations in class BioMaterialCharacteristic

addToAssociations

public void addToAssociations(int position,
                              OntologyEntry ontologyEntry)
Method to add OntologyEntry at position to Associations_list

Specified by:
addToAssociations in interface HasAssociations
Specified by:
addToAssociations in class BioMaterialCharacteristic

getFromAssociations

public OntologyEntry getFromAssociations(int position)
Method to get OntologyEntry from Associations_list

Specified by:
getFromAssociations in interface HasAssociations
Specified by:
getFromAssociations in class BioMaterialCharacteristic

removeElementAtFromAssociations

public void removeElementAtFromAssociations(int position)
Method to remove by position from Associations_list

Specified by:
removeElementAtFromAssociations in interface HasAssociations
Specified by:
removeElementAtFromAssociations in class BioMaterialCharacteristic

removeFromAssociations

public void removeFromAssociations(OntologyEntry ontologyEntry)
Method to remove first OntologyEntry from Associations_list

Specified by:
removeFromAssociations in interface HasAssociations
Specified by:
removeFromAssociations in class BioMaterialCharacteristic