public class RichStreamReader extends java.lang.Object implements RichSequenceIterator
Constructor and Description |
---|
RichStreamReader(java.io.BufferedReader reader,
RichSequenceFormat format,
SymbolTokenization symParser,
RichSequenceBuilderFactory sf,
Namespace ns)
Creates a new stream reader on the given reader, which will attempt to read
sequences in the given format, having symbols from the given tokenization, and
pass them to the given factory to be transformed into RichSequence objects in
the given namespace.
|
RichStreamReader(java.io.InputStream is,
RichSequenceFormat format,
SymbolTokenization symParser,
RichSequenceBuilderFactory sf,
Namespace ns)
Creates a new stream reader on the given input stream, which will attempt to read
sequences in the given format, having symbols from the given tokenization, and
pass them to the given factory to be transformed into RichSequence objects in
the given namespace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns whether there are more sequences to iterate over.
|
BioEntry |
nextBioEntry() |
RichSequence |
nextRichSequence() |
Sequence |
nextSequence()
Returns the next sequence in the iterator.
|
public RichStreamReader(java.io.InputStream is, RichSequenceFormat format, SymbolTokenization symParser, RichSequenceBuilderFactory sf, Namespace ns)
is
- the input stream to read fromformat
- the input file formatsymParser
- the tokenizer that understands the sequence symbols in the filesf
- the factory that will build the sequencesns
- the namespace the sequences will be loaded into.public RichStreamReader(java.io.BufferedReader reader, RichSequenceFormat format, SymbolTokenization symParser, RichSequenceBuilderFactory sf, Namespace ns)
reader
- the reader to read fromformat
- the input file formatsymParser
- the tokenizer that understands the sequence symbols in the filesf
- the factory that will build the sequencesns
- the namespace the sequences will be loaded into.public Sequence nextSequence() throws java.util.NoSuchElementException, BioException
nextSequence
in interface SequenceIterator
java.util.NoSuchElementException
- if you call nextSequence when hasNext
returns falseBioException
- if for any reason the sequence could not be retrievedpublic BioEntry nextBioEntry() throws java.util.NoSuchElementException, BioException
nextBioEntry
in interface BioEntryIterator
java.util.NoSuchElementException
BioException
public RichSequence nextRichSequence() throws java.util.NoSuchElementException, BioException
nextRichSequence
in interface RichSequenceIterator
java.util.NoSuchElementException
BioException
public boolean hasNext()
hasNext
in interface SequenceIterator
hasNext
in interface BioEntryIterator