Simplifying UIMA Component Development and Testing with Java Annotations and Dependency Injection Christophe Roeder, Philip V. Ogren, William A. Baumgartner Jr., and Lawrence Hunter Center for Computational Pharmacology University of Colorado Denver School of Medicine MS 8303, PO Box 6511, Aurora, CO 80045 USA Chris.Roeder@ucdenver.edu, philip@ogren.info, William.Baumgartner@ucdenver.edu, Larry.Hunter@ucdenver.edu Abstract. Developing within the Apache UIMA project framework presents challenges when writing and testing components in Java. Challenges stem from the relationship between the Java source code implement- ing the components and the corresponding UIMA XML descriptor files describing configuration and deployment settings. Java Annotations and Dependency Injection can be used to establish a stronger separation of concerns between framework integration and core component implemen- tation, thus freeing the developer from commonly repeated tasks and allowing simplified development and testing. 1 Introduction UIMA [1] components are defined by a pair of files: a source code file imple- menting component functionality and an XML descriptor file that stores com- ponent metadata consisting of component description information, e.g. informa- tion about input parameters (names, types, default values, etc.). At runtime, a third file specifies values for those input parameters: either the CPE descriptor when running in the CPM or an aggregate descriptor when running the AS. The current UIMA Java implementation burdens the developer with keeping the first two in synch, and it burdens the developer with writing and testing code to query the third. We propose two solutions: Java Annotations [2] to eliminate the duplication of component descriptor metadata, and a completed Dependency Injection implementation [3] to eliminate redundant configuration metadata extraction code. 2 Java Annotations Java Annotations are a facility that appeared in Java 1.5. They allow metadata to be defined in the Java source code and retained during the compilation process.