Skip to content

Commit

Permalink
Part of #2957
Browse files Browse the repository at this point in the history
  • Loading branch information
raprasad committed Feb 17, 2016
1 parent d9c0d30 commit 5b1664a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,20 @@ public Response getWorldMapDatafileInfo(String jsonTokenData, @Context HttpServl
// (4) Roll it all up in a JSON response
final JsonObjectBuilder jsonData = Json.createObjectBuilder();

//------------------------------------
// Type of file, currently:
// - shapefile or
// - tabular file (.tab) with geospatial tag
//------------------------------------
if (dfile.isShapefileType()){
jsonData.add("mapping_type", "shapefile");
}else if (dfile.isTabularData()){
jsonData.add("mapping_type", "tabular");
}else{
logger.log(Level.SEVERE, "This was neither a Shapefile nor a Tabular data file. DataFile id: " + dfile.getId());
return errorResponse( Response.Status.BAD_REQUEST, "Sorry! This file does not have mapping data. Please contact the Dataverse administrator. DataFile id: " + dfile.getId());
}


//------------------------------------
// DataverseUser Info
Expand Down

0 comments on commit 5b1664a

Please sign in to comment.