ExportFormat outputFormat = null;
if( Format.GEOJSON == format ) {
try {
SchemaCache schemaCache = new SchemaCacheCouchDb(configuration.getCouchDb());
outputFormat = new ExportFormatGeoJson(schemaCache, docRetrieval, docFilter);
} catch (Exception e) {
throw new ServletException("Problem setting up format: "+format.name(),e);
}
} else {
throw new ServletException("Do not know how to handle format: "+format.name());