Package gavo :: Package svcs :: Module inputdef :: Class InputKey
[frames] | no frames]

Class InputKey

source code

                   object --+                    
                            |                    
 base.structure.StructureBase --+                
                                |                
                   object --+   |                
                            |   |                
           base.common.Parser --+                
                                |                
base.structure.ParseableStructure --+            
                                    |            
             base.structure.Structure --+        
                                        |        
                           object --+   |        
                                    |   |        
                  base.meta.MetaMixin --+        
                                        |        
                 rscdef.column.ColumnBase --+    
                                            |    
                      rscdef.column.ParamBase --+
                                                |
                                               InputKey

A description of a piece of input.

Think of inputKeys as abstractions for input fields in forms, though
they are used for services not actually exposing HTML forms as well.

Some of the DDL-type attributes (e.g., references) only make sense here
if columns are being defined from the InputKey.

Properties evaluated:

* defaultForForm -- a value entered into form fields by default
  (be stingy with those; while it's nice to not have to set things
  presumably right for almost everyone, having to delete stuff
  you don't want over and over is really annoying).
* adaptToRenderer -- a true boolean literal here causes the param
  to be adapted for the renderer (e.g., float could become vizierexpr-float).
        You'll usually not want this, because the expressions are 
        generally evaluated by the database, and the condDescs do the
        adaptation themselves.  This is mainly for rare situations like
        file uploads in custom cores.
* notForRenderer -- a renderer name for which this inputKey is suppressed
* onlyForRenderer -- a renderer name for which this inputKey will be 
  preserved; it will be dropped for all others.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
completeElement(self, ctx) source code
 
onElementComplete(self) source code
 
onParentComplete(self) source code
 
validateValue(self, literal)
raises a ValidationError if literal cannot be deserialised into an acceptable value for self.
source code
 
computeCoreArgValue(self, inputList)
parses some input for this input key.
source code
 
clearProperty(self, name) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
setProperty(self, name, value) source code

Inherited from rscdef.column.ParamBase: __repr__, expand, getStringValue, set

Inherited from rscdef.column.ColumnBase: asInfoDict, getDDL, getDisplayHintAsString, getLabel, isEnumerated, isIndexed, isPrimary, setMetaParent, validate

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, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from base.meta.MetaMixin: addMeta, buildRepr, copyMetaFrom, delMeta, getAllMetaPairs, getMeta, getMetaKeys, getMetaParent, isEmpty, iterMeta, keys, makeOriginal, setMeta, traverse

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

Class Methods
 
fromColumn(cls, column, **kwargs)
returns an InputKey for query input to column.
source code

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'inputKey'
a sentinel for all kinds of undefined values.
  metaModel = None
hash(x)
  attrSeq = [<gavo.base.meta.MetaAttribute object>, <gavo.rscdef...
  managedAttrs = {'content_': <gavo.base.structure.DataContent o...

Inherited from rscdef.column.ParamBase: nullLiteral, unprocessedTypes

Inherited from rscdef.column.ColumnBase: restrictedMode

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from rscdef.column.ParamBase: content_, value

Inherited from object: __class__

Method Details

completeElement(self, ctx)

source code 
Overrides: base.structure.Structure.completeElement

onElementComplete(self)

source code 
Overrides: base.structure.Structure.onElementComplete

onParentComplete(self)

source code 
Overrides: rscdef.column.ColumnBase.onParentComplete

validateValue(self, literal)

source code 

raises a ValidationError if literal cannot be deserialised into an acceptable value for self.

Overrides: rscdef.column.ColumnBase.validateValue

computeCoreArgValue(self, inputList)

source code 

parses some input for this input key.

This takes into account multiplicities, type conversions, and all the remaining horrors.

It will return a list or a single value, depending on multiplity.

clearProperty(self, name)

source code 
Overrides: rscdef.column.ColumnBase.clearProperty

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

source code 
Overrides: rscdef.column.ColumnBase.getProperty

hasProperty(self, name)

source code 
Overrides: rscdef.column.ColumnBase.hasProperty

setProperty(self, name, value)

source code 
Overrides: rscdef.column.ColumnBase.setProperty

Class Variable Details

attrSeq

Value:
[<gavo.base.meta.MetaAttribute object>,
 <gavo.rscdef.column.ParamNameAttribute object>,
 <gavo.rscdef.column.TypeNameAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.NWUnicodeAttribute object>,
 <gavo.rscdef.column.TableManagedAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
...

managedAttrs

Value:
{'content_': <gavo.base.structure.DataContent object>,
 'description': <gavo.base.attrdef.NWUnicodeAttribute object>,
 'displayHint': <gavo.rscdef.column.DisplayHintAttribute object>,
 'dmRoles': <gavo.rscdef.column.DMRolesAttribute object>,
 'fixup': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'inputUnit': <gavo.base.attrdef.UnicodeAttribute object>,
 'meta': <gavo.base.meta.MetaAttribute object>,
...