Package org.apache.uima.cas_data

# Interface CasData

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `CasDataImpl`

public interface CasData extends Serializable
Interface for directly accessing and manipulating the data in the Common Analysis Structure.

The CAS Data is a collection of `FeatureStructure`s, where each FeatureStructure has an optional ID, a type (represented as a string), and a collection of features, which are attribute-value pairs. Feature names are strings, and their values may be primitives (String, integer, or float) or references, via ID, to one or more other FeatureStructures. Circular references are allowed.

Note on Arrays: Arrays are represented by `ArrayFS`, which is a subtype of `FeatureStructure`. Arrays are NOT primitive values. See `FeatureStructure` for more information.

FeatureStructures also have a property `indexed`, which determines whether the FeatureStructure should be added to the CAS's indexes if the CAS Data is converted to a CAS Object. The CasData itself does not provide indexes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFeatureStructure(FeatureStructure aFS)`
  Adds a FeatureStructure to the list of top-level FeatureStructures contained in this CasData.
  `Iterator<FeatureStructure>`
  `getFeatureStructures()`
  Get an iterator over all top-level FeatureStructures, in no particular order.
  `void`
  `removeFeatureStructure(FeatureStructure aFS)`
  Removes a FeatureStructure to this CasData.

- ## Method Details

  - ### getFeatureStructures

    Iterator<FeatureStructure> getFeatureStructures()
    Get an iterator over all top-level FeatureStructures, in no particular order.
    Returns:
      an iterator over `FeatureStructure` objects.

  - ### addFeatureStructure

    void addFeatureStructure(FeatureStructure aFS)
    Adds a FeatureStructure to the list of top-level FeatureStructures contained in this CasData.
    Parameters:
      `aFS` - the FeatureStructure to be added

  - ### removeFeatureStructure

    void removeFeatureStructure(FeatureStructure aFS)
    Removes a FeatureStructure to this CasData. Note that this only removes the FeatureStructure from the top-level list. If the FeatureStructure is a value of a feature, it is will still be accessible through that path.
    Parameters:
      `aFS` - the FeatureStructure to be removed