// if aType is a "subtype" of uima.cas.String, create an EEnum for it
if (CAS.TYPE_NAME_STRING.equals(aType.getSupertypeName())) {
eclassifier = EcoreFactory.eINSTANCE.createEEnum();
AllowedValue[] vals = aType.getAllowedValues();
for (int i = 0; i < vals.length; i++) {
EEnumLiteral literal = EcoreFactory.eINSTANCE.createEEnumLiteral();
literal.setValue(i);
literal.setName(vals[i].getString());
if (vals[i].getDescription() != null && vals[i].getDescription().length() > 0) {
EAnnotation eannot = EcoreFactory.eINSTANCE.createEAnnotation();
eannot.setSource("http://uima.apache.org");
eannot.getDetails().put("description", vals[i].getDescription());
literal.getEAnnotations().add(eannot);
}
((EEnum) eclassifier).getELiterals().add(literal);
}
} else {
// create EClass