@Test public void testCreateCollectionReader() throws UIMAException, IOException { CollectionReader reader = CollectionReaderFactory.createReader( SingleFileXReader.class, typeSystemDescription, SingleFileXReader.PARAM_FILE_NAME, "src/test/resources/data/docs/test.xmi", SingleFileXReader.PARAM_XML_SCHEME, SingleFileXReader.XMI); JCasIterator jCasIterator = new JCasIterator(reader, typeSystemDescription); jCas = jCasIterator.next(); assertNotNull(jCas); assertEquals("Me and all my friends are non-conformists.", jCas.getDocumentText()); Token token = JCasUtil.selectByIndex(jCas, Token.class, 2); assertEquals("all", token.getCoveredText()); assertEquals("A", token.getPos()); assertEquals("all", token.getStem()); reader = createReader( "org.apache.uima.fit.factory.testCrs.SingleFileXReader", SingleFileXReader.PARAM_FILE_NAME, "src/test/resources/data/docs/test.xmi", SingleFileXReader.PARAM_XML_SCHEME, SingleFileXReader.XMI); jCasIterator = new JCasIterator(reader, typeSystemDescription); jCas = jCasIterator.next(); assertNotNull(jCas); assertEquals("Me and all my friends are non-conformists.", jCas.getDocumentText()); token = JCasUtil.selectByIndex(jCas, Token.class, 9); assertEquals(".", token.getCoveredText()); assertEquals(".", token.getPos()); assertEquals(".", token.getStem()); reader = createReaderFromPath( "src/test/resources/org/apache/uima/fit/factory/testCrs/SingleFileXReader.xml", SingleFileXReader.PARAM_FILE_NAME, "src/test/resources/data/docs/test.xmi", SingleFileXReader.PARAM_XML_SCHEME, SingleFileXReader.XMI); jCasIterator = new JCasIterator(reader, typeSystemDescription); jCas = jCasIterator.next(); assertNotNull(jCas); assertEquals("Me and all my friends are non-conformists.", jCas.getDocumentText()); token = JCasUtil.selectByIndex(jCas, Token.class, 4); assertEquals("friends", token.getCoveredText()); assertEquals("F", token.getPos()); assertEquals("friend", token.getStem()); }
@Deprecated public static CollectionReader createCollectionReader(String descriptorName, Object... configurationData) throws IOException, ResourceInitializationException, InvalidXMLException { return createReader(descriptorName, configurationData); }
CollectionReaderFactory { @Deprecated public static CollectionReader createCollectionReader(String descriptorName, Object... configurationData) throws IOException, ResourceInitializationException, InvalidXMLException { return createReader(descriptorName, configurationData); } }
CollectionReaderFactory { @Deprecated public static CollectionReader createCollectionReader(String descriptorName, Object... configurationData) throws IOException, ResourceInitializationException, InvalidXMLException { return createReader(descriptorName, configurationData); } private  CollectionReaderFactory(); }
CollectionReaderFactory { @Deprecated public static CollectionReader createCollectionReader(String descriptorName, Object... configurationData) throws IOException, ResourceInitializationException, InvalidXMLException { return createReader(descriptorName, configurationData); } private  CollectionReaderFactory(); static CollectionReader createReaderFromPath(String descriptorPath,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReaderFromPath(String descriptorPath,
          Object... configurationData); static CollectionReaderDescription createReaderDescriptionFromPath(String descriptorPath,
          Object... configurationData); @Deprecated static CollectionReaderDescription createCollectionReaderDescriptionFromPath(
          String descriptorPath, Object... configurationData); static CollectionReader createReader(String descriptorName, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(String descriptorName,
          Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); static CollectionReader createReader(CollectionReaderDescription desc,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReader(CollectionReaderDescription desc,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues,
          Map<String, ExternalResourceDescription> externalResources); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues,
          Map<String, ExternalResourceDescription> externalResources); }
CollectionReaderFactory { @Deprecated public static CollectionReader createCollectionReader(String descriptorName, Object... configurationData) throws IOException, ResourceInitializationException, InvalidXMLException { return createReader(descriptorName, configurationData); } private  CollectionReaderFactory(); static CollectionReader createReaderFromPath(String descriptorPath,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReaderFromPath(String descriptorPath,
          Object... configurationData); static CollectionReaderDescription createReaderDescriptionFromPath(String descriptorPath,
          Object... configurationData); @Deprecated static CollectionReaderDescription createCollectionReaderDescriptionFromPath(
          String descriptorPath, Object... configurationData); static CollectionReader createReader(String descriptorName, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(String descriptorName,
          Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); static CollectionReader createReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); @Deprecated static CollectionReader createCollectionReader(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); static CollectionReader createReader(CollectionReaderDescription desc,
          Object... configurationData); @Deprecated static CollectionReader createCollectionReader(CollectionReaderDescription desc,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          String[] prioritizedTypeNames, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          Object... configurationData); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          Object... configurationData); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues); static CollectionReaderDescription createReaderDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues,
          Map<String, ExternalResourceDescription> externalResources); @Deprecated static CollectionReaderDescription createDescription(
          Class<? extends CollectionReader> readerClass, TypeSystemDescription typeSystem,
          TypePriorities typePriorities, FsIndexCollection indexes, Capability[] capabilities,
          ConfigurationParameter[] configurationParameters, Object[] configurationValues,
          Map<String, ExternalResourceDescription> externalResources);  }