|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
nct.service.homology.BlastXMLFileFilterInputStream
public class BlastXMLFileFilterInputStream
This class extends a FilterInputStream
and is used to
filter out the extra xml version and DOCTYPE tags that come in Blast
"XML" files for multiple queries and wraps the entire document in
blast_aggregate tags. The result is an InputStream
that is well formed XML. This class be used in place of a
FileInputStream
as follows.
InputStream is = new BlastXMLFileFilterInputStream(blastFileName, true); // blast parser setup - see Biojava in Anger parser.parse(new InputSource(is));
Field Summary | |
---|---|
static java.lang.String |
doctypeRegEx
The string defining the regular expression used to identify the DOCTYPE tags in the Blast ouptput. |
protected boolean |
keepFirst
Whether or not to keep the first instances of xmlRegEx and doctypeRegEx. |
static java.lang.String |
wrappingTag
The tag used to wrap the multiple BlastOutput sections. |
static java.lang.String |
xmlRegEx
The string defining the regular expression used to identify the xml version tags in the Blast ouptput. |
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
BlastXMLFileFilterInputStream(java.io.InputStream ins,
boolean keepFirst)
Constructor. |
|
BlastXMLFileFilterInputStream(java.lang.String fileName,
boolean keepFirst)
Constructor. |
Method Summary |
---|
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String wrappingTag
public static java.lang.String xmlRegEx
public static java.lang.String doctypeRegEx
protected boolean keepFirst
Constructor Detail |
---|
public BlastXMLFileFilterInputStream(java.lang.String fileName, boolean keepFirst) throws java.io.IOException
fileName
- The XML file name that needs to be processed.keepFirst
- Whether or not to keep the first instance of
the doctype and xml version declarations.
java.io.IOException
public BlastXMLFileFilterInputStream(java.io.InputStream ins, boolean keepFirst) throws java.io.IOException
ins
- The input stream of the XML file that needs to be
processed.keepFirst
- Whether or not to keep the first instance of
the doctype and xml version declarations.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |