Resource

class astropy.io.votable.tree.Resource(name=None, ID=None, utype=None, type='results', id=None, config={}, pos=None, **kwargs) [edit on github][source]

Bases: astropy.io.votable.tree.Element, astropy.io.votable.tree._IDProperty, astropy.io.votable.tree._NameProperty, astropy.io.votable.tree._UtypeProperty, astropy.io.votable.tree._DescriptionProperty

RESOURCE element: Groups TABLE and RESOURCE elements.

The keyword arguments correspond to setting members of the same name, documented below.

Attributes Summary

coordinate_systems A list of coordinate system definitions (COOSYS elements) for the RESOURCE.
links A list of links (pointers to other documents or servers through a URI) for the resource.
extra_attributes A dictionary of string keys to string values containing any extra attributes of the RESOURCE element that are not defined in the specification.
infos A list of informational parameters (key-value pairs) for the resource.
tables A list of tables in the resource.
params A list of parameters (constant-valued columns) for the resource.
type [required] The type of the resource. Must be either:
resources A list of nested resources inside this resource.

Methods Summary

parse(votable, iterator, config)
to_xml(w, **kwargs)
iter_fields_and_params() Recursively iterates over all FIELD and PARAM elements in the resource, its tables and nested resources.
iter_tables() Recursively iterates over all tables in the resource and nested resources.
iter_coosys() Recursively iterates over all the COOSYS elements in the resource and nested resources.

Attributes Documentation

coordinate_systems[source]

A list of coordinate system definitions (COOSYS elements) for the RESOURCE. Must contain only CooSys objects.

A list of links (pointers to other documents or servers through a URI) for the resource. Must contain only Link objects.

extra_attributes[source]

A 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.)

infos[source]

A list of informational parameters (key-value pairs) for the resource. Must only contain Info objects.

tables[source]

A list of tables in the resource. Must contain only Table objects.

params[source]

A list of parameters (constant-valued columns) for the resource. Must contain only Param objects.

type[source]

[required] The type of the resource. Must be either:

  • ‘results’: This resource contains actual result values (default)
  • ‘meta’: This resource contains only datatype descriptions (FIELD elements), but no actual data.
resources[source]

A list of nested resources inside this resource. Must contain only Resource objects.

Methods Documentation

parse(votable, iterator, config) [edit on github][source]
to_xml(w, **kwargs) [edit on github][source]
iter_fields_and_params() [edit on github][source]

Recursively iterates over all FIELD and PARAM elements in the resource, its tables and nested resources.

iter_tables() [edit on github][source]

Recursively iterates over all tables in the resource and nested resources.

iter_coosys() [edit on github][source]

Recursively iterates over all the COOSYS elements in the resource and nested resources.

Page Contents