org.apache.uima.cas.impl

## Class ListUtils

- java.lang.Object
- - org.apache.uima.cas.impl.ListUtils

-     public class ListUtils
      extends Object

  Utilities for dealing with CAS List types. The many places operations-to-set-values are done to update feature values, which use the notIndexed form, because list elements cannot be part of an index key. Creation methods don't journal, these are guaranteed to be above the line.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `neFloatListType`
    `int` | `neFsListType`
    `int` | `neIntListType`
    `int` | `neStringListType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListUtils(CASImpl aCASImpl, Logger aLogger, ErrorHandler aErrorHandler)` Creates a new ListUtils object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `anyListToOutput(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds, org.apache.uima.cas.impl.ListUtils.ListOutput out)` Go thru a list, calling the ListOutput append method to append strings (to arrays, or string buffers) Stop at the end node, or a null, or a loop (no error reported here)
    `String[]` | `anyListToStringArray(int curNode, XmiSerializationSharedData sharedData)`
    `List<String>` | `anyListToStringList(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds)`
    `int` | `createFloatList(List<String> stringValues)`
    `int` | `createFsList(List<String> stringValues, org.apache.uima.internal.util.IntVector fsAddresses)`
    `int` | `createIntList(List<String> stringValues)`
    `int` | `createStringList(List<String> stringValues)`
    `int[]` | `fsListToAddressArray(int curNode)`
    `int` | `getEListType(int type)`
    `int` | `getHeadFeatCode(int type)`
    `int` | `getLength(int type, int addr)`
    `int` | `getLength(int type, int addr, int neListType, int tailFeat)`
    `int` | `getNeListType(int type)`
    `int` | `getTailFeatCode(int type)`
    `boolean` | `isFloatListType(int type)`
    `boolean` | `isFsListType(int type)`
    `boolean` | `isIntListType(int type)`
    `boolean` | `isListType(int type)`
    `boolean` | `isStringListType(int type)`
    `int` | `updateFloatList(int addr, List<String> stringValues)`
    `int` | `updateFsList(int addr, List<String> stringValues, org.apache.uima.internal.util.IntVector fsAddresses)`
    `int` | `updateIntList(int addr, List<String> stringValues)`
    `int` | `updateStringList(int addr, List<String> stringValues)`

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

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

- - ### Field Detail

    - #### neIntListType

          public final int neIntListType

    - #### neFloatListType

          public final int neFloatListType

    - #### neStringListType

          public final int neStringListType

    - #### neFsListType

          public final int neFsListType

  - ### Constructor Detail

    - #### ListUtils

          public ListUtils(CASImpl aCASImpl,
                           Logger aLogger,
                           ErrorHandler aErrorHandler)

      Creates a new ListUtils object.
      Parameters:
        `aCASImpl` - the CAS that this ListUtils will operate on
        `aLogger` - optional logger, to receive warning messages
        `aErrorHandler` - optional SAX ErrorHandler, to receive warning messages

  - ### Method Detail

    - #### getHeadFeatCode

          public int getHeadFeatCode(int type)

    - #### getTailFeatCode

          public int getTailFeatCode(int type)

    - #### getNeListType

          public int getNeListType(int type)

    - #### getEListType

          public int getEListType(int type)

    - #### isIntListType

          public boolean isIntListType(int type)

    - #### isFloatListType

          public boolean isFloatListType(int type)

    - #### isStringListType

          public boolean isStringListType(int type)

    - #### isFsListType

          public boolean isFsListType(int type)

    - #### isListType

          public boolean isListType(int type)

    - #### getLength

          public int getLength(int type,
                               int addr)

    - #### getLength

          public int getLength(int type,
                               int addr,
                               int neListType,
                               int tailFeat)

    - #### anyListToOutput

          public void anyListToOutput(int curNode,
                                      XmiSerializationSharedData sharedData,
                                      CasSerializerSupport.CasDocSerializer cds,
                                      org.apache.uima.cas.impl.ListUtils.ListOutput out)

      Go thru a list, calling the ListOutput append method to append strings (to arrays, or string buffers) Stop at the end node, or a null, or a loop (no error reported here)
      Parameters:
        `curNode` - -
        `sharedData` - -
        `cds` - -
        `out` - -

    - #### anyListToStringArray

          public String[] anyListToStringArray(int curNode,
                                               XmiSerializationSharedData sharedData)
                                        throws SAXException

      Throws:
        `SAXException`

    - #### anyListToStringList

          public List<String> anyListToStringList(int curNode,
                                                  XmiSerializationSharedData sharedData,
                                                  CasSerializerSupport.CasDocSerializer cds)

    - #### fsListToAddressArray

          public int[] fsListToAddressArray(int curNode)
                                     throws SAXException

      Throws:
        `SAXException`

    - #### createIntList

          public int createIntList(List<String> stringValues)

    - #### createFloatList

          public int createFloatList(List<String> stringValues)

    - #### createStringList

          public int createStringList(List<String> stringValues)

    - #### createFsList

          public int createFsList(List<String> stringValues,
                                  org.apache.uima.internal.util.IntVector fsAddresses)

    - #### updateIntList

          public int updateIntList(int addr,
                                   List<String> stringValues)
                            throws SAXException

      Throws:
        `SAXException`

    - #### updateFloatList

          public int updateFloatList(int addr,
                                     List<String> stringValues)
                              throws SAXException

      Throws:
        `SAXException`

    - #### updateFsList

          public int updateFsList(int addr,
                                  List<String> stringValues,
                                  org.apache.uima.internal.util.IntVector fsAddresses)
                           throws SAXException

      Throws:
        `SAXException`

    - #### updateStringList

          public int updateStringList(int addr,
                                      List<String> stringValues)
                               throws SAXException

      Throws:
        `SAXException`

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