Helper class: DBSXMLHandler. More...
Public Member Functions | |
def | __init__ (self, tag_names) |
def | characters (self, content) |
def | check_results_validity (self) |
def | current_element (self) |
def | endElement (self, name) |
def | startElement (self, name, attrs) |
Public Attributes | |
current_value | |
element_position | |
results | |
tag_names | |
Static Public Attributes | |
mapping | |
Helper class: DBSXMLHandler.
XML handler class to parse DBS results. The tricky thing here is that older DBS versions (2.0.5 and earlier) return results in a different XML format than newer versions. Previously the result values were returned as attributes to the `result' element. The new approach returns result values as contents of named elements. The old approach is handled directly in startElement(), the new approach in characters(). NOTE: All results are returned in the form of string values of course!
Definition at line 187 of file cmsHarvester.py.
def cmsHarvester.DBSXMLHandler.__init__ | ( | self, | |
tag_names | |||
) |
Definition at line 220 of file cmsHarvester.py.
def cmsHarvester.DBSXMLHandler.characters | ( | self, | |
content | |||
) |
Definition at line 259 of file cmsHarvester.py.
References mps_setup.append, cmsHarvester.DBSXMLHandler.current_element(), cmsHarvester.DBSXMLHandler.current_value, and cmsHarvester.DBSXMLHandler.tag_names.
def cmsHarvester.DBSXMLHandler.check_results_validity | ( | self | ) |
Make sure that all results arrays have equal length. We should have received complete rows from DBS. I.e. all results arrays in the handler should be of equal length.
Definition at line 270 of file cmsHarvester.py.
References relativeConstraints.keys, and cmsHarvester.DBSXMLHandler.results.
def cmsHarvester.DBSXMLHandler.current_element | ( | self | ) |
Definition at line 267 of file cmsHarvester.py.
References cmsHarvester.DBSXMLHandler.element_position.
Referenced by cmsHarvester.DBSXMLHandler.characters(), and cmsHarvester.DBSXMLHandler.endElement().
def cmsHarvester.DBSXMLHandler.endElement | ( | self, | |
name | |||
) |
def cmsHarvester.DBSXMLHandler.startElement | ( | self, | |
name, | |||
attrs | |||
) |
Definition at line 227 of file cmsHarvester.py.
References mps_setup.append, and cmsHarvester.DBSXMLHandler.element_position.
cmsHarvester.DBSXMLHandler.current_value |
Definition at line 230 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.characters(), and cmsHarvester.DBSXMLHandler.endElement().
cmsHarvester.DBSXMLHandler.element_position |
Definition at line 223 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.current_element(), cmsHarvester.DBSXMLHandler.endElement(), and cmsHarvester.DBSXMLHandler.startElement().
|
static |
Definition at line 208 of file cmsHarvester.py.
Referenced by progressbar.FormatLabel.update().
cmsHarvester.DBSXMLHandler.results |
Definition at line 225 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.check_results_validity(), and cmsHarvester.DBSXMLHandler.endElement().
cmsHarvester.DBSXMLHandler.tag_names |
Definition at line 224 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.characters(), and cmsHarvester.DBSXMLHandler.endElement().