|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.io.AbstractStringExtractor
de.jstacs.io.SparseStringExtractor
public class SparseStringExtractor
This StringExtractor
reads the String
s from a File
as
the user asks for the String
. Instances of this class are sparse
since they do not store an array of String
s internally.
Field Summary | |
---|---|
protected SequenceAnnotationParser |
annotationParser
A parser for the sequence annotation. |
Fields inherited from class de.jstacs.io.AbstractStringExtractor |
---|
annotation, FASTA, ignore, ignorePattern, USUALLY |
Constructor Summary | |
---|---|
SparseStringExtractor(File f)
A constructor that reads the lines from a file. |
|
SparseStringExtractor(File f,
char ignore)
A constructor that reads the lines from a file and ignores those starting with the comment character ignore . |
|
SparseStringExtractor(File f,
char ignore,
String annotation,
SequenceAnnotationParser parser)
A constructor that reads the lines from a file, ignores those starting with the comment character ignore and sets the
annotation of the source to annotation . |
|
SparseStringExtractor(String fName)
A constructor that reads the lines from a file. |
|
SparseStringExtractor(String fName,
char ignore)
A constructor that reads the lines from a file and ignores those starting with the comment character ignore . |
|
SparseStringExtractor(String fName,
char ignore,
SequenceAnnotationParser parser)
A constructor that reads the lines from a file and ignores those starting with the comment character ignore . |
|
SparseStringExtractor(String fName,
char ignore,
String annotation,
SequenceAnnotationParser parser)
A constructor that reads the lines from a file, ignores those starting with the comment character ignore and sets the
annotation of the source to annotation . |
|
SparseStringExtractor(String fName,
SequenceAnnotationParser parser)
A constructor that reads the lines from a file. |
|
SparseStringExtractor(String fName,
String annotation,
SequenceAnnotationParser parser)
A constructor that reads the lines from a file and sets the annotation of the source to annotation . |
Method Summary | |
---|---|
protected void |
finalize()
|
SequenceAnnotation[] |
getCurrentSequenceAnnotations()
Returns the SequenceAnnotation or null if no SequenceAnnotation is available. |
boolean |
hasMoreElements()
|
String |
nextElement()
|
Methods inherited from class de.jstacs.io.AbstractStringExtractor |
---|
getAnnotation |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SequenceAnnotationParser annotationParser
Constructor Detail |
---|
public SparseStringExtractor(String fName) throws IOException, FileNotFoundException
fName
- the name of the File
to be read from
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundSparseStringExtractor(String, char)
public SparseStringExtractor(File f) throws IOException
f
- the File
to be read from
IOException
- if the File
could not be readSparseStringExtractor(File, char)
public SparseStringExtractor(String fName, SequenceAnnotationParser parser) throws IOException, FileNotFoundException
fName
- the name of the File
to be read fromparser
- the SequenceAnnotationParser
for the comment lines
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundSparseStringExtractor(String, char, SequenceAnnotationParser)
public SparseStringExtractor(String fName, char ignore) throws IOException, FileNotFoundException
ignore
.
fName
- the name of the File
to be read fromignore
- the first character of lines that should be treated as
comments
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundSparseStringExtractor(String, char, String, SequenceAnnotationParser)
public SparseStringExtractor(File f, char ignore) throws IOException
ignore
.
f
- the File
to be read fromignore
- the first character of lines that should be treated as
comments
IOException
- if the File
could not be readSparseStringExtractor(File, char, String, SequenceAnnotationParser)
public SparseStringExtractor(String fName, char ignore, SequenceAnnotationParser parser) throws IOException, FileNotFoundException
ignore
.
fName
- the name of the File
to be read fromignore
- the first character of lines that should be treated as
commentsparser
- the SequenceAnnotationParser
for the comment lines
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundSparseStringExtractor(String, char, String, SequenceAnnotationParser)
public SparseStringExtractor(String fName, String annotation, SequenceAnnotationParser parser) throws IOException, FileNotFoundException
annotation
.
fName
- the name of the File
to be read fromannotation
- the annotation for the sourceparser
- the SequenceAnnotationParser
for the comment lines
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundSparseStringExtractor(String, char, String, SequenceAnnotationParser)
public SparseStringExtractor(String fName, char ignore, String annotation, SequenceAnnotationParser parser) throws IOException, FileNotFoundException
ignore
and sets the
annotation of the source to annotation
.
fName
- the name of the File
to be read fromignore
- the first character of lines that should be treated as
commentsannotation
- the annotation for the sourceparser
- the SequenceAnnotationParser
for the comment lines
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be foundAbstractStringExtractor.AbstractStringExtractor(char)
public SparseStringExtractor(File f, char ignore, String annotation, SequenceAnnotationParser parser) throws IOException
ignore
and sets the
annotation of the source to annotation
.
f
- the File
to be read fromignore
- the first character of lines that should be treated as
commentsannotation
- the annotation for the sourceparser
- the SequenceAnnotationParser
for the comment lines
IOException
- if the File
could not be readMethod Detail |
---|
public boolean hasMoreElements()
public String nextElement()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public SequenceAnnotation[] getCurrentSequenceAnnotations()
AbstractStringExtractor
SequenceAnnotation
or null
if no SequenceAnnotation
is available.
getCurrentSequenceAnnotations
in class AbstractStringExtractor
SequenceAnnotation
or null
if no SequenceAnnotation
is available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |