I was curious as to everyone's approach to accessing DAOs and other Java objects
within a JCas Annotator (a Java object extending JCasAnnotator_ImplBase).

Since there is no way to pass objects as parameters through the process method
(ie via an Object[]), the only thing I can think of doing is initializing DAOs
through the initialize method by pulling Spring bean names from a resource file
stored in the UimaContext and getting the objects through Spring's
ApplicationContext.

Also, how do we pass dynamic objects that are not of an existing CAS Type to an
Annotator?  Just for example, say I have a java.util.regex.Pattern object that
is created before calling annotator.process(JCas) and I want to pass and use
that object in the annotator without recreating it in the annotator (ie I don't
want to attach the String value of the Pattern as a uima.cas.String to the JCas
object and recompile it as a Pattern in the annotator).


Reply via email to