| |
- exceptions.RuntimeError(exceptions.StandardError)
-
- FailedObsetUpdate
- obset
- obset_list
class obset |
|
A class for obsets. |
|
Methods defined here:
- __cmp__(self, other)
- Compare two obsets.
If 'other' is a string, assume it is an obset id in the form
ppppp:oo, otherwise 'other' must be an obset object. A 'TypeError'
will be raised if 'other' is neither of these.
- __init__(self, proposal, obset_id=None, version_num='01', data=None)
- The obset object constructor.
The constructor will work with proposal, obset, and version given in
several forms:
- proposal = a list or tuple of form ('ppppp', 'oo'[, 'vv'])
- proposal = a list or tuple of form ('ppppp:oo[:vv]')
- proposal = a list or tuple of form (proposal_object, 'oo'[, 'vv'])
- proposal = a string of form 'ppppp:oo[:vv]'
- proposal = a string or int of form 'ppppp', obset_id = a string of form 'oo',
[version_num = a string of form 'vv']
- proposal = a proposal object, obset_id = a string of form 'oo',
[version_num = a string of form 'vv']
- proposal = another obset object
The version numbers is always optional and defaults to '01'.
An optional data dictionary of obset data may also be
input to the constructor in all cases. Also note, the proposal is not required
to be 5 characters long; it will be left padded with zeros by proposal_util if
it is less than 5 characters long.
- __repr__(self)
- get(self, field)
- Returns the value of 'field'.
The value of 'field' will be retrieved from the PMDB if necessary.
If the field is 'proposal', the proposal object associated with this
obset is returned.
If 'field' is not already in the internal dictionary and is not
found in a relation in the db, None will be returned.
- get_alignments(self)
- Return a list of the alignment objects for this obset.
- get_opmode(self, config)
- Retrieve the opmodes of the input configurations.
- get_proposal(self)
- Return the proposal object for this obset.
- get_qbwindows(self, win_type='ALL')
- Retrieve records from the QBWINDOWS database relation for this
obset.
A nested list of values will be returned. Each inner list will
contain one row from the database with the fields in the
following order:
[<window_type>,<critic_flg>,<window_beg>,<window_end>]
<window_beg> and <window_end> will be returned as
time_util.spss_time objects.
The inner lists will be sorted by window_type as the primary
key. The secondary keys are window_beg and window_end.
The caller can specify one specific window type through the
parameter. If the parameter is not specified, all window types
will be returned.
If no QBWINDOWS records exist for this obset, an empty list is
returned.
- has_field(self, field)
- Check the object for the existence of 'field' in its internal dictionary.
Returns TRUE if it is there, FALSE otherwise.
- has_key(self, field)
- set(self, field, value)
- Set a 'field' to a 'value'.
- update(self)
- Execute a pmdb/update for this obset.
Returns the status flag from the pmdb -update.
Data and other attributes defined here:
- conversion = {'parallel_can': None, 'reacq_tm_nsl': None, 'sunit_id': None, 'target_opp': None}
- conversion_imports = []
- relation = {'parallel_can': 'qbs_obset', 'reacq_tm_nsl': 'qbs_obset', 'sunit_id': 'qsbranching', 'target_opp': 'qbs_obset'}
|
|