Package gavo :: Package rscdef :: Module column :: Class Param
[frames] | no frames]

Class Param

source code

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

A table parameter.

This is like a column, except that it conceptually applies to all rows in the table. In VOTables, params will be rendered as PARAMs.

While we validate the values passed using the DC default parsers, at least the VOTable params will be literal copies of the string passed in.

You can obtain a parsed value from the value attribute.

Null value handling is a bit tricky with params. An empty param (like <param name="x"/>) is always NULL (None in python). In order to allow setting NULL even where syntactially something has to stand, we also turn any __NULL__ to None.

For floats, NaN will also yield NULLs. For integers, you can also use

<param name="x" type="integer"><values nullLiteral="-1"/>-1</params>

For arrays, floats, and strings, the interpretation of values is undefined. Following VOTable practice, we do not tell empty strings and NULLs apart; for internal usage, there is a little hack: __EMPTY__ as literal does set an empty string. This is to allow defaulting of empty strings -- in VOTables, these cannot be distinguished from "true" NULLs.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
validate(self) source code
 
set(self, val)
sets the value of the parameter.
source code
 
getAnnotation(self, roleName, container, instance)
returns a dm annotation for this param (i.e., a paramRef).
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 ParamBase: __repr__, completeElement, expand, getStringValue, onElementComplete

Inherited from ColumnBase: asInfoDict, getDDL, getDisplayHintAsString, getLabel, isEnumerated, isIndexed, isPrimary, onParentComplete, setMetaParent, validateValue

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

Inherited from base.structure.StructureBase: fromStructure

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

Inherited from ParamBase: nullLiteral, unprocessedTypes

Inherited from ColumnBase: restrictedMode

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from ParamBase: content_, value

Inherited from object: __class__

Method Details

validate(self)

source code 
Overrides: base.structure.Structure.validate

set(self, val)

source code 

sets the value of the parameter.

Macros will be expanded if the parent object supports macro expansion.

Overrides: ParamBase.set

clearProperty(self, name)

source code 
Overrides: ColumnBase.clearProperty

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

source code 
Overrides: ColumnBase.getProperty

hasProperty(self, name)

source code 
Overrides: ColumnBase.hasProperty

setProperty(self, name, value)

source code 
Overrides: 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>,
 'hidden': <gavo.base.attrdef.BooleanAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'meta': <gavo.base.meta.MetaAttribute object>,
...