Package uk.ac.starlink.topcat

## Class TopcatJELRowReader

- java.lang.Object
- - gnu.jel.DVMap
  - - uk.ac.starlink.ttools.jel.JELRowReader
    - - uk.ac.starlink.ttools.jel.StarTableJELRowReader
      - - uk.ac.starlink.ttools.jel.RandomJELRowReader
        - - uk.ac.starlink.topcat.TopcatJELRowReader

-     public class TopcatJELRowReader
      extends uk.ac.starlink.ttools.jel.RandomJELRowReader

  Random JELRowReader which in addition to the variables recognised by the superclass, also recognises named row subsets (`RowSubset` inclusion flag vectors):
  Row Subset _ID identifiers:
    The character '_' followed by the 1-based index of a defined row subset returns true iff the current column is part of the subset.
  Row Subset names:
    The name of a subset (case-insensitive) returns true iff the current column is part of the named subset.
  Since:
    8 Feb 2005
  Author:
    Mark Taylor (Starlink)

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static char` | `SUBSET_ID_CHAR` | Prefix identifying a unique subset identifier.

    - ### Fields inherited from class uk.ac.starlink.ttools.jel.JELRowReader

      `COLUMN_ID_CHAR, NULL_QUERY_PREFIX, OBJECT_PREFIX`

    - ### Fields inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader

      `PARAM_PREFIX, UCD_PREFIX, UTYPE_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TopcatJELRowReader​(uk.ac.starlink.table.StarTable table, RowSubset[] subsets, int[] subsetIds)` | Constructs a new row reader for a random-access table.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected uk.ac.starlink.ttools.jel.Constant` | `createDescribedValueConstant​(uk.ac.starlink.table.DescribedValue dval)` | Returns a constant which is evaluated at runtime.
    `boolean` | `getBooleanProperty​(short isub)` | Returns the actual subset value for the current row and a given column.
    `java.lang.String` | `getTypeName​(java.lang.String name)` | Overrides superclass implementation to recognise row subsets by name or _ID.
    `java.lang.Object` | `translate​(java.lang.String name)` | Overrides superclass implementation to recognise subsets as well as the other special objects.

    - ### Methods inherited from class uk.ac.starlink.ttools.jel.JELRowReader

      `evaluate, evaluateDouble, foundNull, getBooleanArrayProperty, getBooleanProperty, getBooleanProperty, getBooleanValue, getByteArrayProperty, getByteProperty, getByteValue, getCharArrayProperty, getCharProperty, getCharValue, getColumnIndex, getDateArrayProperty, getDoubleArrayProperty, getDoubleProperty, getDoubleValue, getFloatArrayProperty, getFloatProperty, getFloatValue, getIntArrayProperty, getIntProperty, getIntValue, getLongArrayProperty, getLongProperty, getLongValue, getNumberProperty, getObjectArrayProperty, getObjectProperty, getShortArrayProperty, getShortProperty, getShortValue, getStringArrayProperty, getStringProperty, setFailOnNull, stripPrefix`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from class uk.ac.starlink.ttools.jel.RandomJELRowReader

      `evaluateAtRow, getCell, getCurrentRow, setCurrentRow`

    - ### Methods inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader

      `getBooleanColumnValue, getByteColumnValue, getCharColumnValue, getColumnClass, getColumnIndexByName, getConstantByName, getDoubleColumnValue, getFloatColumnValue, getIntColumnValue, getLongColumnValue, getObjectColumnValue, getShortColumnValue, getSpecialByName, getTable, getUcdRegex, getUtypeRegex, isBlank`

- - ### Field Detail

    - #### SUBSET_ID_CHAR

          public static final char SUBSET_ID_CHAR

      Prefix identifying a unique subset identifier.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TopcatJELRowReader

          public TopcatJELRowReader​(uk.ac.starlink.table.StarTable table,
                                    RowSubset[] subsets,
                                    int[] subsetIds)

      Constructs a new row reader for a random-access table.
      Parameters:
        `table` - table object
        `subsets` - array of `RowSubset` objects which this reader will recognise (may be null)
        `subsetIds` - array of integer identifiers by which the `subsets` array will be identified; must be the same length as `subsets`
      Throws:
        `java.lang.IllegalArgumentException` - if `table.isRandom()` returns false

  - ### Method Detail

    - #### getTypeName

          public java.lang.String getTypeName​(java.lang.String name)

      Overrides superclass implementation to recognise row subsets by name or _ID.
      Overrides:
        `getTypeName` in class `uk.ac.starlink.ttools.jel.JELRowReader`
      Parameters:
        `name` - the variable name
      Returns:
        corresponding method name fragment
      See Also:
        "JEL manual"

    - #### translate

          public java.lang.Object translate​(java.lang.String name)

      Overrides superclass implementation to recognise subsets as well as the other special objects. The additional return type is:
      - a `Short` (the subset index) if the column specification appears to reference a known row subset
      Overrides:
        `translate` in class `uk.ac.starlink.ttools.jel.JELRowReader`
      Parameters:
        `name` - the name of the variable-like object to evaluate
      Returns:
        a numeric object corresponding to an object which we know how to evaluate
      See Also:
        "JEL manual"

    - #### getBooleanProperty

          public boolean getBooleanProperty​(short isub)

      Returns the actual subset value for the current row and a given column.
      Parameters:
        `isub` - index of the subset to evaluate at the current row
      Returns:
        result of the `isIncluded` method of the `RowSubset` indicated at the current row

    - #### createDescribedValueConstant

          protected uk.ac.starlink.ttools.jel.Constant createDescribedValueConstant​(uk.ac.starlink.table.DescribedValue dval)

      Returns a constant which is evaluated at runtime. This is more appropriate than the inherited (evaluate at call time) behaviour, since within TOPCAT the constant's value may change as a result of user intervention during the lifetime of the returned object.
      Overrides:
        `createDescribedValueConstant` in class `uk.ac.starlink.ttools.jel.StarTableJELRowReader`

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.