Hi, I just added two tests, which indicate that the problem must be somewhere in my Ruta code. The AE works as expected when called by java code, but not when called by a Ruta script.
Peter On 09.08.2013 16:48, Peter Klügl wrote: > sorry, I won't be able to create a test case today. It has to wait until > next week. > > Peter > > On 08.08.2013 21:02, Marshall Schor wrote: >> :-) >> On 8/8/2013 2:42 PM, Peter Klügl wrote: >>> Am 08.08.2013 20:26, schrieb Marshall Schor: >>>> On 8/8/2013 11:59 AM, Peter Klügl wrote: >>>>> Hi, >>>>> >>>>> I wonder how to implement a generic AE that is able to create a new CAS >>>>> and copies a given view to a specified view of the new CAS. The new CAS >>>>> then should be serialized. >>>>> >>>>> What I tried is here: >>>>> https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java >>>>> >>>>> >>>>> When I call this AE within Ruta without mapping, then >>>>> getContext().getEmptyCas(CAS.class) returns a CAS without additional >>>>> types and CasCopier removes all annotations (due to lenient). With >>>>> mapping, it complains that the sofaFS specified by the parameter cannot >>>>> be found. >>>> The getContext().getEmptyCas(CAS.class) is defined to get a empty CAS >>>> which has >>>> the same type system as the current one. The getContext() should return a >>>> UimaContext object. A Cas definition is located from that via the >>>> UimaContext's >>>> getResourceManger() call , which should return the overall (for the >>>> pipeline) >>>> ResourceManager. That, in turn, has a getCasManager() which should be >>>> pointing >>>> to info that includes the Type System info of the CAS that's flowing in the >>>> pipeline. >>>> >>>> So I don't know why all the annotations are being removed. You shouldn't >>>> need >>>> the lenient option - the type system should be the same, I think. >>>> >>>> If you can post sufficient instructions to enable me to run (from trunk), >>>> or >>>> have a driver/ testcase, I can try and see what's going on... >>> I will try to provide one tomorrow. >>> >>> Peter >>> >>> >>> >>>> -Marshall >>>> >>>>> I tried a few things without success. The next thing would be to provide >>>>> a parameter with the location of a descriptor for creating a separate >>>>> CAS and completely avoiding the CAS multiplier functionality... >>>>> >>>>> Any ideas? >>>>> >>>>> Peter >>>>>
