System.out.println("ERROR: The key used in -i parameter must match a valid outputMapping in the BTE Spring XML configuration file!");
return;
}
if (dataLoader instanceof FileDataLoader){
FileDataLoader fdl = (FileDataLoader) dataLoader;
if (!StringUtils.isBlank(sourceDir)) {
System.out.println("INFO: Dataloader will load data from the file specified in the command prompt (and not from the Spring XML configuration file)");
fdl.setFilename(sourceDir);
}
}
else if (dataLoader instanceof OAIPMHDataLoader){
OAIPMHDataLoader fdl = (OAIPMHDataLoader) dataLoader;
System.out.println(sourceDir);
if (!StringUtils.isBlank(sourceDir)){
System.out.println("INFO: Dataloader will load data from the address specified in the command prompt (and not from the Spring XML configuration file)");
fdl.setServerAddress(sourceDir);
}
}
if (dataLoader!=null){
System.out.println("INFO: Dataloader " + dataLoader.toString()+" will be used for the import!");