org.biomage.Common
Class Extendable

java.lang.Object
  extended by org.biomage.Common.Extendable
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasPropertySets
Direct Known Subclasses:
ArrayManufactureDeviation, BioAssayMapping, BioAssayTuple, BioDataValues, BioMaterialCharacteristic, BioMaterialMeasurement, CompoundMeasurement, DatabaseEntry, DataExternal, DataInternal, Datum, Describable, DesignElementMapping, DesignElementTuple, ExternalReference, FeatureDefect, FeatureInformation, FeatureLocation, Measurement, MismatchInformation, NodeValue, ParameterValue, Position, PositionDelta, QuantitationTypeMapping, QuantitationTypeTuple, SeqFeatureLocation, SequencePosition, Unit, ZoneDefect, ZoneGroup, ZoneLayout

public abstract class Extendable
extends java.lang.Object
implements java.io.Serializable, HasPropertySets, SecuredElementItf

Abstract class that specifies for subclasses an association to NameValueTypes. These can be used, for instance, to specify proprietary properties and in-house processing hints.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  boolean editable
           
protected  long id
           
protected  java.lang.String securedElementId
           
 
Constructor Summary
Extendable()
          Default constructor.
Extendable(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToPropertySets(int position, NameValueType nameValueType)
          Method to add NameValueType at position to PropertySets_list
 void addToPropertySets(NameValueType nameValueType)
          Method to add NameValueType to PropertySets_list
 boolean equals(java.lang.Object obj)
          Tests if this Extendable is the same reference as the specified object or it has the same ID.
 NameValueType getFromPropertySets(int position)
          Method to get NameValueType from PropertySets_list
 long getId()
           
 boolean getIsEditable()
           
 java.lang.String getModelClassName()
           
 HasPropertySets.PropertySets_list getPropertySets()
          Get method for propertySets
 java.lang.String getSecuredElementId()
           
 boolean isEditable()
           
 void removeElementAtFromPropertySets(int position)
          Method to remove by position from PropertySets_list
 void removeFromPropertySets(NameValueType nameValueType)
          Method to remove first NameValueType from PropertySets_list
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setId(long id)
           
 void setIsEditable(boolean editable)
           
 void setPropertySets(HasPropertySets.PropertySets_list propertySets)
          Set method for propertySets
 void setSecuredElementId(java.lang.String id)
           
 java.lang.String toString()
           
 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 java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected long id

securedElementId

protected java.lang.String securedElementId

editable

protected boolean editable
Constructor Detail

Extendable

public Extendable()
Default constructor.


Extendable

public Extendable(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)

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.

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.

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.

Throws:
java.io.IOException

getModelClassName

public java.lang.String getModelClassName()

setPropertySets

public void setPropertySets(HasPropertySets.PropertySets_list propertySets)
Set method for propertySets

Specified by:
setPropertySets in interface HasPropertySets
Parameters:
value - to set

getPropertySets

public HasPropertySets.PropertySets_list getPropertySets()
Get method for propertySets

Specified by:
getPropertySets in interface HasPropertySets
Returns:
value of the attribute

addToPropertySets

public void addToPropertySets(NameValueType nameValueType)
Method to add NameValueType to PropertySets_list

Specified by:
addToPropertySets in interface HasPropertySets

addToPropertySets

public void addToPropertySets(int position,
                              NameValueType nameValueType)
Method to add NameValueType at position to PropertySets_list

Specified by:
addToPropertySets in interface HasPropertySets

getFromPropertySets

public NameValueType getFromPropertySets(int position)
Method to get NameValueType from PropertySets_list

Specified by:
getFromPropertySets in interface HasPropertySets

removeElementAtFromPropertySets

public void removeElementAtFromPropertySets(int position)
Method to remove by position from PropertySets_list

Specified by:
removeElementAtFromPropertySets in interface HasPropertySets

removeFromPropertySets

public void removeFromPropertySets(NameValueType nameValueType)
Method to remove first NameValueType from PropertySets_list

Specified by:
removeFromPropertySets in interface HasPropertySets

getId

public long getId()

setId

public void setId(long id)

getSecuredElementId

public java.lang.String getSecuredElementId()
Specified by:
getSecuredElementId in interface SecuredElementItf

setSecuredElementId

public void setSecuredElementId(java.lang.String id)
Specified by:
setSecuredElementId in interface SecuredElementItf

isEditable

public boolean isEditable()
Specified by:
isEditable in interface SecuredElementItf

getIsEditable

public boolean getIsEditable()
Specified by:
getIsEditable in interface SecuredElementItf

setIsEditable

public void setIsEditable(boolean editable)
Specified by:
setIsEditable in interface SecuredElementItf

equals

public boolean equals(java.lang.Object obj)
Tests if this Extendable is the same reference as the specified object or it has the same ID.

Overrides:
equals in class java.lang.Object
Returns:
- True if this object is the same; false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object