Hi,

I'm having a small problem in testing an UIMA annotator. My annotator XYZ extends JCasAnnotator_ImplBase which I understands, implements part of the AnalysisComponent interface.
I usually create my test annotator from an AnalysisEngintDesrition like this:

AnalysisEngine testAnnotator = produceAnalysisEngine(some AnalysisEngineDescription);

This is fine as long as I want to call methods like process() or initialize() from the AnalysisEngine interface. Now my annotator XYZ has some additional public methods to get internal state information like XYZ.getFoo() which I want to call, which cant be done via the AnalysisEngine interface. I also can't cast the AnalysisEngine to my annotator XYZ because this extends AnalysisComponent and both don't seem to be directly connected in the class hirarchy.

So here's my question: somehow UIMA needs to internally know the connection between my AnalysisEngine instance and my custom implementation class XYZ to be able to route method calls (like process()) to it. Can I somehow get the "AnalysisComponent" instance underlying an AnalysisEngine to be able to cast to my annotators class? Otherwise I can't test any additional public methods I added to my annotator. Any hints appreciated.

Christoph Büscher



Reply via email to