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
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.AnnotationForwarderNested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolderNested 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
ANNOTATIONFields inherited from interface org.biojavax.bio.BioEntry
COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXONFields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMAFields inherited from interface org.biojavax.bio.seq.RichSequence
CIRCULAR, SYMLISTVERSIONFields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleRichSequence(Namespace ns, String name, String accession, int version, SymbolList symList, Double seqversion) Creates a new instance of SimpleRichSequence. -
Method Summary
Modifier and TypeMethodDescriptionA special function that returns the SymbolList that this RichSequence is based around.protected intprotected Stringintlength()The number of symbols in this SymbolList.protected voidsetAlphabetName(String alphaname) protected voidsetSequenceLength(int length) protected voidsetStringSequence(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, toListMethods 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, toStringMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.bio.Annotatable
getAnnotationMethods 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, setTaxonMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.biojavax.RankedCrossRefable
addRankedCrossRef, getRankedCrossRefs, removeRankedCrossRef, setRankedCrossRefsMethods inherited from interface org.biojavax.RichAnnotatable
getNoteSet, getRichAnnotation, setNoteSet
-
Constructor Details
-
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 Details
-
setAlphabetName
- Overrides:
setAlphabetNamein classThinRichSequence- Throws:
IllegalSymbolExceptionBioException
-
setStringSequence
- Throws:
IllegalSymbolExceptionBioException
-
getStringSequence
-
length
The number of symbols in this SymbolList.- Specified by:
lengthin interfaceSymbolList- Overrides:
lengthin classThinRichSequence- Returns:
- the length
-
setSequenceLength
- Overrides:
setSequenceLengthin classThinRichSequence
-
getSequenceLength
- Overrides:
getSequenceLengthin classThinRichSequence
-
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:
getInternalSymbolListin interfaceRichSequence- Overrides:
getInternalSymbolListin classThinRichSequence- Returns:
- the internal SymbolList of the RichSequence, NOT the RichSequence object itself.
-