Package org.biojava.bio.program.ssbind
Class SeqSimilarityAdapter
- java.lang.Object
-
- org.biojava.bio.program.ssbind.SeqSimilarityAdapter
-
- All Implemented Interfaces:
ContentHandler
public class SeqSimilarityAdapter extends Object implements ContentHandler
ASeqSimilarityAdapter
converts SAX events into method calls on aSearchContentHandler
implementation. The SAX events should describe elements conforming to the BioJava BlastLikeDataSetCollection DTD. ABlastLikeSearchBuilder
is supplied, implementing theSearchContentHandler
interface, which will createSeqSimilaritySearchResult
s from the stream.- Since:
- 1.2
- Author:
- Keith James
-
-
Constructor Summary
Constructors Constructor Description SeqSimilarityAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int end)
void
endDocument()
void
endElement(String nsURI, String localName, String qName)
void
endPrefixMapping(String prefix)
SearchContentHandler
getSearchContentHandler()
getSearchContentHandler
gets the handler which will recieve the method calls generated by the adapter.void
ignorableWhitespace(char[] ch, int start, int end)
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
setSearchContentHandler(SearchContentHandler scHandler)
setSearchContentHandler
sets the handler which will recieve the method calls generated by the adapter.void
skippedEntity(String name)
void
startDocument()
void
startElement(String nsURI, String localName, String qName, Attributes attrs)
void
startPrefixMapping(String prefix, String uri)
-
-
-
Constructor Detail
-
SeqSimilarityAdapter
public SeqSimilarityAdapter()
-
-
Method Detail
-
getSearchContentHandler
public SearchContentHandler getSearchContentHandler()
getSearchContentHandler
gets the handler which will recieve the method calls generated by the adapter.- Returns:
- a
SearchContentHandler
.
-
setSearchContentHandler
public void setSearchContentHandler(SearchContentHandler scHandler)
setSearchContentHandler
sets the handler which will recieve the method calls generated by the adapter.- Parameters:
scHandler
- aSearchContentHandler
.
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int end) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int end) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String nsURI, String localName, String qName, Attributes attrs) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
public void endElement(String nsURI, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
-