// delete all records identified by each sourceUri available in Iterable
ApplicationConfiguration appCfg = ApplicationContext.getInstance().getConfiguration();
boolean webharvesterCleanup = Val.chkBool(appCfg.getCatalogConfiguration().getParameters().getValue("webharvester.cleanup"), true);
if (webharvesterCleanup) {
LOGGER.info("[SYNCHRONIZER] Attempting to clean non-existend records from: "+unit);
DeleteSourceUrisRequest deleteSourceUrisRequest = new DeleteSourceUrisRequest(context, unit.getPublisher(), iterable);
try {
deleteSourceUrisRequest.execute();
LOGGER.info("[SYNCHRONIZER] Cleaned "+deleteSourceUrisRequest.getDeletedCount()+" records from: "+unit);
return deleteSourceUrisRequest.getDeletedCount();
} catch (Exception ex) {
LOGGER.log(Level.SEVERE, "[SYNCHRONIZER] Error when attempting to clean non-existend records from: "+unit, ex);
}
}
}