org.apache.uima.util

## Class TypeSystemUtil

- java.lang.Object
- - org.apache.uima.util.TypeSystemUtil

-     public class TypeSystemUtil
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeSystemUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FeatureDescription` | `feature2FeatureDescription(Feature aFeature)` Convert a `Feature` to an equivalent `FeatureDescription`.
    `static String[]` | `getAllowedValuesForType(Type aType, TypeSystem aTypeSystem)` Gets the allowed values for a string subtype.
    `static TypeDescription` | `type2TypeDescription(Type aType, TypeSystem aTypeSystem)` Convert a `Type` to an equivalent `TypeDescription`.
    `static TypeSystemDescription` | `typeSystem2TypeSystemDescription(TypeSystem aTypeSystem)` Convert a `TypeSystem` to an equivalent `TypeSystemDescription`.

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

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

- - ### Constructor Detail

    - #### TypeSystemUtil

          public TypeSystemUtil()

  - ### Method Detail

    - #### typeSystem2TypeSystemDescription

          public static TypeSystemDescription typeSystem2TypeSystemDescription(TypeSystem aTypeSystem)

      Convert a `TypeSystem` to an equivalent `TypeSystemDescription`.
      Parameters:
        `aTypeSystem` - type system object to convert
      Returns:
        a TypeSystemDescription that is equivalent to `aTypeSystem`

    - #### type2TypeDescription

          public static TypeDescription type2TypeDescription(Type aType,
                                                             TypeSystem aTypeSystem)

      Convert a `Type` to an equivalent `TypeDescription`.
      Parameters:
        `aType` - type object to convert
        `aTypeSystem` - the TypeSystem that contains `aType`
      Returns:
        a TypeDescription that is equivalent to `aType`

    - #### feature2FeatureDescription

          public static FeatureDescription feature2FeatureDescription(Feature aFeature)

      Convert a `Feature` to an equivalent `FeatureDescription`.
      Parameters:
        `aFeature` - feature object to convert
      Returns:
        a FeatureDescription that is equivalent to `aFeature`

    - #### getAllowedValuesForType

          public static String[] getAllowedValuesForType(Type aType,
                                                         TypeSystem aTypeSystem)

      Gets the allowed values for a string subtype.
      Parameters:
        `aType` - the type, which must be a subtype of uima.cas.String
        `aTypeSystem` - the type system to use
      Returns:
        array of allowed values for `aType` TODO - this should be a method on Type.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.