Package com.tietoenator.trip.jxp.data

# Class TdbStructuredField

java.lang.Object
com.tietoenator.trip.jxp.data.TdbField
com.tietoenator.trip.jxp.data.TdbStructuredField

All Implemented Interfaces:
  `com.tietoenator.trip.jxp.internal.utils.DOMSink`

Direct Known Subclasses:
  `TdbDateField`, `TdbIntegerField`, `TdbNumberField`, `TdbPhraseField`, `TdbTimeField`

public abstract class TdbStructuredField extends TdbField
Intermediary abstract representation for subfields from a structured field type such as PHrase, NUmber, etc.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appendValue(String val)`
  Append a new subfield to the field.
  `void`
  `appendValues(Collection<String> values)`
  Append several new subfields to the field.
  `void`
  `clear()`
  Clear the field's content; leaves the display form intact
  `int`
  `getFieldSize()`
  Retrieve the size of the value in the field.
  `String`
  `getValue(int index)`
  Get the subfield value at the defined index.
  `int`
  `getValueCount()`
  Retrieve the count of the values in the field.
  `void`
  `insertValue(int index, String value)`
  Inserts a new subfield into the field.
  `void`
  `insertValues(int index, Collection<String> values)`
  Inserts several new subfields into the field.
  `boolean`
  `isPartial()`
  Returns true if this field contains a partial value.
  `List<String>`
  `originalValues()`
  Retrieve a display form of the field's content -- see TdbField.getOriginalValues() for more detail.
  `void`
  `removeValue(int index)`
  Removes a subfield from the field.
  `void`
  `setValue(int index, String val)`
  Set the defined subfield to the provided value.
  `String`
  `toString()`
  Retrieves a simple newline-delimited version of the field's content, complete with search term markup, if defined.
  `List<String>`
  `values()`
  Retrieve the current content of the field -- see TdbField.getValues() for more detail.

  ### Methods inherited from class com.tietoenator.trip.jxp.data.TdbField

  `getName, getOwnerComponent, getType, isChanged`

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

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### originalValues

    public List<String> originalValues()
    Retrieve a display form of the field's content -- see TdbField.getOriginalValues() for more detail.
    Specified by:
      `originalValues` in class `TdbField`
    Returns:
      Collection of display values

  - ### values

    public List<String> values()
    Retrieve the current content of the field -- see TdbField.getValues() for more detail.
    Specified by:
      `values` in class `TdbField`
    Returns:
      Collection of field values

  - ### clear

    public void clear()
    Clear the field's content; leaves the display form intact
    Specified by:
      `clear` in class `TdbField`

  - ### getFieldSize

    public int getFieldSize()
    Retrieve the size of the value in the field.
    Specified by:
      `getFieldSize` in class `TdbField`
    Returns:
      Total size of the contents of the field.
    See Also:
      - `TdbField.getFieldSize()`

  - ### isPartial

    public boolean isPartial()
    Returns true if this field contains a partial value.
    Specified by:
      `isPartial` in class `TdbField`
    Returns:
      True if the value is partial
    See Also:
      - `TdbField.isPartial()`

  - ### getValue

    public String getValue(int index) throws TdbException
    Get the subfield value at the defined index.
    Specified by:
      `getValue` in class `TdbField`
    Parameters:
      `index` - Zero-based index of item to retrieve
    Returns:
      Value of subfield if available, null otherwise.
    Throws:
      `TdbException`

  - ### setValue

    public void setValue(int index, String val) throws TdbException
    Set the defined subfield to the provided value.
    Specified by:
      `setValue` in class `TdbField`
    Parameters:
      `index` - Zero-based ndex of subfield to modify.
      `val` - Value to assign
    Throws:
      `TdbException`

  - ### appendValue

    public void appendValue(String val) throws TdbException
    Append a new subfield to the field.
    Specified by:
      `appendValue` in class `TdbField`
    Parameters:
      `val` - The value to append to the field
    Throws:
      `TdbException`

  - ### appendValues

    public void appendValues(Collection<String> values) throws TdbException
    Append several new subfields to the field.
    Specified by:
      `appendValues` in class `TdbField`
    Parameters:
      `values` - The value to append to the field
    Throws:
      `TdbException`

  - ### getValueCount

    public int getValueCount() throws TdbException
    Retrieve the count of the values in the field.
    Specified by:
      `getValueCount` in class `TdbField`
    Returns:
      Number of subfields in the field.
    Throws:
      `TdbException`

  - ### insertValue

    public void insertValue(int index, String value) throws TdbException
    Inserts a new subfield into the field.
    Specified by:
      `insertValue` in class `TdbField`
    Parameters:
      `index` - Zero-based index at which to insert the new subfield.
      `value` - The value to insert into the field.
    Throws:
      `TdbException` - If the index is out of bounds or the value is invalid.

  - ### insertValues

    public void insertValues(int index, Collection<String> values) throws TdbException
    Inserts several new subfields into the field.
    Specified by:
      `insertValues` in class `TdbField`
    Parameters:
      `index` - Zero-based index at which to insert the new subfield.
      `values` - The values to insert into the field.
    Throws:
      `TdbException` - If the index is out of bounds or the value is invalid.

  - ### removeValue

    public void removeValue(int index) throws TdbException
    Removes a subfield from the field.
    Specified by:
      `removeValue` in class `TdbField`
    Parameters:
      `index` - Zero-based index from which to remove a subfield.
    Throws:
      `TdbException` - If the index is out of bounds.

  - ### toString

    public String toString()
    Retrieves a simple newline-delimited version of the field's content, complete with search term markup, if defined.
    Specified by:
      `toString` in class `TdbField`
    Returns:
      String representation of field's display content