Hi Mario, > On 18. Oct 2020, at 11:49, Mario Juric <mario.ju...@cactusglobal.com> wrote: > > I experimented with the CAS-transported custom Java objects feature, and I > found that it’s indirectly possible to use them with JCasGen by following the > guidelines to wrap each custom Java object in an UIMA type, which can be > reused as an attribute or through inheritance in the type system. The custom > type will have to be handcrafted though, but that is a small thing, and > JCasGen can be used to generate the initial template, but this is all covered > in the documentation.
Good you found a workaround :) Personally, I think evolving the type system description / JCasGen a bit would be a good idea. In particular, I would like to see the ability to specify interfaces that a given generated type should implement. > There is a trade off in our case, it will break with the type system of a > large number of existing binaries that we saved, since we already use FSArray > where we currently wanna replace it with some custom Java object. I am not > sure how big this issue is for others, but we have some large data sets that > we prefer not to reprocess from scratch too often, although it will happen at > some point. Nevertheless, this design trick brings us some of the way even > though it’s not "the full monty” as I imagine. Well, this sounds like a format conversion. So in principle, you wouldn't need to re-process all the data but rather to implement a pipeline which reads the old format, transfers the information that changed into the new CAS-transported objects, removes the old objects, and writes the result out again. I would hope that the UIMA APIs ((J)Cas, pipeline concept) would support that reasonably well. Of course, it means implementing some Java code and not just to have some "simple" declarative language. But then again, in the general case, such conversions can be arbitrarily complex and "simple" transformation language tend to hit their limits soon or they are not "simple" anymore... in which case a proper language like Java could have been already used in the first place. Cheers, -- Richard