Package gavo :: Package protocols :: Module datalink :: Class DescriptorGenerator
[frames] | no frames]

Class DescriptorGenerator

source code

                   object --+                    
                            |                    
 base.structure.StructureBase --+                
                                |                
                   object --+   |                
                            |   |                
           base.common.Parser --+                
                                |                
base.structure.ParseableStructure --+            
                                    |            
             base.structure.Structure --+        
                                        |        
                           object --+   |        
                                    |   |        
      base.structure.RestrictionMixin --+        
                                        |        
                   rscdef.procdef.ProcDef --+    
                                            |    
                       rscdef.procdef.ProcApp --+
                                                |
                                               DescriptorGenerator

A procedure application for making product descriptors for PUBDIDs

Despite the name, a descriptor generator has to *return* (not yield) a descriptor instance. While this could be anything, it is recommended to derive custom classes from prodocols.datalink.ProductDescrpitor, which exposes essentially the columns from DaCHS' product table as attributes. This is what you get when you don't define a descriptor generator in your datalink core.

The following names are available to the code:

If you made your pubDID using the ``getStandardPubDID`` rowmaker function, and you need no additional logic within the descriptor, the default (//soda#fromStandardPubDID) should do.

If you need to derive custom descriptor classes, you can see the base class under the name ProductDescriptor; there's also FITSProductDescriptor and DatalinkFault in each proc's namespace. If your Descriptor does not actually refer to something in the product table, it is likely that you want to set the descriptor's ``suppressAutoLinks`` attribute to True. This will stop DaCHS from attempting to add automatic #this and #preview links.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods

Inherited from rscdef.procdef.ProcApp: breakCircles, compile, completeElement, getBodySetupCode, getFuncCode, getLateSetupCode, getParSetupCode, getSetupCode, getSetupPars, onElementComplete, validate

Inherited from rscdef.procdef.ProcDef: getCode

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

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

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

Inherited from base.common.Parser: feedEvent

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

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'descriptorGenerator'
hash(x)
  requiredType = 'descriptorGenerator'
hash(x)
  formalArgs = 'pubDID, args'
  additionalNamesForProcs = {'DLFITSProductDescriptor': <class '...

Inherited from rscdef.procdef.ProcApp: attrSeq, managedAttrs

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Class Variable Details

additionalNamesForProcs

Value:
{'DLFITSProductDescriptor': <class 'gavo.protocols.datalink.DLFITSProd\
uctDescriptor'>,
 'DatalinkFault': <class 'gavo.protocols.soda.DatalinkFault'>,
 'FITSProductDescriptor': <class 'gavo.protocols.datalink.FITSProductD\
escriptor'>,
 'ProductDescriptor': <class 'gavo.protocols.datalink.ProductDescripto\
r'>,
 'getFITSDescriptor': <__builtin__.function object>,
...