Hi Armin. Thanks for your quick answer! While the workaround is indeed helpful, I am still curios why is there no regular mechanism to define new types and create new descriptors programmatically, much like all other UIMA components?
I mean, what is the difference between type-system and all other UIMA components, that forced the UimaFIT engineers to leave the XML-based definitions for types, while getting rid of XMLs for all the rest of UIMA? 2016-09-09 13:59 GMT+03:00 <armin.weg...@bka.bund.de>: > Hi Asher! > > As a work around, you can use an empty type system, > > TypeSystemDescription tsd = TypeSystemDescriptionFactory. > createTypeSystemDescription("EmptyTypeSystem"); > > add types programmatically, > > tsd.addType(typeName, null, CAS.TYPE_NAME_ANNOTATION); > > and get them later with > > Type type = cas.getTypeSystem().getType(typeName); > > The empty type system is an XML descriptor file without types residing > somewhere in the class path. I use this for unit testing when I need a > fresh type system. > > Cheers, > Armin > > > -----Ursprüngliche Nachricht----- > Von: Asher Stern [mailto:aste...@gmail.com] > Gesendet: Freitag, 9. September 2016 12:17 > An: user@uima.apache.org > Betreff: General question about UimaFIT > > Hi. > I have a general question regarding UimaFIT. > In UimaFIT there is no longer need to write and deal with XML files, thanks > to new classes and annotations. > > This is the case for almost all UIMA components, like AE, AAE, CPE, etc. > However, for type-system definition, XML files are still required. > My question is why? > Is there a technical issue that makes it impossible to get rid of > type-system XMLs? Or is it intentional due to some policy? > > > Thanks in advance, > Asher >