org.biojava.bridge.Biocorba.Seqcore
Class SequenceAdapter
java.lang.Object
|
+--org.biojava.bridge.Biocorba.Seqcore.SymbolListAdapter
|
+--org.biojava.bridge.Biocorba.Seqcore.SequenceAdapter
- public class SequenceAdapter
- extends SymbolListAdapter
- implements Sequence
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SequenceAdapter
public SequenceAdapter(PrimarySeq primarySeq)
throws IllegalAlphabetException,
IllegalSymbolException,
BioException
getPrimarySeq
public PrimarySeq getPrimarySeq()
getSeq
public Seq getSeq()
createFeature
public Feature createFeature(FeatureHolder fh,
Feature.Template template)
throws java.lang.UnsupportedOperationException
createFeature
public Feature createFeature(Feature.Template template)
throws java.lang.UnsupportedOperationException
- Description copied from interface: FeatureHolder
- Create a new Feature, and add it to this FeatureHolder. This
method will generally only work on Sequences, and on some
Features which have been attached to Sequences.
- Tags copied from interface: FeatureHolder
- Throws:
- java.lang.UnsupportedOperationException - if this FeatureHolder does not
support addition of new features.
removeFeature
public void removeFeature(Feature f)
- Description copied from interface: FeatureHolder
- Remove a feature from this FeatureHolder.
- Tags copied from interface: FeatureHolder
- Throws:
- java.lang.UnsupportedOperationException - if this FeatureHolder
does not support feature removal.
getName
public java.lang.String getName()
- Description copied from interface: Sequence
- The name of this sequence.
The name may contain spaces or odd characters.
- Specified by:
- getName in interface Sequence
- Tags copied from interface: Sequence
- Returns:
- the name as a String
getURN
public java.lang.String getURN()
- Description copied from interface: Sequence
- The URN for this sequence. This will be something like
urn:sequence/embl:U32766
or
urn:sequence/fasta:sequences.fasta|hox3
.
- Specified by:
- getURN in interface Sequence
- Tags copied from interface: Sequence
- Returns:
- the urn as a String
countFeatures
public int countFeatures()
- Description copied from interface: FeatureHolder
- Count how many features are contained.
- Tags copied from interface: FeatureHolder
- Returns:
- a positive integer or zero, equal to the number of features
contained
features
public java.util.Iterator features()
- Description copied from interface: FeatureHolder
- Iterate over the features in no well defined order.
- Tags copied from interface: FeatureHolder
- Returns:
- an Iterator
filter
public FeatureHolder filter(FeatureFilter fc,
boolean recurse)
- Description copied from interface: FeatureHolder
- Return a new FeatureHolder that contains all of the children of this one
that passed the filter fc.
- Tags copied from interface: FeatureHolder
- Parameters:
fc
- the FeatureFilter to applyrecurse
- true if all features-of-features should be scanned, and a
single flat collection of features returned, or false if
just immediate children should be filtered.
getAnnotation
public Annotation getAnnotation()
- Description copied from interface: Annotatable
- Should return the associated annotation object.
- Tags copied from interface: Annotatable
- Returns:
- an Annotation object, never null