Package 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.biojava.bio.Annotatable
Annotatable.AnnotationForwarder
-
Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolder
-
Nested classes/interfaces inherited from interface org.biojavax.bio.seq.RichSequence
RichSequence.IOTools, RichSequence.Terms, RichSequence.Tools
-
-
Field Summary
-
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
-
Fields inherited from interface org.biojavax.bio.BioEntry
COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXON
-
Fields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
-
Fields inherited from interface org.biojavax.bio.seq.RichSequence
CIRCULAR, SYMLISTVERSION
-
Fields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleRichSequence()
SimpleRichSequence(Namespace ns, String name, String accession, int version, SymbolList symList, Double seqversion)
Creates a new instance of SimpleRichSequence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymbolList
getInternalSymbolList()
A special function that returns the SymbolList that this RichSequence is based around.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.biojava.bio.Annotatable
getAnnotation
-
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.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.biojavax.RankedCrossRefable
addRankedCrossRef, getRankedCrossRefs, removeRankedCrossRef, setRankedCrossRefs
-
Methods inherited from interface org.biojavax.RichAnnotatable
getNoteSet, getRichAnnotation, setNoteSet
-
-
-
-
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 classThinRichSequence
- 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 interfaceSymbolList
- Overrides:
length
in classThinRichSequence
- Returns:
- the length
-
setSequenceLength
protected void setSequenceLength(int length)
- Overrides:
setSequenceLength
in classThinRichSequence
-
getSequenceLength
protected int getSequenceLength()
- Overrides:
getSequenceLength
in classThinRichSequence
-
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 interfaceRichSequence
- Overrides:
getInternalSymbolList
in classThinRichSequence
- Returns:
- the internal SymbolList of the RichSequence, NOT the RichSequence object itself.
-
-