edu.mssm.crover.representation
Class Sequence

java.lang.Object
  |
  +--edu.mssm.crover.representation.Sequence
All Implemented Interfaces:
AnnotatedBioSequence, AnnotationSupport, BiologicalSequence, RootObject, java.io.Serializable

public class Sequence
extends java.lang.Object
implements AnnotatedBioSequence, java.io.Serializable

Default implementation of BiologicalSequence.

Author:
Fabien Campagne
See Also:
Serialized Form

Field Summary
protected  java.lang.String sequence
           
 
Constructor Summary
Sequence()
           
Sequence(java.lang.String ShortName, java.lang.String residuesCodes)
           
 
Method Summary
 BiologicalAnnotations getAnnotations()
          Returns the annotations associated with an instance.
 int getLength()
          Returns the length of the sequence.
 java.lang.String getResidueCodes()
          Get the residue codes of the sequence.
 java.lang.String getShortName()
          Returns the short name of this sequence.
 void set(BiologicalSequence source)
          Transfer information from the source to this instance.
 void setAnnotations(BiologicalAnnotations anns)
          Sets the annotations for an instance.
 void setResidueCodes(java.lang.String x)
          Set the residue codes of the sequence.
 void setShortName(java.lang.String x)
          Sets the short name of this sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sequence

protected java.lang.String sequence
Constructor Detail

Sequence

public Sequence()

Sequence

public Sequence(java.lang.String ShortName,
                java.lang.String residuesCodes)
Method Detail

getLength

public int getLength()
Returns the length of the sequence. The gaps are ignored if present.

Specified by:
getLength in interface BiologicalSequence

getResidueCodes

public java.lang.String getResidueCodes()
Get the residue codes of the sequence.

Specified by:
getResidueCodes in interface BiologicalSequence

setResidueCodes

public void setResidueCodes(java.lang.String x)
Set the residue codes of the sequence. Removes spaces and weird characters from both ends of the residue codes, replaces any occurences of '.' with '-' for encoding gaps, force uppercase characters. Set the resulting String as the new residueCodes for this sequence. The valid character codes are as follow ACDEFGHIKLMNPQRSTVWY-XZ

Specified by:
setResidueCodes in interface BiologicalSequence

getShortName

public java.lang.String getShortName()
Description copied from interface: BiologicalSequence
Returns the short name of this sequence. The short name is a short sequence of character that is designed to be seen by the user to remind himself about what this sequence object represents.

Specified by:
getShortName in interface BiologicalSequence

setShortName

public void setShortName(java.lang.String x)
Description copied from interface: BiologicalSequence
Sets the short name of this sequence.

Specified by:
setShortName in interface BiologicalSequence
See Also:
for a definition of the shortname.

set

public void set(BiologicalSequence source)
Transfer information from the source to this instance. Get any data we can from the BiologicalSequence source: we use the interface, so any implementation, even the CORBA one can be used as input. (The residue codes and shortname are transfered, but not the annotations.)


getAnnotations

public BiologicalAnnotations getAnnotations()
Description copied from interface: AnnotationSupport
Returns the annotations associated with an instance.

Specified by:
getAnnotations in interface AnnotationSupport

setAnnotations

public void setAnnotations(BiologicalAnnotations anns)
Description copied from interface: AnnotationSupport
Sets the annotations for an instance.

Specified by:
setAnnotations in interface AnnotationSupport


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.