...
A prototype in this direction, called Cas-obj, has been offered in UIMA-4329
Edge Cases affecting internal design
Merged Type Systems, running different type systems in 1 JVM, sharing JCas cover objects
A key aspect of UIMA is the type system merging (among all annotators in a pipeline) that occurs at the beginning of a "run". After the merge is complete, the type system is "locked down", and various optimizations are possible based on this.
The design should support the use case: 1 JVM running multiple different pipelines together. So, in particular, there can be multiple TypeSystems in use at once.
The design should support the use case: 1 JVM loading 1 definition of JCas cover objects, but running different underlying typesystems sharing the JCas cover objects. This implies that part of the instantiation of the JCas Cover object is variable, based on the type system, and the particular location (or number of) features in a type a JCas is "covering" might be different in the underlying type systems.
These use cases give rise to a design with some "indirection" to support the multiplicity of values corresponding to multiple type systems in the same JVM (with possibly the same JCas cover objects).