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

Class LIGOMetadata

source code

LIGO Metadata object class. Contains methods for parsing a LIGO lightweight XML file and inserting it into a database, executing and SQL query to retrive data from the database and writing it to a LIGO lightweight XML file

Instance Methods [hide private]
 
__del__(self) source code
 
__init__(self, xmlparser=None, lwtparser=None, ldb=None)
Connects to the database and creates a cursor.
source code
 
add_lfn(self, lfn)
Add an LFN table to a parsed LIGO_LW XML document.
source code
 
insert(self)
Insert the object into the database
source code
 
parse(self, xml)
Parses an XML document into a form read for insertion into the database
source code
 
reset(self)
Clear any existing table
source code
 
select(self, sql)
Execute an SQL select statement and stuff the results into a dictionary.
source code
 
set_dn(self, dn)
Use the domain column in the process table to store the DN
source code
 
xml(self, ilwdchar_to_hex=True)
Convert a table dictionary to LIGO lightweight XML
source code
Method Details [hide private]

__init__(self, xmlparser=None, lwtparser=None, ldb=None)
(Constructor)

source code 

Connects to the database and creates a cursor. Initializes the unique id table for this LIGO lw document.

ldb = LIGOMetadataDatabase object xmlparser = pyRXP XML to tuple parser object lwtparser = LIGOLwParser object (tuple parser)

add_lfn(self, lfn)

source code 

Add an LFN table to a parsed LIGO_LW XML document.

lfn = lfn to be added

parse(self, xml)

source code 

Parses an XML document into a form read for insertion into the database

xml = the xml document to be parsed

select(self, sql)

source code 

Execute an SQL select statement and stuff the results into a dictionary.

sql = the (case sensitve) SQL statment to execute

set_dn(self, dn)

source code 

Use the domain column in the process table to store the DN

dn = dn to be added