public static JCas getJCas(AnalysisEngine ae) throws ResourceInitializationException {

        return ae.newJCas();
    }
Returns a new JCas () appropriate for the given Analysis Engine. This
method ensures that only one instance of a JCas is created. A Jcas is a
Java Cover Classes based Object-oriented CAS (Common Analysis System)
API.

<p>
Important: It is highly recommended that you reuse CAS objects rather
than creating new CAS objects prior to each analysis. This is because CAS
objects may be expensive to create and may consume a significant amount
of memory.
</p>

@param ae AnalysisEngine used to create an appropriate JCas object.
@return a JCas object appropriate for the given AnalysisEngine.
@throws ResourceInitializationException if a CAS could not be created because this
                                        AnalysisEngine's CAS metadata (type system, type
                                        priorities, or FS indexes)
                                        are invalid.
tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/ctakes/CTAKESUtils.java