LOGGER.debug("Copy snapshot : " + layer + ", " + year + ", " + month + ", " + day);
try {
// read the shape file and put it into a SimpeFeatureCollection
SimpleFeatureSource srcFs = srcDs.getFeatureSource(layer);
// try to look for the destination table
if(Arrays.asList(dstDs.getTypeNames()).contains(layer)) {
LOGGER.error("******* "+layer +" EXISTS *******");
} else
LOGGER.error("******* "+layer +" DOES NOT EXIST *******");
try {
SimpleFeatureSource dstFs = (SimpleFeatureSource) dstDs.getFeatureSource(layer);
} catch (Exception e) {
LOGGER.debug("Exception while getting dst featureSource from " + layer +": " +e.getMessage(), e );
if (forceCreation) {
// force creation of the target table