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

Module service

source code

Services, i.e. combinations of a core and at least one renderer.

A Service is something that receives some sort of structured data (typically, a nevow context, processes it into input data using a grammar (default is the contextgrammar), pipes it through a core to receive a data set and optionally tinkers with that data set.

Classes
  PreparsedInput
a sentinel class signalling to the service that its input already is parsed.
  SvcResult
A nevow.IContainer that has the result and also makes the input dataset accessible.
  Publication
A specification of how a service should be published.
  CustomPageFunction
An abstract base for nevow.rend.Page-related functions on services.
  CustomRF
A custom render function for a service.
  CustomDF
A custom data function for a service.
  CoreAttribute
  Service
A service definition.
Functions
 
adaptTable(origTable, newColumns)
returns a Data instance created from origTable with columns taken from newColumns.
source code
 
getDALIServiceKeys(*args)
returns a list of the service keys defined in //pql#DALIPars.
source code
Variables
  __package__ = 'gavo.svcs'
Function Details

adaptTable(origTable, newColumns)

source code 

returns a Data instance created from origTable with columns taken from newColumns.

The adaptation works like this:

(1) if names and units of newColumns are a subset of origTable.columns, return a table with the rows from origTable and the columns from newColumns.

(1a) if origTable has a noPostprocess attribute, proceed to (4)

(2) if names of newColumns are a subset of origTable.columns match but one or more units don't, set up a conversion routine and create new rows, combining them with newColumns to the result.

(3) else raise an error.

(4) Finally, stick the whole thing into a data container.

This stinks. I'm plotting to do away with it.

getDALIServiceKeys(*args)

source code 

returns a list of the service keys defined in //pql#DALIPars.

This is always the same object, so if you really have to change anything in here, be sure to make copies before touching either the list or the items.

Decorators:
  • @utils.memoized