Package glue :: Module ldbd :: Class LIGOLwParser
[hide private]
[frames] | no frames]

Class LIGOLwParser

source code

Provides methods for parsing the data from a LIGO lightweight XML file parsed with pyRXP into a dictionary

Instance Methods [hide private]
 
__del__(self) source code
 
__ilwdchar(self, istr)
If the ilwd:char field contains octal data, it is translated to a binary string and returned.
source code
 
__init__(self)
Initializes a LIGO lightweight XML parser with the necessary regular expressions and function for tuple translation
source code
 
__lstring(self, lstr)
Returns a parsed lstring by stripping out and instances of the escaped delimiter.
source code
 
parsetuple(self, xmltuple)
Parse an XML tuple returned by pyRXP into a dictionary of LIGO metadata elements.
source code
Method Details [hide private]

__ilwdchar(self, istr)

source code 

If the ilwd:char field contains octal data, it is translated to a binary string and returned. Otherwise a lookup is done in the unique id dictionary and a binary string containing the correct unique id is returned.

__lstring(self, lstr)

source code 

Returns a parsed lstring by stripping out and instances of the escaped delimiter. Sometimes the raw lstring has whitespace and a double quote at the beginning or end. If present, these are removed.

parsetuple(self, xmltuple)

source code 

Parse an XML tuple returned by pyRXP into a dictionary of LIGO metadata elements. The dictionary contains one entry for each table found in the XML tuple.