/** * Creates a {@link TypeSystemDescription} from all type descriptions that can be found via the * default import pattern or via the {@code META-INF/org.apache.uima.fit/types.txt} files in the * classpath. * * @return the auto-scanned type system. * @throws ResourceInitializationException * if the collected type system descriptions cannot be merged. */ public static TypeSystemDescription createTypeSystemDescription() throws ResourceInitializationException { List<TypeSystemDescription> tsdList = new ArrayList<TypeSystemDescription>(); for (String location : scanTypeDescriptors()) { try { XMLInputSource xmlInputType1 = new XMLInputSource(location); tsdList.add(getXMLParser().parseTypeSystemDescription(xmlInputType1)); LogFactory.getLog(TypeSystemDescription.class).debug( "Detected type system at [" + location + "]"); } catch (IOException e) { throw new ResourceInitializationException(e); } catch (InvalidXMLException e) { LogFactory.getLog(TypeSystemDescription.class).warn( "[" + location + "] is not a type file. Ignoring.", e); } } ResourceManager resMgr = ResourceManagerFactory.newResourceManager(); return mergeTypeSystems(tsdList, resMgr); }