org.biomage.BioSequence
Class SeqFeature

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Common.Describable
          extended by org.biomage.BioSequence.SeqFeature
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasAuditTrail, HasDescriptions, HasPropertySets, HasRegions, HasSecurity

public class SeqFeature
extends Describable
implements java.io.Serializable, HasRegions

Represents, in general, what would be a GenBank Feature Table annotation for a sequence.

See Also:
Serialized Form

Nested Class Summary
 class SeqFeature.Basis
          Inner class for the enumeration values that the attribute basis can assume.
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasRegions
HasRegions.Regions_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 regions
          Association to classes that describe the location with the sequence of the SeqFeature.
 
Fields inherited from class org.biomage.Common.Describable
security
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
SeqFeature()
          Default constructor.
SeqFeature(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToRegions(int position, SeqFeatureLocation seqFeatureLocation)
          Method to add SeqFeatureLocation at position to Regions_list
 void addToRegions(SeqFeatureLocation seqFeatureLocation)
          Method to add SeqFeatureLocation to Regions_list
 boolean emptyMAGEobject()
           
 SeqFeature.Basis getBasis()
          Get method for basis
 SeqFeatureLocation getFromRegions(int position)
          Method to get SeqFeatureLocation from Regions_list
 java.lang.String getModelClassName()
           
 java.lang.String getNameBasis()
          Return the current name of the Enumeration type of Basis.
 java.lang.String getNameByValueBasis(int val)
          For Basis get the Name of the Enumeration type by passing a Value to it.
 HasRegions.Regions_list getRegions()
          Get method for regions
 int getValueBasis()
          Return the currrent value of the Enumeration type of Basis.
 int getValueByNameBasis(java.lang.String name)
          For Basis get the Value of the Enumeration type by passing a Name to it.
 void removeElementAtFromRegions(int position)
          Method to remove by position from Regions_list
 void removeFromRegions(SeqFeatureLocation seqFeatureLocation)
          Method to remove first SeqFeatureLocation from Regions_list
 void setBasis(SeqFeature.Basis basis)
          Set method for basis
 java.lang.String setNameByValueBasis(int val)
          For Basis set the Name of the Enumeration type by passing a value (int)
 void setRegions(HasRegions.Regions_list regions)
          Set method for regions
 int setValueByNameBasis(java.lang.String name)
          For Basis set the Value of the Enumeration type by passing a Name to it.
 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.Describable
addToAuditTrail, addToAuditTrail, addToDescriptions, addToDescriptions, getAuditTrail, getDescriptions, getFromAuditTrail, getFromDescriptions, getSecurity, removeElementAtFromAuditTrail, removeElementAtFromDescriptions, removeFromAuditTrail, removeFromDescriptions, setAttributes, 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, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

regions

protected java.util.List regions
Association to classes that describe the location with the sequence of the SeqFeature.

Constructor Detail

SeqFeature

public SeqFeature()
Default constructor.


SeqFeature

public SeqFeature(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 Describable
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 Describable
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 Describable
Throws:
java.io.IOException

setBasis

public void setBasis(SeqFeature.Basis basis)
Set method for basis

Parameters:
value - to set

getBasis

public SeqFeature.Basis getBasis()
Get method for basis

Returns:
value of the attribute

setNameByValueBasis

public java.lang.String setNameByValueBasis(int val)
For Basis set the Name of the Enumeration type by passing a value (int)

Parameters:
int - value The value to be mapped to the name

setValueByNameBasis

public int setValueByNameBasis(java.lang.String name)
For Basis set the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value

getNameByValueBasis

public java.lang.String getNameByValueBasis(int val)
For Basis get the Name of the Enumeration type by passing a Value to it.

Parameters:
int - val The value for which the Mapped String will be returned.

getValueByNameBasis

public int getValueByNameBasis(java.lang.String name)
For Basis get the Value of the Enumeration type by passing a Name to it.

Parameters:
String - name The name to be mapped to a value.

getNameBasis

public java.lang.String getNameBasis()
Return the current name of the Enumeration type of Basis.


getValueBasis

public int getValueBasis()
Return the currrent value of the Enumeration type of Basis.


getModelClassName

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

setRegions

public void setRegions(HasRegions.Regions_list regions)
Set method for regions

Specified by:
setRegions in interface HasRegions
Parameters:
value - to set

getRegions

public HasRegions.Regions_list getRegions()
Get method for regions

Specified by:
getRegions in interface HasRegions
Returns:
value of the attribute

addToRegions

public void addToRegions(SeqFeatureLocation seqFeatureLocation)
Method to add SeqFeatureLocation to Regions_list

Specified by:
addToRegions in interface HasRegions

addToRegions

public void addToRegions(int position,
                         SeqFeatureLocation seqFeatureLocation)
Method to add SeqFeatureLocation at position to Regions_list

Specified by:
addToRegions in interface HasRegions

getFromRegions

public SeqFeatureLocation getFromRegions(int position)
Method to get SeqFeatureLocation from Regions_list

Specified by:
getFromRegions in interface HasRegions

removeElementAtFromRegions

public void removeElementAtFromRegions(int position)
Method to remove by position from Regions_list

Specified by:
removeElementAtFromRegions in interface HasRegions

removeFromRegions

public void removeFromRegions(SeqFeatureLocation seqFeatureLocation)
Method to remove first SeqFeatureLocation from Regions_list

Specified by:
removeFromRegions in interface HasRegions