if(curCollection.isEmpty()) {
if(isShapefileCompatible(originalSchema)) {
return writeShapefile(tempDir, curCollection);
} else {
SimpleFeatureType simplifiedShema = buildShapefileCompatible(originalSchema);
return writeShapefile(tempDir, new EmptyFeatureCollection(simplifiedShema));
}
}
// create the temp file for this output
File outFile = new File(tempDir, originalSchema.getTypeName() + ".gml");