Trees | Index | Help |
---|
Package Bio :: Module ParserSupport :: Class EventGenerator |
|
ContentHandler
--+
|
EventGenerator
Handler to generate events associated with a Martel parsed file.
This acts like a normal SAX handler, and accepts XML generated by Martel during parsing. These events are then converted into 'Biopython events', which can then be caught by a standard biopython consumerMethod Summary | |
---|---|
Initialize to begin catching and firing off events. | |
Extract the information if we are interested in it. | |
Make sure all of our information has been passed. | |
Send the information to the consumer. | |
Determine if we should collect characters from this tag. | |
Call the callback function with the info with the given name. | |
Inherited from ContentHandler | |
Signals the end of an element in namespace mode. | |
End the scope of a prefix-URI mapping. | |
Receive notification of ignorable whitespace in element content. | |
Receive notification of a processing instruction. | |
Called by the parser to give the application a locator for locating the origin of document events. | |
Receive notification of a skipped entity. | |
Receive notification of the beginning of a document. | |
Signals the start of an element in namespace mode. | |
Begin the scope of a prefix-URI Namespace mapping. |
Method Details |
---|
__init__(self,
consumer,
interest_tags,
callback_finalizer=None,
exempt_tags=[])
|
characters(self, content)Extract the information if we are interested in it.
|
endDocument(self)Make sure all of our information has been passed. This just flushes out any stored tags that need to be passed.
|
endElement(self, name)Send the information to the consumer. Once we've got the end element we've collected up all of the character information we need, and we need to send this on to the consumer to do something with it. We have a delay of one tag on doing this, so that we can collect all of the info from multiple calls to the same element at once.
|
startElement(self, name, attrs)Determine if we should collect characters from this tag.
|
_make_callback(self, name)Call the callback function with the info with the given name. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Mon Aug 27 16:12:13 2007 | http://epydoc.sf.net |