Package gavo :: Package stc :: Module dm :: Class STCSpec
[frames] | no frames]

Class STCSpec

source code

             object --+        
                      |        
utils.autonode.AutoNode --+    
                          |    
             common.ASTNode --+
                              |
                             STCSpec

is an STC specification, i.e., the root of an STC tree.

Nested Classes

Inherited from utils.autonode.AutoNode: __metaclass__

Instance Methods
 
buildIdMap(self) source code
 
polish(self)
does global fixups when parsing is finished.
source code
 
binarize(self)
returns self with any compound present brought to a binary tree.
source code
 
debinarize(self)
returns self with any compound present brought to a binary tree.
source code
 
getColRefs(self)
returns a list of column references embedded in this AST.
source code
 
stripUnits(self)
removes all unit specifications from this AST.
source code
 
__init__(self, areas=(), astroSystem=None, freq=None, freqAs=(), id=None, place=None, redshift=None, redshiftAs=(), systems=(), time=None, timeAs=(), ucd=None, velocity=None, velocityAs=())
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from common.ASTNode: __eq__, __hash__, __ne__, ensureId

Inherited from utils.autonode.AutoNode: __repr__, change, iterAttributes, iterChildren, iterNodeChildren, iterNodes

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

Class Methods

Inherited from utils.autonode.AutoNode: cloneFrom

Class Variables

Inherited from common.ASTNode: inexactAttrs

Properties
  sys

Inherited from object: __class__

Method Details

polish(self)

source code 

does global fixups when parsing is finished.

This method has to be called after the element is complete. The standard parsers do this.

For convenience, it returns the instance itself.

binarize(self)

source code 

returns self with any compound present brought to a binary tree.

This will return self if nothing needs to change.

debinarize(self)

source code 

returns self with any compound present brought to a binary tree.

This will return self if nothing needs to change.

stripUnits(self)

source code 

removes all unit specifications from this AST.

This is intended for non-standalone STC, e.g., in VOTables, where external unit specifications are present. Removing the units prevents "bleeding out" of conflicting in-STC specifications (that mostly enter through defaulting).

This ignores the immutability of nodes and is in general a major pain.

__init__(self, areas=(), astroSystem=None, freq=None, freqAs=(), id=None, place=None, redshift=None, redshiftAs=(), systems=(), time=None, timeAs=(), ucd=None, velocity=None, velocityAs=())
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Property Details

sys

Get Method:
unreachable.sys(self)