Package biana :: Package BianaParser :: Module biopaxLevel2Parser :: Class BiopaxLevel2Parser :: Class BiopaxLevel2Handler
[hide private]
[frames] | no frames]

Class BiopaxLevel2Handler

source code


Class to handle content in Biopax Level2 XML files

Instance Methods [hide private]
 
_identity(a) source code
 
_entrez_funct(a) source code
 
get_biana_data_type(self, type) source code
 
__init__(self) source code
 
_get_cross_ref(self, xref_id) source code
 
_get_link(self, xref_id) source code
 
startDocument(self)
Receive notification of the beginning of a document.
source code
 
endDocument(self)
Receive notification of the end of a document.
source code
 
startElement(self, name, attrs)
Signals the start of an element in non-namespace mode.
source code
 
endElement(self, name)
Signals the end of an element in non-namespace mode.
source code
 
characters(self, text)
Receive notification of character data.
source code
 
toBiana(self) source code

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

Class Variables [hide private]
  datatype_operations = {"uniprot": _identity, "ncbi_taxonomy": ...
  biopax_objects_dict = {'bp:biochemicalreaction': <class 'biana...
Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: xml.sax.handler.ContentHandler.__init__

startDocument(self)

source code 

Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).

Overrides: xml.sax.handler.ContentHandler.startDocument
(inherited documentation)

endDocument(self)

source code 

Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Overrides: xml.sax.handler.ContentHandler.endDocument
(inherited documentation)

startElement(self, name, attrs)

source code 

Signals the start of an element in non-namespace mode.

The name parameter contains the raw XML 1.0 name of the element type as a string and the attrs parameter holds an instance of the Attributes class containing the attributes of the element.

Overrides: xml.sax.handler.ContentHandler.startElement
(inherited documentation)

endElement(self, name)

source code 

Signals the end of an element in non-namespace mode.

The name parameter contains the name of the element type, just as with the startElement event.

Overrides: xml.sax.handler.ContentHandler.endElement
(inherited documentation)

characters(self, text)

source code 

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

Overrides: xml.sax.handler.ContentHandler.characters
(inherited documentation)

Class Variable Details [hide private]

datatype_operations

Value:
{"uniprot": _identity, "ncbi_taxonomy": _identity, "tigr": _identity, \
"reactome": _identity, "chebi": _identity, "go": _identity, "pubchem c\
ompound": _identity, "glycan": _identity, "compound": _identity, "entr\
ez": _entrez_funct}

biopax_objects_dict

Value:
{'bp:biochemicalreaction': <class 'biana.BianaParser.biopaxLevel2Parse\
r.BiopaxBiochemicalReaction'>,
 'bp:biosource': <class 'biana.BianaParser.biopaxLevel2Parser.BiopaxBi\
oSource'>,
 'bp:catalysis': <class 'biana.BianaParser.biopaxLevel2Parser.BiopaxCa\
talysis'>,
 'bp:complex': <class 'biana.BianaParser.biopaxLevel2Parser.BiopaxComp\
lex'>,
...