Resource#
- class astropy.io.votable.tree.Resource(name=None, ID=None, utype=None, type='results', id=None, config=None, pos=None, **kwargs)[source]#
Bases:
Element,_IDProperty,_NameProperty,_UtypeProperty,_DescriptionPropertyRESOURCE element: Groups TABLE and RESOURCE elements.
The keyword arguments correspond to setting members of the same name, documented below.
Attributes Summary
A list of coordinate system definitions (COOSYS elements) for the RESOURCE.
Dictionary of extra attributes of the RESOURCE element.
A list of groups.
A list of informational parameters (key-value pairs) for the resource.
A list of links (pointers to other documents or servers through a URI) for the resource.
Returns the MIVOT block instance.
A list of parameters (constant-valued columns) for the resource.
A list of nested resources inside this resource.
A list of tables in the resource.
A list of time system definitions (TIMESYS elements) for the RESOURCE.
The type of the resource [required].
Methods Summary
Recursively iterates over all the COOSYS elements in the resource and nested resources.
Recursively iterates over all FIELD and PARAM elements in the resource, its tables and nested resources.
Recursively iterates over all the INFO elements in the resource and nested resources.
Recursively iterates over all tables in the resource and nested resources.
Recursively iterates over all the TIMESYS elements in the resource and nested resources.
parse(votable, iterator, config)For internal use.
to_xml(w, **kwargs)For internal use.
Attributes Documentation
- coordinate_systems#
A list of coordinate system definitions (COOSYS elements) for the RESOURCE. Must contain only
CooSysobjects.
- extra_attributes#
Dictionary of extra attributes of the RESOURCE element.
This is dictionary of string keys to string values containing any extra attributes of the RESOURCE element that are not defined in the specification. The specification explicitly allows for extra attributes here, but nowhere else.
- groups#
A list of groups.
- infos#
A list of informational parameters (key-value pairs) for the resource. Must only contain
Infoobjects.
- links#
A list of links (pointers to other documents or servers through a URI) for the resource. Must contain only
Linkobjects.
- mivot_block#
Returns the MIVOT block instance. If the host resource is of type results, it is taken from the first child resource with a MIVOT block, if any. Otherwise, it is taken from the host resource.
- params#
A list of parameters (constant-valued columns) for the resource. Must contain only
Paramobjects.
- tables#
A list of tables in the resource. Must contain only
TableElementobjects.
- time_systems#
A list of time system definitions (TIMESYS elements) for the RESOURCE. Must contain only
TimeSysobjects.
- type#
The type of the resource [required].
Must be either:
‘results’: This resource contains actual result values (default)
‘meta’: This resource contains only datatype descriptions (FIELD elements), but no actual data.
Methods Documentation
- iter_coosys()[source]#
Recursively iterates over all the COOSYS elements in the resource and nested resources.
- iter_fields_and_params()[source]#
Recursively iterates over all FIELD and PARAM elements in the resource, its tables and nested resources.
- iter_info()[source]#
Recursively iterates over all the INFO elements in the resource and nested resources.
- iter_timesys()[source]#
Recursively iterates over all the TIMESYS elements in the resource and nested resources.
- parse(votable, iterator, config)[source]#
For internal use. Parse the XML content of the children of the element.
- Parameters:
- iterator
xmliterable An iterator over XML elements as returned by
get_xml_iterator.- config
dict The configuration dictionary that affects how certain elements are read.
- iterator
- Returns:
- self
Element Returns self as a convenience.
- self
- to_xml(w, **kwargs)[source]#
For internal use. Output the element to XML.
- Parameters:
- w
astropy.utils.xml.writer.XMLWriterobject An XML writer to write to.
- **kwargs
dict Any configuration parameters to control the output.
- w