Values¶
- class astropy.io.votable.tree.Values(votable, field, ID=None, null=None, ref=None, type='legal', id=None, config=None, pos=None, **extras)[source]¶
Bases:
Element
,_IDProperty
VALUES element: used within FIELD and PARAM elements to define the domain of values.
The keyword arguments correspond to setting members of the same name, documented below.
Attributes Summary
The maximum value of the domain.
When
True
, the domain includes the maximum value.The minimum value of the domain.
When
True
, the domain includes the minimum value.For integral datatypes, null is used to define the value used for missing values.
A list of string key-value tuples defining other OPTION elements for the domain.
Refer to another VALUES element by ID, defined previously in the document, for MIN/MAX/OPTION information.
[required] Defines the applicability of the domain defined by this VALUES element.
Methods Summary
from_table_column
(column)Are the settings on this
VALUE
element all the same as the XML defaults?parse
(iterator, config)For internal use.
to_table_column
(column)to_xml
(w, **kwargs)For internal use.
Attributes Documentation
- max¶
The maximum value of the domain. See
max_inclusive
.
- max_inclusive¶
When
True
, the domain includes the maximum value.
- min¶
The minimum value of the domain. See
min_inclusive
.
- min_inclusive¶
When
True
, the domain includes the minimum value.
- null¶
For integral datatypes, null is used to define the value used for missing values.
- options¶
A list of string key-value tuples defining other OPTION elements for the domain. All options are ignored – they are stored for round-tripping purposes only.
- ref¶
Refer to another VALUES element by ID, defined previously in the document, for MIN/MAX/OPTION information.
- type¶
[required] Defines the applicability of the domain defined by this VALUES element. Must be one of the following strings:
‘legal’: The domain of this column applies in general to this datatype. (default)
‘actual’: The domain of this column applies only to the data enclosed in the parent table.
Methods Documentation
- parse(iterator, config)[source]¶
For internal use. Parse the XML content of the children of the element.
- Parameters:
- iterator
xml
python:iterable An iterator over XML elements as returned by
get_xml_iterator
.- config
python: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.XMLWriter
object
An XML writer to write to.
- **kwargs
python:dict
Any configuration parameters to control the output.
- w