use of com.google.refine.operations.row.RowReorderOperation in project OpenRefine by OpenRefine.
the class ReorderRowsCommand method createOperation.
@Override
protected AbstractOperation createOperation(Project project, HttpServletRequest request, EngineConfig engineConfig) throws Exception {
String mode = request.getParameter("mode");
SortingConfig sorting = null;
try {
String json = request.getParameter("sorting");
sorting = (json == null) ? null : SortingConfig.reconstruct(json);
} catch (IOException e) {
// ignore
}
return new RowReorderOperation(Engine.stringToMode(mode), sorting);
}
use of com.google.refine.operations.row.RowReorderOperation in project OpenRefine by OpenRefine.
the class ReorderRowsCommand method createOperation.
@Override
protected AbstractOperation createOperation(Project project, HttpServletRequest request, JSONObject engineConfig) throws Exception {
String mode = request.getParameter("mode");
JSONObject sorting = null;
try {
String json = request.getParameter("sorting");
sorting = (json == null) ? null : ParsingUtilities.evaluateJsonStringToObject(json);
} catch (JSONException e) {
// ignore
}
return new RowReorderOperation(Engine.stringToMode(mode), sorting);
}
Aggregations