Package uk.ac.starlink.votable
Class TableElement
java.lang.Object
uk.ac.starlink.votable.dom.DelegatingNode
uk.ac.starlink.votable.dom.DelegatingElement
uk.ac.starlink.votable.VOElement
uk.ac.starlink.votable.TableElement
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)
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
Returns an object which can be used to access the actual cell data in the body of this table.Returns the FIELD elements for this table.getLinks()
Returns the LINK elements for this table.long
getNrows()
Returns the number of rows in this table.Returns the PARAM elements for this table.Methods inherited from class uk.ac.starlink.votable.VOElement
getChildByName, getChildren, getChildrenByName, getDescription, getElementsByVOTagName, getElementSequence, getHandle, getID, getName, getParent, getReferencedElement, getSystemId, getVOTagName, toString
Methods inherited from class uk.ac.starlink.votable.dom.DelegatingElement
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
Methods inherited from class uk.ac.starlink.votable.dom.DelegatingNode
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Method Details
-
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
Returns the LINK elements for this table.- Returns:
- the LINK elements which are children of this table
-
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
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:
IOException
-