@Test public void thatCreateReaderDescriptorAutoDetectionWorks() throws Exception { CollectionReaderDescription aed = createReaderDescription(TestCR.class); TypeSystemDescription tsd = createTypeSystemDescription(); assertThat(tsd.getType(Token.class.getName())) .as("Token type auto-detection") .isNotNull(); assertThat(tsd.getType(Sentence.class.getName())) .as("Sentence type auto-detection") .isNotNull(); assertThat(tsd.getType(AnalyzedText.class.getName())) .as("AnalyzedText type auto-detection") .isNotNull(); TypePriorityList[] typePrioritiesLists = typePriorities.getPriorityLists(); assertThat(typePrioritiesLists.length).isEqualTo(1); assertThat(typePrioritiesLists[0].getTypes()) .as("Type priorities auto-detection") .containsExactly(Sentence.class.getName(), AnalyzedText.class.getName(), Token.class.getName()); FsIndexDescription[] indexes = aed.getCollectionReaderMetaData().getFsIndexCollection().getFsIndexes(); assertThat(indexes.length).isEqualTo(1); assertThat(indexes[0]) .extracting(FsIndexDescription::getLabel, FsIndexDescription::getTypeName, FsIndexDescription::getKind) .containsExactly("Automatically Scanned Index", Token.class.getName(), FsIndexDescription.KIND_SORTED); }
public static CollectionReaderDescription createReaderDescription( Class<? extends CollectionReader> readerClass, Object... configurationData) throws ResourceInitializationException { TypeSystemDescription typeSystem = createTypeSystemDescription(); TypePriorities typePriorities = createTypePriorities(); FsIndexCollection fsIndexCollection = createFsIndexCollection(); return createReaderDescription(readerClass, typeSystem, typePriorities, fsIndexCollection, (Capability[]) null, configurationData); }
CollectionReaderFactory { public static CollectionReaderDescription createReaderDescription( Class<? extends CollectionReader> readerClass, Object... configurationData) throws ResourceInitializationException { TypeSystemDescription typeSystem = createTypeSystemDescription(); TypePriorities typePriorities = createTypePriorities(); FsIndexCollection fsIndexCollection = createFsIndexCollection(); return createReaderDescription(readerClass, typeSystem, typePriorities, fsIndexCollection, (Capability[]) null, configurationData); } }
CollectionReaderFactory { public static CollectionReaderDescription createReaderDescription( Class<? extends CollectionReader> readerClass, Object... configurationData) throws ResourceInitializationException { TypeSystemDescription typeSystem = createTypeSystemDescription(); TypePriorities typePriorities = createTypePriorities(); FsIndexCollection fsIndexCollection = createFsIndexCollection(); return createReaderDescription(readerClass, typeSystem, typePriorities, fsIndexCollection, (Capability[]) null, configurationData); } private  CollectionReaderFactory(); }
CollectionReaderFactory { public static CollectionReaderDescription createReaderDescription( Class<? extends CollectionReader> readerClass, Object... configurationData) throws ResourceInitializationException { TypeSystemDescription typeSystem = createTypeSystemDescription(); TypePriorities typePriorities = createTypePriorities(); FsIndexCollection fsIndexCollection = createFsIndexCollection(); return createReaderDescription(readerClass, typeSystem, typePriorities, fsIndexCollection, (Capability[]) null, 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 { public static CollectionReaderDescription createReaderDescription( Class<? extends CollectionReader> readerClass, Object... configurationData) throws ResourceInitializationException { TypeSystemDescription typeSystem = createTypeSystemDescription(); TypePriorities typePriorities = createTypePriorities(); FsIndexCollection fsIndexCollection = createFsIndexCollection(); return createReaderDescription(readerClass, typeSystem, typePriorities, fsIndexCollection, (Capability[]) null, 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);  }