Class TableElement

  • All Implemented Interfaces:
    org.w3c.dom.Element, org.w3c.dom.Node

    public class TableElement
    extends VOElement
    An object representing the TABLE element of a VOTable. This contains fields, links and rows; the actual data from the table body may be obtained using the getData() method. Note that depending on exactly how this element was obtained, the nodes bearing the bulk data (e.g. text content of a <STREAM> element or the <TR> children of a <TABLEDATA> element) may not actually be available from this node - for efficiency the VOTable parser may convert them into a TabularData object and discard the content of the original (STREAM or TABLEDATA) nodes which contained the data from the DOM.

    The easiest way to access the data stored in a TableElement is to make it into a VOStarTable.

    Author:
    Mark Taylor (Starlink)
    • Method Detail

      • getFields

        public FieldElement[] getFields()
        Returns the FIELD elements for this table. Note these may come from a different TABLE element referenced using this one's ref attribute.
        Returns:
        the FIELD elements which describe the columns of this table
      • getLinks

        public LinkElement[] getLinks()
        Returns the LINK elements for this table.
        Returns:
        the LINK elements which are children of this table
      • getParams

        public ParamElement[] getParams()
        Returns the PARAM elements for this table.
        Returns:
        the PARAM elements which are children of this table
      • getNrows

        public long getNrows()
        Returns the number of rows in this table. This may be determined from the optional nrows attribute or from the table data itself. If this cannot be determined, or cannot be determined efficiently, the value -1 may be returned.
        Returns:
        the number of rows, or -1 if unknown
      • getData

        public TabularData getData()
                            throws java.io.IOException
        Returns an object which can be used to access the actual cell data in the body of this table.
        Returns:
        bulk data access object
        Throws:
        java.io.IOException