Package Bio :: Package Mindy :: Module SimpleSeqRecord :: Class FixDocumentBuilder
[hide private]
[frames] | no frames]

Class FixDocumentBuilder

source code

    xml.sax.handler.ContentHandler --+        
                                     |        
   Martel.Dispatch.DispatchHandler --+        
                                     |        
            Martel.Dispatch.Dispatcher --+    
                                         |    
builders.SeqRecord.sequence.BuildSeqRecord --+
                                             |
                                            FixDocumentBuilder

A SAX builder-style class to make a parsed SeqRecord available.

This class does a lot of trickery to make things fit in the SAX framework and still have the flexibility to use a built SeqRecord object.

You shouldn't really need to use this class unless you are doing something really fancy-pants; otherwise, just use the BaseSeqRecordIndexer interfaces.

Instance Methods [hide private]
 
__init__(self, get_ids_callback)
Intialize with a callback function to gets id info from a SeqRecord.
source code
 
end_record(self, tag)
Overrride the builder function to muck with the document attribute.
source code

Inherited from builders.SeqRecord.sequence.BuildSeqRecord: add_dbid, add_dbxref, add_dbxref_dbids, add_description, add_features, add_sequence, start_record

Inherited from Martel.Dispatch.Dispatcher: acquire, characters, endDocument, endElement, get_characters, save_characters, startDocument, startElement, uses_tags

Inherited from xml.sax.handler.ContentHandler: endElementNS, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElementNS, startPrefixMapping

Inherited from Martel.Dispatch.DispatchHandler: get_supported_features, setCharacterSaver

Method Details [hide private]

__init__(self, get_ids_callback)
(Constructor)

source code 

Intialize with a callback function to gets id info from a SeqRecord.

get_ids_callback should be a callable function that will take a SeqRecord object and return a dictionary mapping id names to the valid ids for these names.

Overrides: Martel.Dispatch.DispatchHandler.__init__

end_record(self, tag)

source code 

Overrride the builder function to muck with the document attribute.

Overrides: builders.SeqRecord.sequence.BuildSeqRecord.end_record