Search in sources :

Example 1 with UnknownOperation

use of com.google.refine.operations.UnknownOperation in project OpenRefine by OpenRefine.

the class ApplyOperationsCommand method reconstructOperation.

protected void reconstructOperation(Project project, ObjectNode obj) throws IOException {
    AbstractOperation operation = ParsingUtilities.mapper.convertValue(obj, AbstractOperation.class);
    if (operation != null && !(operation instanceof UnknownOperation)) {
        try {
            Process process = operation.createProcess(project, new Properties());
            project.processManager.queueProcess(process);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
Also used : AbstractOperation(com.google.refine.model.AbstractOperation) UnknownOperation(com.google.refine.operations.UnknownOperation) Process(com.google.refine.process.Process) Properties(java.util.Properties) ServletException(javax.servlet.ServletException) IOException(java.io.IOException)

Aggregations

AbstractOperation (com.google.refine.model.AbstractOperation)1 UnknownOperation (com.google.refine.operations.UnknownOperation)1 Process (com.google.refine.process.Process)1 IOException (java.io.IOException)1 Properties (java.util.Properties)1 ServletException (javax.servlet.ServletException)1