Displaying differences for changeset |
@@ -64,12 +64,7 @@ |
windURI = Config.getString("crp.windgen", windURI); |
climateURI = Config.getString("crp.cligen", climateURI); |
- if (params.has("aoa_geometry")) { |
- aoa_geometry = getParam("aoa_geometry"); |
- |
- } else { |
- throw new ServiceException("Service requires an aoa_geometry input."); |
- } |
+ aoa_geometry = params.getJSON("aoa_geometry"); |
if (params.has("stream_file")) { |
streamOutputFile = params.getBoolean("stream_file"); |
@@ -143,23 +138,4 @@ |
throw new ServiceException("Cannot write to that file: " + filename, ex); |
} |
} |
-//////////////////////////////// |
-// |
-// Private member functions |
-// |
-//////////////////////////////// |
- |
- /** |
- * Get the full JSON parameter record. |
- * |
- * @param name |
- * @return the JSON record. |
- */ |
- private JSONObject getParam(String name) throws ServiceException { |
- JSONObject p = getParamMap().get(name); |
- if (p == null) { |
- throw new ServiceException("Parameter not found: '" + name + "'"); |
- } |
- return p; |
- } |
} |