Package gavo :: Package svcs :: Module service :: Class SvcResult
[frames] | no frames]

Class SvcResult

source code

            object --+    
                     |    
nevow.rend.DataFactory --+
                         |
                        SvcResult

A nevow.IContainer that has the result and also makes the input dataset accessible.

It is constructed with an InMemoryTable instance coreResult, a table instance inputTable, the current querymeta, and a service instance.

If a service is defined, SvcResult adapts coreResult to the columns defined by the service (getCurOutputFields).

Original currently either is an InMemory table, in which case it gets adapted to what the service expects, or a data.Data instance (or something else; but few renderers will be able to handle "something else"), which is left alone.

SvcResult also makes queryMeta, inputTable and the service available. This should give renderers access to basically all the information they need. The resultmeta data item collects some of those.

SvcResult objects must be able to fall back to sensible behaviour without a service. This may be necessary in error handling.

Instance Methods
 
__init__(self, coreResult, inputTable, queryMeta, service=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
data_resultmeta(self, ctx, data) source code
 
data_inputRec(self, ctx, data) source code
 
data_table(self, ctx, data) source code
 
data_tableWithRole(self, role)
returns the table with role.
source code
 
getParam(self, paramName)
returns getParam of the core result or that of its primary table.
source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from nevow.rend.DataFactory: __providedBy__, child

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __implemented__ = <implementedBy gavo.svcs.service.SvcResult>
Properties

Inherited from object: __class__

Method Details

__init__(self, coreResult, inputTable, queryMeta, service=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

data_tableWithRole(self, role)

source code 

returns the table with role.

If no such table is available, this will return an empty string.

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

Overrides: nevow.rend.DataFactory.__provides__