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 | |
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 185 of file cmsHarvester.py.
def cmsHarvester.DBSXMLHandler.__init__ | ( | self, | |
tag_names | |||
) |
Definition at line 218 of file cmsHarvester.py.
def cmsHarvester.DBSXMLHandler.characters | ( | self, | |
content | |||
) |
Definition at line 257 of file cmsHarvester.py.
References cmsHarvester.DBSXMLHandler.current_element(), 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 268 of file cmsHarvester.py.
References cmsHarvester.DBSXMLHandler.results.
def cmsHarvester.DBSXMLHandler.current_element | ( | self | ) |
Definition at line 265 of file cmsHarvester.py.
References cmsHarvester.DBSXMLHandler.element_position.
Referenced by cmsHarvester.DBSXMLHandler.characters(), and cmsHarvester.DBSXMLHandler.endElement().
def cmsHarvester.DBSXMLHandler.endElement | ( | self, | |
name | |||
) |
Definition at line 244 of file cmsHarvester.py.
References mps_alisetup.append, cmsHarvester.DBSXMLHandler.current_element(), cmsHarvester.DBSXMLHandler.current_value, join(), cmsHarvester.DBSXMLHandler.results, and cmsHarvester.DBSXMLHandler.tag_names.
def cmsHarvester.DBSXMLHandler.startElement | ( | self, | |
name, | |||
attrs | |||
) |
Definition at line 225 of file cmsHarvester.py.
cmsHarvester.DBSXMLHandler.current_value |
Definition at line 228 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.endElement().
cmsHarvester.DBSXMLHandler.element_position |
Definition at line 221 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.current_element().
cmsHarvester.DBSXMLHandler.results |
Definition at line 223 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.check_results_validity(), and cmsHarvester.DBSXMLHandler.endElement().
cmsHarvester.DBSXMLHandler.tag_names |
Definition at line 222 of file cmsHarvester.py.
Referenced by cmsHarvester.DBSXMLHandler.characters(), and cmsHarvester.DBSXMLHandler.endElement().