[Biojava-l] [proposal] SequenceAnnotator
Wed, 12 Jul 2000 11:23:01 +0100
I haven't heard anybody speak out in favour of the old
Annotator interface since it was deprecated last week, so
I have attached my proposed replacement, SequenceAnnotator.
There are two major differences from the old approach:
- It only works on Sequences, and isn't explicitly aware
- The annotate(Sequence) method returns a Sequence.
The latter change means that a SequenceAnnotator MAY
construct a new Sequence object containint annotations. It
can also stick to the old pattern of adding features to
an existing Sequence (so long as it implements MutableFeatureHolder).
As things stand, it is the responsibility of the implementor
to document which of these is happening. Are people happy with
If everyone is happy, I'll check in this new interface, and also
the following support classes.
Lazily applies a SequenceAnnotator to all sequences as
they are retrieved from an underlying SequenceDB object.
ViewSequence: (anyone have a better name?)
Presents a view on any underlying Sequence object, and
implements MutableFeatureHolder. New features are added
to the ViewSequence, rather than to any underlying Sequence
What do people think?
He looked up with big brown eyes. ``They're really only
tiny little A-bombs, honest.''
-- David Brin.