protected Optional<CollectionReaderDescription> createCollectionReader(String className,Map<String,Object> params,String defaultPackage){
  if (className == null || className.isEmpty()) {
    LOGGER.warn("No class specified for Collection Reader");
    return Optional.empty();
  }
  Map<String,Object> nonNullParams=params;
  if (nonNullParams == null) {
    nonNullParams=Collections.emptyMap();
  }
  try {
    Class<? extends CollectionReader> clazz=CpeBuilderUtils.getClassFromString(className,defaultPackage);
    Map<String,ExternalResourceDescription> crResources=getOrCreateResources(clazz);
    Object[] cpeParam=CpeBuilderUtils.mergeAndExtractParams(globalConfig,nonNullParams,ignoreParams,crResources);
    CollectionReaderDescription cr=CollectionReaderFactory.createReaderDescription(clazz,cpeParam);
    return Optional.ofNullable(cr);
  }
 catch (  Exception rie) {
    LOGGER.warn("Couldn't initialize collection reader",rie);
    return Optional.empty();
  }
}

protected Optional < CollectionReaderDescription > createCollectionReader ( String className , Map < String , Object > params , String defaultPackage ) { if ( className == null || className . isEmpty ( ) ) { LOGGER . warn ( "No class specified for Collection Reader" ) ; return Optional . empty ( ) ; } Map < String , Object > nonNullParams = params ; if ( nonNullParams == null ) { nonNullParams = Collections . emptyMap ( ) ; } try { Class < ? extends CollectionReader > clazz = CpeBuilderUtils . getClassFromString ( className , defaultPackage ) ; Map < String , ExternalResourceDescription > crResources = getOrCreateResources ( clazz ) ; Object [ ] cpeParam = CpeBuilderUtils . mergeAndExtractParams ( globalConfig , nonNullParams , ignoreParams , crResources ) ; CollectionReaderDescription cr = CollectionReaderFactory . createReaderDescription ( clazz , cpeParam ) ; return Optional . ofNullable ( cr ) ; } catch ( Exception rie ) { LOGGER . warn ( "Couldn't initialize collection reader" , rie ) ; return Optional . empty ( ) ; } }
create a collectionreaderdescription using the current configuration .
