Package gavo :: Package protocols :: Module products :: Class ProductCore
[frames] | no frames]

Class ProductCore

source code

                   object --+                        
                            |                        
 base.structure.StructureBase --+                    
                                |                    
                   object --+   |                    
                            |   |                    
           base.common.Parser --+                    
                                |                    
base.structure.ParseableStructure --+                
                                    |                
             base.structure.Structure --+            
                                        |            
                           svcs.core.Core --+        
                                            |        
            svcs.standardcores.TableBasedCore --+    
                                                |    
                        svcs.standardcores.DBCore --+
                                                    |
                                                   ProductCore

A core retrieving paths and/or data from the product table.

You will not usually mention this core in your RDs. It is mainly used internally to serve /getproduct queries.

It is instanciated from within //products.rd and relies on tables within that RD.

The input data consists of accref; you can use the string form of RAccrefs, and if you renderer wants, it can pass in ready-made RAccrefs. You can pass accrefs in through both an accref param and table rows.

The accref param is the normal way if you just want to retrieve a single image, the table case is for building tar files and such. There is one core instance in //products for each case.

The core returns a list of instances of a subclass of ProductBase above.

This core and its supporting machinery handles all the fancy product functionality (user autorisation, cutouts, ...).

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
run(self, service, inputTable, queryMeta)
returns a list of {"soruce": product} dicts for products matching the inputTable.
source code
 
clearProperty(self, name) source code
 
getFullId(self) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
resolveName(instance, context, id) source code
 
setProperty(self, name, value) source code

Inherited from svcs.standardcores.DBCore: getQueryCols, wantsTableWidget

Inherited from svcs.standardcores.TableBasedCore: adaptForRenderer, completeElement

Inherited from svcs.core.Core: __init__, __repr__, __str__, initialize, makeUserDoc

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

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

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'productCore'
a sentinel for all kinds of undefined values.

Inherited from svcs.standardcores.DBCore: attrSeq, managedAttrs

Inherited from svcs.core.Core: inputTableXML, outputTableXML

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  rd

Inherited from object: __class__

Method Details

run(self, service, inputTable, queryMeta)

source code 

returns a list of {"soruce": product} dicts for products matching the inputTable.

Overrides: svcs.core.Core.run

clearProperty(self, name)

source code 
Overrides: svcs.core.Core.clearProperty

getFullId(self)

source code 
Overrides: svcs.core.Core.getFullId

getProperty(self, name, default=<Undefined>)

source code 
Overrides: svcs.core.Core.getProperty

hasProperty(self, name)

source code 
Overrides: svcs.core.Core.hasProperty

resolveName(instance, context, id)

source code 
Overrides: svcs.standardcores.TableBasedCore.resolveName

setProperty(self, name, value)

source code 
Overrides: svcs.core.Core.setProperty

Property Details

rd

Get Method:
unreachable._getRD(self)