org.apache.uima.cas.admin

## Class CASFactory

- java.lang.Object
- - org.apache.uima.cas.admin.CASFactory

-     public abstract class CASFactory
      extends Object

  Factory class to create CASMgr objects. This is the only class in this package. Once you have created a CAS object, you can use the methods there to create and access objects implementing the other interfaces. For the OO API, no direct access to any of the implementations is provided. Should you want to provide an alternative implementation of the CAS interfaces in this package, the only thing you have to change is the implementation of the createCAS() method here.

  All methods in this class are static. CASFactory objects can not be created.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `USE_JCAS_CACHE_DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CASFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CASMgr` | `createCAS()` Create a new CASMgr object.
    `static CASMgr` | `createCAS(int initialHeapSize)` Create a new CASMgr object.
    `static CASMgr` | `createCAS(int initialHeapSize, boolean useJcasCache)`
    `static CASMgr` | `createCAS(int initialHeapSize, TypeSystem ts)` Create a new CASMgr object from a give type system.
    `static CASMgr` | `createCAS(int initialHeapSize, TypeSystem ts, boolean useJcasCache)`
    `static CASMgr` | `createCAS(TypeSystem ts)` Create a new CASMgr object from a give type system.
    `static CASMgr` | `createCAS(TypeSystem ts, boolean useJcasCache)`
    `static TypeSystemMgr` | `createTypeSystem()` Create a new type system that is populated with the built-in CAS types.

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

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

- - ### Field Detail

    - #### USE_JCAS_CACHE_DEFAULT

          public static final boolean USE_JCAS_CACHE_DEFAULT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CASFactory

          public CASFactory()

  - ### Method Detail

    - #### createCAS

          public static CASMgr createCAS()

      Create a new CASMgr object.
      Returns:
        A new CASMgr object.

    - #### createCAS

          public static CASMgr createCAS(int initialHeapSize)

      Create a new CASMgr object.
      Parameters:
        `initialHeapSize` - The initial size of the internal CAS heap. If you choose this number too small, it can have a major performance impact. As a very rough guideline, this number should not be smaller than the number of characters in documents you are processing.
      Returns:
        A new CASMgr object.

    - #### createCAS

          public static CASMgr createCAS(int initialHeapSize,
                                         boolean useJcasCache)

    - #### createCAS

          public static CASMgr createCAS(int initialHeapSize,
                                         TypeSystem ts)

      Create a new CASMgr object from a give type system.
      Parameters:
        `initialHeapSize` - The initial size of the internal CAS heap. If you choose this number too small, it can have a major performance impact. As a very rough guideline, this number should not be smaller than the number of characters in documents you are processing.
        `ts` - An existing type system (must not be null).
      Returns:
        A new CASMgr object.

    - #### createCAS

          public static CASMgr createCAS(int initialHeapSize,
                                         TypeSystem ts,
                                         boolean useJcasCache)

    - #### createCAS

          public static CASMgr createCAS(TypeSystem ts)

      Create a new CASMgr object from a give type system.
      Parameters:
        `ts` - An existing type system (must not be null).
      Returns:
        A new CASMgr object.

    - #### createCAS

          public static CASMgr createCAS(TypeSystem ts,
                                         boolean useJcasCache)

    - #### createTypeSystem

          public static TypeSystemMgr createTypeSystem()

      Create a new type system that is populated with the built-in CAS types.
      Returns:
        A type system manager object that can be used to add more types.

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