A context object for writing VOTables.
The constructor arguments work as keyword arguments to
``getAsVOTable``. Some other high-level functions accept finished
contexts.
This class provides management for unique ID attributes, the value
mapper registry, and possibly additional services for writing
VOTables.
There's also an attribute produceVODML that will automatically be set
for VOTable 1.4; you can set it to true manually, but the resulting
VOTables will probably be invalid.
If VO-DML processing is enabled, the context also manages models
declared; that's the modelsUsed dictionary, mapping prefix -> dm.Model
instances
|
__init__(self,
mfRegistry=<gavo.utils.serializers.ValueMapperFactoryRegistry object>,
tablecoding=' binary ' ,
version=None,
acquireSamples=True,
suppressNamespace=False,
overflowElement=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
addVODMLPrefix(self,
prefix)
arranges the DM with prefix to be included in modelsUsed. |
source code
|
|
|
|
|
|
|
|
|
|
|
getEnclosingContainer(self)
returns the innermost container element the builders have declared. |
source code
|
|
|
activeContainer(*args,
**kwds)
a context manager to be called by VOTable builders when they open a
new TABLE or RESOURCE. |
source code
|
|
|
|
|
pushRefFor(self,
rdEl,
refVal)
orders refVal to be set as ref on rdEl's VOTable representation if
such a thing is being serialised. |
source code
|
|
|
addID(self,
rdEl,
votEl)
adds an ID attribute to votEl if rdEl has an id managed by self. |
source code
|
|
Inherited from utils.codetricks.IdManagerMixin :
cloneFrom ,
getForId ,
getIdFor ,
getOrMakeIdFor ,
makeIdFor
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|