Resource¶
-
class
astropy.io.votable.tree.Resource(name=None, ID=None, utype=None, type='results', id=None, config=None, pos=None, **kwargs)[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._DescriptionPropertyRESOURCE element: Groups TABLE and RESOURCE elements.
The keyword arguments correspond to setting members of the same name, documented below.
Attributes Summary
coordinate_systemsA list of coordinate system definitions (COOSYS elements) for the RESOURCE. extra_attributesA dictionary of string keys to string values containing any extra attributes of the RESOURCE element that are not defined in the specification. groupsA list of groups infosA list of informational parameters (key-value pairs) for the resource. linksA list of links (pointers to other documents or servers through a URI) for the resource. paramsA list of parameters (constant-valued columns) for the resource. resourcesA list of nested resources inside this resource. tablesA list of tables in the resource. type[required] The type of the resource. Methods Summary
iter_coosys()Recursively iterates over all the COOSYS elements in the resource and nested resources. iter_fields_and_params()Recursively iterates over all FIELD and PARAM elements in the resource, its tables and nested resources. iter_info()Recursively iterates over all the INFO elements in the resource and nested resources. iter_tables()Recursively iterates over all tables 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¶ 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.)
-
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.
-
params¶ A list of parameters (constant-valued columns) for the resource. Must contain only
Paramobjects.
-
type¶ [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.
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.
-
parse(votable, iterator, config)[source]¶ For internal use. Parse the XML content of the children of the element.
Parameters: - iterator : xml iterator
An iterator over XML elements as returned by
get_xml_iterator.- config : dict
The configuration dictionary that affects how certain elements are read.
Returns: - self : Element
Returns self as a convenience.
-