Package org.apache.uima.cas.admin
Class CASFactory
- java.lang.Object
-
- org.apache.uima.cas.admin.CASFactory
-
public abstract class CASFactory extends java.lang.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 Description static boolean
USE_JCAS_CACHE_DEFAULT
-
Constructor Summary
Constructors Constructor Description CASFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method 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)
Deprecated.use createCas(int initialHeapSize)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.
-
-
-
Field Detail
-
USE_JCAS_CACHE_DEFAULT
public static final boolean USE_JCAS_CACHE_DEFAULT
- See Also:
- Constant Field Values
-
-
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
@Deprecated public static CASMgr createCAS(int initialHeapSize, boolean useJcasCache)
Deprecated.use createCas(int initialHeapSize)- 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.useJcasCache
- - ignored in v3- Returns:
- A new CASMgr object.
-
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.
-
-