Package org.apache.uima.util

# Enum Class CasLoadMode

java.lang.Object
java.lang.Enum<CasLoadMode>
org.apache.uima.util.CasLoadMode

All Implemented Interfaces:
  `Serializable`, `Comparable<CasLoadMode>`, `Constable`

public enum CasLoadMode extends Enum<CasLoadMode>
Used with CasIOUtils, maybe elsewhere, to indicate how CASes are to be loaded or saved. TSI = serialized type system and index definitions TS = serialized type system TSI can be used to reinitialize the CAS's type system and its index definitions. TS (which can be obtained from TSI) is used only with Compressed form 6 to specify the type system used to decode the serialized data. The TS/TSI artifact is self-identifying as to which kind it is, when deserializing. TSI and TS can be provided via two sources: - embedded in some serialized forms - via a separate artifact If both embedded and separate values are available for TS or TSI, then embedded takes precedence, external is ignored, except for compressed form 6; in that case, both are used: - external used to reinitialize the CAS's type system and indexes definition, and - embedded used to decode the serialized data, leniently. Compressed form 6 type system for decoding comes from the first one available of: - embedded TS or TSI - external TS or TSI - the receiving CAS's type system

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DEFAULT`
  Default operation: If TSI is available, reinitialize the CAS's type system and its indexes definition, except for Compressed Form 6, using the first TSI in this list: - embedded - external (to do this for Compressed Form 6, specify REINIT) Logic for doing embedded before external: Examining each serialized form: Java Object: if embedded is available, it's the right one, a different one causes exceptions XCas, XMI: doesn't apply - no way to have embedded Form 6 - excluded, anyway, see below Form 4 and Binary: these require the serialized type system match the CASs, so the embedded one is always right.
  `LENIENT`
  Same as DEFAULT, except for XMI and XCAS formats: Specifies lenient loading for those formats, which means that the load will not indicate an error if the incoming data has types and/or features not in the receiving CAS, but will instead silently ignore these.
  `REINIT`
  Used for Compressed Form 6 when needing to reset the CAS's type system.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CasLoadMode`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static CasLoadMode[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DEFAULT

    public static final CasLoadMode DEFAULT
    Default operation: If TSI is available, reinitialize the CAS's type system and its indexes definition, except for Compressed Form 6, using the first TSI in this list: - embedded - external (to do this for Compressed Form 6, specify REINIT) Logic for doing embedded before external: Examining each serialized form: Java Object: if embedded is available, it's the right one, a different one causes exceptions XCas, XMI: doesn't apply - no way to have embedded Form 6 - excluded, anyway, see below Form 4 and Binary: these require the serialized type system match the CASs, so the embedded one is always right. Compressed Form 6: - decoding: use the first type system in this list: - embedded TS/TSI - external TS/TSI - the receiving CAS's type system For all SerialFormats except Compressed type 6, default is to require strict matching (not lenient).

  - ### LENIENT

    public static final CasLoadMode LENIENT
    Same as DEFAULT, except for XMI and XCAS formats: Specifies lenient loading for those formats, which means that the load will not indicate an error if the incoming data has types and/or features not in the receiving CAS, but will instead silently ignore these.

  - ### REINIT

    public static final CasLoadMode REINIT
    Used for Compressed Form 6 when needing to reset the CAS's type system. Same as default, except that the internal and / or external TSI is used to reinitialize the CAS's type system and its indexes definition, using the first TSI in this list: - external (to allow the embedded to specify the decoding type system) - embedded (if it is a TSI) Decode (same as DEFAULT) Error if no TSI information available

- ## Method Details

  - ### values

    public static CasLoadMode[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static CasLoadMode valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null