Class BlastXMLParserFacade
- java.lang.Object
-
- org.biojava.bio.program.sax.blastxml.BlastXMLParserFacade
-
- All Implemented Interfaces:
XMLReader
public class BlastXMLParserFacade extends Object implements XMLReader
A facade class that wraps the NCBI Blast XML parsing framework in a more user-friendly form. It is identical to BlastlikeSAXParser in use.- Since:
- 1.3
- Author:
- David Huen
-
-
Constructor Summary
Constructors Constructor Description BlastXMLParserFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentHandler
getContentHandler()
correct this laterDTDHandler
getDTDHandler()
EntityResolver
getEntityResolver()
This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries.ErrorHandler
getErrorHandler()
boolean
getFeature(String name)
Object
getProperty(String name)
void
parse(String systemId)
void
parse(InputSource is)
void
setContentHandler(ContentHandler handler)
this sets the ContentHandler that receives SAX events from the internal Blast XML parser which is the actual ContentHandler.void
setDTDHandler(DTDHandler handler)
void
setEntityResolver(EntityResolver resolver)
This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries.void
setErrorHandler(ErrorHandler handler)
void
setFeature(String key, boolean value)
by default, we set the parser to non-validating.void
setProperty(String key, Object value)
-
-
-
Constructor Detail
-
BlastXMLParserFacade
public BlastXMLParserFacade() throws BioException
- Throws:
BioException
-
-
Method Detail
-
getContentHandler
public ContentHandler getContentHandler()
correct this later- Specified by:
getContentHandler
in interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandler
in interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries. This call will return that resolver. It you should set your own resolver, ensure you resolve that URN yourself or the parser will blow up on you!.- Specified by:
getEntityResolver
in interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandler
in interfaceXMLReader
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
parse
public void parse(InputSource is) throws IOException, SAXException
- Specified by:
parse
in interfaceXMLReader
- Throws:
IOException
SAXException
-
parse
public void parse(String systemId) throws IOException, SAXException
- Specified by:
parse
in interfaceXMLReader
- Throws:
IOException
SAXException
-
setContentHandler
public void setContentHandler(ContentHandler handler)
this sets the ContentHandler that receives SAX events from the internal Blast XML parser which is the actual ContentHandler. It will not change the internal Blast XML parser.- Specified by:
setContentHandler
in interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandler
in interfaceXMLReader
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries. This call will return that resolver. It you should set your own resolver, ensure you resolve that URN yourself or the parser will blow up on you!.- Specified by:
setEntityResolver
in interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler
in interfaceXMLReader
-
setFeature
public void setFeature(String key, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
by default, we set the parser to non-validating. change it if you wish/dare! The parser is also set to be namespace aware. DO NOT CHANGE THAT!!!- Specified by:
setFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setProperty
public void setProperty(String key, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
-