Unfortunately sofa mapping in a Java aggregate have no effect on C++ components running in process via the JNI. There is a fairly simple workaround which is to define the necessary sofa mapping in a C++ aggregate wrapping the C++ annotator.
There are two minor issues doing this: https://issues.apache.org/jira/browse/UIMA-1939 (fixed in UIMA 2.3.1) https://issues.apache.org/jira/browse/UIMA-1941 (fixed in SVN, will be in UIMACPP 2.3.1 when it is released) Another workaround is to have the C++ annotator explicitly ask for the specified view. Eddie On Fri, Mar 11, 2011 at 12:09 PM, Sylvain Surcin <[email protected]> wrote: > Hello all, > > I have the feeling I'm missing something about Sofa mappings. > > I have 2 developped 2 processing chains, one is purely Java and in the other > one, I have re-implemented one of the annotators (let's call it AEJava) in > C++ (let's call it AECpp). > > In the Java aggregate AE descriptor, I have various Sofas, one of them being > "rView", and I have declared a mapping to AEJava / _InitialView. > (I have declared _InitialView as input Sofa as well, I'm not really sure it > is necessary...) > And it all works fine. > > In the mixed Java/C++ aggregate AE descriptor, I have done the same, as > would be expected, with the mapping from "rView" to AECpp / _InitialView. > (and _InitialView is an input Sofa as well). > But here it does not work: when I request tcas.getView("_InitialView") from > the process methode of my C++ annotator, I'm getting the _InitialView of the > aggregate AE, and not the rView as I do in the full Java chain. > > Can you explain what I'm doing wrong? > > Thanks for any tips. > Sylvain >
