People tend to fall back to using Java Reflections on the JCas wrappers, before using the lower-level UIMA interfaces (CAS and AnnotationFS/ FeatureStructure).
Every UIMA annotation implements the interface FeatureStructure. This interface in conjunction with the type system information you can obtain from the CAS, provides all you need to extract all information. There is no need to resort to reflection. You may want to have a look at the source code of the CasCopier class too. -- Richard Am 12.07.2013 um 20:16 schrieb Chuong Ngo <[email protected]>: > Is there a way to get all the features for an annotator, no matter which > one it is? > > For example, I want to convert all annotators I get back into a JSON > respresenting that annotator. My annotators have different number and > types of features. For example, a person may have firstName, lastName > while an organization may have type, health, etc... Is there another way > to do that besides casting each one to a predetermined type and then using > the getters to extract the feature values? Thanks in advance. > > Chuong Ngo
