## org.biojavax.bio.seq
Class SimpleRichSequence

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojavax.bio.SimpleBioEntry
              org.biojavax.bio.seq.ThinRichSequence
                  org.biojavax.bio.seq.SimpleRichSequence

All Implemented Interfaces:
  Comparable, Annotatable, FeatureHolder, Sequence, SymbolList, Changeable, BioEntry, RichSequence, RankedCrossRefable, RichAnnotatable

    public class SimpleRichSequence

extends ThinRichSequence

A simple implementation of RichSequence.

Since:
  1.5
Author:
  Richard Holland, Bubba Puryear

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojavax.bio.seq.RichSequence
`RichSequence.IOTools, RichSequence.Terms, RichSequence.Tools`

Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
`Annotatable.AnnotationForwarder`

Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
`FeatureHolder.EmptyFeatureHolder`

Field Summary

Fields inherited from interface org.biojavax.bio.seq.RichSequence
`CIRCULAR, SYMLISTVERSION`

Fields inherited from interface org.biojavax.bio.BioEntry
`COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXON`

Fields inherited from interface org.biojava.bio.Annotatable
`ANNOTATION`

Fields inherited from interface org.biojava.bio.symbol.SymbolList
`EDIT, EMPTY_LIST`

Fields inherited from interface org.biojava.bio.seq.FeatureHolder
`EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA`

Constructor Summary
`protected` `SimpleRichSequence()`
`` `SimpleRichSequence(Namespace ns, String name, String accession, int version, SymbolList symList, Double seqversion)` Creates a new instance of SimpleRichSequence.

Method Summary
`SymbolList` `getInternalSymbolList()` A special function that returns the SymbolList that this RichSequence is based around. This should _not_ be the RichSequence object itself, as this function is used to perform actions on the symbol list without referring to the RichSequence object directly.
`protected int` `getSequenceLength()`
`protected String` `getStringSequence()`
`int` `length()` The number of symbols in this SymbolList.
`protected void` `setAlphabetName(String alphaname)`
`protected void` `setSequenceLength(int length)`
`protected void` `setStringSequence(String seq)`

Methods inherited from class org.biojavax.bio.seq.ThinRichSequence
`containsFeature, countFeatures, createFeature, edit, features, filter, filter, getAlphabet, getAlphabetName, getCircular, getFeatureSet, getSchema, getSeqVersion, getURN, iterator, removeFeature, seqString, setCircular, setFeatureSet, setSeqVersion, subList, subStr, symbolAt, toList`

Methods inherited from class org.biojavax.bio.SimpleBioEntry

`addComment, addRankedCrossRef, addRankedDocRef, addRelationship, compareTo, equals, getAccession, getAnnotation, getComments, getDescription, getDivision, getId, getIdentifier, getName, getNamespace, getNoteSet, getRankedCrossRefs, getRankedDocRefs, getRelationships, getRichAnnotation, getTaxon, getVersion, hashCode, removeComment, removeRankedCrossRef, removeRankedDocRef, removeRelationship, setDescription, setDivision, setId, setIdentifier, setNoteSet, setRankedCrossRefs, setTaxon, toString`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.biojavax.bio.BioEntry
`addComment, addRankedDocRef, addRelationship, getAccession, getComments, getDescription, getDivision, getIdentifier, getName, getNamespace, getRankedDocRefs, getRelationships, getTaxon, getVersion, removeComment, removeRankedDocRef, removeRelationship, setDescription, setDivision, setIdentifier, setTaxon`

Methods inherited from interface org.biojavax.RichAnnotatable
`getNoteSet, getRichAnnotation, setNoteSet`

Methods inherited from interface org.biojava.bio.Annotatable
`getAnnotation`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from interface org.biojavax.RankedCrossRefable
`addRankedCrossRef, getRankedCrossRefs, removeRankedCrossRef, setRankedCrossRefs`

Methods inherited from interface java.lang.Comparable
`compareTo`

Methods inherited from interface org.biojava.bio.seq.Sequence
`getName`

Constructor Detail

### SimpleRichSequence

    public SimpleRichSequence(Namespace ns,
                              String name,
                              String accession,
                              int version,
                              SymbolList symList,
                              Double seqversion)

  Creates a new instance of SimpleRichSequence. Note the use of Double for seqversion, which indicates that it is nullable.

  Parameters:
    `ns` - the namespace for this sequence.
    `name` - the name of the sequence.
    `accession` - the accession of the sequence.
    `version` - the version of the sequence.
    `symList` - the symbols for the sequence.
    `seqversion` - the version of the symbols for the sequence.

### SimpleRichSequence

    protected SimpleRichSequence()

Method Detail

### setAlphabetName

    protected void setAlphabetName(String alphaname)
                            throws IllegalSymbolException,
                                   BioException

  Overrides:
    `setAlphabetName` in class `ThinRichSequence`
  Throws:
    `IllegalSymbolException`
    `BioException`

### setStringSequence

    protected void setStringSequence(String seq)
                              throws IllegalSymbolException,
                                     BioException

  Throws:
    `IllegalSymbolException`
    `BioException`

### getStringSequence

    protected String getStringSequence()

### length

    public int length()

  The number of symbols in this SymbolList.

  Specified by:
    `length` in interface `SymbolList`
  Overrides:
    `length` in class `ThinRichSequence`
  Returns:
    the length

### setSequenceLength

    protected void setSequenceLength(int length)

  Overrides:
    `setSequenceLength` in class `ThinRichSequence`

### getSequenceLength

    protected int getSequenceLength()

  Overrides:
    `getSequenceLength` in class `ThinRichSequence`

### getInternalSymbolList

    public SymbolList getInternalSymbolList()

  A special function that returns the SymbolList that this RichSequence is based around. This should _not_ be the RichSequence object itself, as this function is used to perform actions on the symbol list without referring to the RichSequence object directly.

  Specified by:
    `getInternalSymbolList` in interface `RichSequence`
  Overrides:
    `getInternalSymbolList` in class `ThinRichSequence`
  Returns:
    the internal SymbolList of the RichSequence, NOT the RichSequence object itself.