uk.ac.starlink.votable

## Class FieldElement

- java.lang.Object
- - uk.ac.starlink.votable.dom.DelegatingNode
  - - uk.ac.starlink.votable.dom.DelegatingElement
    - - uk.ac.starlink.votable.VOElement
      - - uk.ac.starlink.votable.FieldElement

- All Implemented Interfaces:
    org.w3c.dom.Element, org.w3c.dom.Node
  Direct Known Subclasses:
    ParamElement

      public class FieldElement
      extends VOElement

  Table column characteristics represented by a FIELD element in a VOTable.
  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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ValuesElement` | `getActualValues()` Returns a VALUES child of this element with the attribute type='actual', or `null` if none exists.
    `long[]` | `getArraysize()` Returns the array size.
    `VOElement` | `getCoosys()` Returns the COOSYS element corresponding to this field, if any.
    `java.lang.String` | `getDatatype()` Returns the value of the `datatype` attribute.
    `int` | `getIndexInTable(TableElement table)` Returns the index of this field in a given table; that is the index of the column it represents.
    `ValuesElement` | `getLegalValues()` Returns a VALUES child of this element with the attribute type='legal', or `null` if none exists.
    `java.lang.String` | `getNull()` Returns the 'null' value for this FieldElement.
    `java.lang.String` | `getUcd()` Returns the value of the `ucd` attribute, or `null` if there is none.
    `java.lang.String` | `getUnit()` Returns the value of the `unit` attribute, or `null` if there is none.
    `java.lang.String` | `getUtype()` Returns the value of the `utype` attribute, or `null` if there is none.
    `java.lang.String` | `getXtype()` Returns the value of the `xtype` attribute, or `null` if there is none.
    `java.lang.String` | `toString()` Returns the same value as `VOElement.getHandle()`.

    - ### Methods inherited from class uk.ac.starlink.votable.VOElement

      `getChildByName, getChildren, getChildrenByName, getDescription, getElementsByVOTagName, getElementSequence, getHandle, getID, getName, getParent, getReferencedElement, getSystemId, getVOTagName`

    - ### 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 Detail

    - #### getArraysize

          public long[] getArraysize()

      Returns the array size. The returned value is an array of `long`, with one element for each dimension. The final dimension only may have the value -1, which indicates that this dimension is unknown. All other elements will be positive.
      Returns:
        array giving dimensions of data in this field.

    - #### getNull

          public java.lang.String getNull()

      Returns the 'null' value for this FieldElement. This is the value of the 'null' attribute of the VALUES child with type='legal', or if that doesn't exist the 'null' attribute of the VALUES child with type='actual' (this is some kind of guesswork based on what is not written in the VOTable document). This has nothing to do with the java `null` value.
      Returns:
        the bad ("null") value or, confusingly, `null` if none is defined

    - #### getDatatype

          public java.lang.String getDatatype()

      Returns the value of the `datatype` attribute. If no datatype attribute has been defined (which is illegal, but not uncommon) then "char" will be returned.
      Returns:
        the datatype

    - #### getUnit

          public java.lang.String getUnit()

      Returns the value of the `unit` attribute, or `null` if there is none.
      Returns:
        the unit string

    - #### getUcd

          public java.lang.String getUcd()

      Returns the value of the `ucd` attribute, or `null` if there is none.
      Returns:
        the ucd string
      See Also:
        `UCD`

    - #### getUtype

          public java.lang.String getUtype()

      Returns the value of the `utype` attribute, or `null` if there is none.
      Returns:
        the utype string

    - #### getXtype

          public java.lang.String getXtype()

      Returns the value of the `xtype` attribute, or `null` if there is none.
      Returns:
        the xtype string

    - #### getIndexInTable

          public int getIndexInTable(TableElement table)

      Returns the index of this field in a given table; that is the index of the column it represents. The first FIELD child of a TABLE element has index 0, and so on. If this field is not associated with `table`, -1 is returned.
      Parameters:
        `table` - table within which to locate this field
      Returns:
        0-based index of this field in `table`, or -1

    - #### getLegalValues

          public ValuesElement getLegalValues()

      Returns a VALUES child of this element with the attribute type='legal', or `null` if none exists.
      Returns:
        the 'legal' Values object

    - #### getActualValues

          public ValuesElement getActualValues()

      Returns a VALUES child of this element with the attribute type='actual', or `null` if none exists.
      Returns:
        the 'actual' Values object

    - #### getCoosys

          public VOElement getCoosys()

      Returns the COOSYS element corresponding to this field, if any.
      Returns:
        referenced element with tagname COOSYS, or null

    - #### toString

          public java.lang.String toString()

      Description copied from class: `VOElement`
      Returns the same value as `VOElement.getHandle()`.
      Overrides:
        `toString` in class `VOElement`
      Returns:
        a string representation of this object

Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.