Class FieldElement

All Implemented Interfaces:
Element, 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)
  • Method Details

    • 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 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 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 String getUnit()
      Returns the value of the unit attribute, or null if there is none.
      Returns:
      the unit string
    • getUcd

      public String getUcd()
      Returns the value of the ucd attribute, or null if there is none.
      Returns:
      the ucd string
      See Also:
      • UCD
    • getUtype

      public String getUtype()
      Returns the value of the utype attribute, or null if there is none.
      Returns:
      the utype string
    • getXtype

      public 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
    • getTimesys

      public TimesysElement getTimesys()
      Returns the TIMESYS element corresponding to this field, if any.
      Returns:
      referenced element with tagname TIMESYS, or null
    • toString

      public 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