desc.setAnnotatorImplementationName("org.apache.uima.analysis_engine.impl.TestAnnotator");
TypeSystemDescription typeSystem = new TypeSystemDescription_impl();
TypeDescription type1 = typeSystem.addType("Type1", "Test Type One",
CAS.TYPE_NAME_ANNOTATION);
FeatureDescription feat1 = new FeatureDescription_impl();
feat1.setName("Feature1");
feat1.setRangeTypeName(CAS.TYPE_NAME_INTEGER);
type1.setFeatures(new FeatureDescription[] { feat1 });
TypeDescription type2 = typeSystem.addType("Type2", "Test Type Two",
CAS.TYPE_NAME_ANNOTATION);
FeatureDescription feat2 = new FeatureDescription_impl();
feat2.setName("Feature2");
feat2.setRangeTypeName("EnumType");
type2.setFeatures(new FeatureDescription[] { feat2 });
TypeDescription enumType = typeSystem.addType("EnumType", "Test Enumerated Type",
"uima.cas.String");
enumType.setAllowedValues(new AllowedValue[] { new AllowedValue_impl("One", "First Value"),
new AllowedValue_impl("Two", "Second Value") });