Skip navigation links

Package uk.ac.starlink.votable

Classes for VOTable input and output.

See: Description

Package uk.ac.starlink.votable Description

Classes for VOTable input and output.

Elements in the VOTable DTD are represented by instances of VOElement or one of its subclasses. Not every VOTable element has a corresponding class, but the generic facilities of VOElement can still be used for navigation if required. In general a subclass of VOElement is provided in those cases for which functionality beyond that given by the DelegatingElement.getAttribute(java.lang.String) and VOElement.getChildren() is required.

The usual way of using these classes to read a VOTable document would be to use one of the static makeVOElement methods in VOElementFactory to construct a top-level VOElement from a file, URL, input stream, DOM or whatever and then to interrogate this element for its children to find the elements of interest (e.g. TABLE elements).

A hybrid SAX/DOM parsing scheme is used, so that if a parse is done by this library (when using one of the non-DOM constructors of VOElement or one of its subclasses) bulk data is not represented in the resulting DOM. In the case of TABLEDATA encoding, this means that the (potentially large) number of TR and TD nodes are parsed directly using SAX and never introduced into the DOM. In the case of FITS or BINARY encoding in which the data is base64-encoded inline in the STREAM element, this element is read and converted into table data during the parse, and the screed of base64 text is not included in the DOM. The user doesn't have to worry about all this of course, but it has the effect that the parsing is fast and as memory-efficient as possible. If the parsing has already been done (a DOMSource constructor is used to construct the VOElement instances) the library will use the text data in DOM nodes which exist in the presented DOM (it will not excise them from the given DOM).

Implementation Status

These classes support (with a very few exceptions) to the VOTable DTD version 1.0. All three defined data implementations (TABLEDATA, FITS and BINARY) are fully supported for input and output.
See Also:
STIL
Skip navigation links