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 ContentHandlergetContentHandler()correct this laterDTDHandlergetDTDHandler()EntityResolvergetEntityResolver()This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries.ErrorHandlergetErrorHandler()booleangetFeature(String name)ObjectgetProperty(String name)voidparse(String systemId)voidparse(InputSource is)voidsetContentHandler(ContentHandler handler)this sets the ContentHandler that receives SAX events from the internal Blast XML parser which is the actual ContentHandler.voidsetDTDHandler(DTDHandler handler)voidsetEntityResolver(EntityResolver resolver)This class has an EntityResolver that resolves the public ID specifying the NCBI DTDs to resource files within the BioJava libraries.voidsetErrorHandler(ErrorHandler handler)voidsetFeature(String key, boolean value)by default, we set the parser to non-validating.voidsetProperty(String key, Object value)
-
-
-
Constructor Detail
-
BlastXMLParserFacade
public BlastXMLParserFacade() throws BioException
- Throws:
BioException
-
-
Method Detail
-
getContentHandler
public ContentHandler getContentHandler()
correct this later- Specified by:
getContentHandlerin interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandlerin 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:
getEntityResolverin interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandlerin interfaceXMLReader
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
parse
public void parse(InputSource is) throws IOException, SAXException
- Specified by:
parsein interfaceXMLReader- Throws:
IOExceptionSAXException
-
parse
public void parse(String systemId) throws IOException, SAXException
- Specified by:
parsein interfaceXMLReader- Throws:
IOExceptionSAXException
-
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:
setContentHandlerin interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandlerin 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:
setEntityResolverin interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandlerin 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:
setFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setProperty
public void setProperty(String key, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
-