当前位置: 首页>>代码示例>>Java>>正文


Java AbstractOperation.createProcess方法代码示例

本文整理汇总了Java中com.google.refine.model.AbstractOperation.createProcess方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractOperation.createProcess方法的具体用法?Java AbstractOperation.createProcess怎么用?Java AbstractOperation.createProcess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.refine.model.AbstractOperation的用法示例。


在下文中一共展示了AbstractOperation.createProcess方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyTransform

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
private void applyTransform(Project project, JSONArray transform)
        throws JSONException {

    for (int i = 0; i < transform.length(); i++) {
        AbstractOperation operation = OperationRegistry.reconstruct(
                project, transform.getJSONObject(i));

        if (operation != null) {
            try {
                Process process = operation.createProcess(project,
                        new Properties());

                project.processManager.queueProcess(process);
            } catch (Exception ex) {
                fLogger.error("Error applying operation.", ex);
            }
        } else {
            fLogger.warn("Skipping unknown operation " + operation);
        }
    }
}
 
开发者ID:fusepoolP3,项目名称:p3-batchrefine,代码行数:22,代码来源:TransformEngineImpl.java

示例2: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String keyColumnName = request.getParameter("keyColumnName");
        String valueColumnName = request.getParameter("valueColumnName");
        String noteColumnName = request.getParameter("noteColumnName");
        
        AbstractOperation op = new KeyValueColumnizeOperation(
            keyColumnName, valueColumnName, noteColumnName);
        
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:22,代码来源:KeyValueColumnizeCommand.java

示例3: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String columnName = request.getParameter("columnName");
        String keyColumnName = request.getParameter("keyColumnName");
        String separator = request.getParameter("separator");
        String mode = request.getParameter("mode");
        
        AbstractOperation op = new MultiValuedCellSplitOperation(columnName, keyColumnName, separator, mode);
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:21,代码来源:SplitMultiValueCellsCommand.java

示例4: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String columnName = request.getParameter("columnName");
        String keyColumnName = request.getParameter("keyColumnName");
        String separator = request.getParameter("separator");
        
        AbstractOperation op = new MultiValuedCellJoinOperation(columnName, keyColumnName, separator);
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:20,代码来源:JoinMultiValueCellsCommand.java

示例5: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String columnName = request.getParameter("columnName");
        int rowCount = Integer.parseInt(request.getParameter("rowCount"));
        
        AbstractOperation op = new TransposeRowsIntoColumnsOperation(
                columnName, rowCount);
        
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:21,代码来源:TransposeRowsIntoColumnsCommand.java

示例6: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String columnName = request.getParameter("columnName");
        
        AbstractOperation op = new ColumnRemovalOperation(columnName);
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:18,代码来源:RemoveColumnCommand.java

示例7: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String columnName = request.getParameter("columnName");
        int index = Integer.parseInt(request.getParameter("index"));
        
        AbstractOperation op = new ColumnMoveOperation(columnName, index);
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:19,代码来源:MoveColumnCommand.java

示例8: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        String oldColumnName = request.getParameter("oldColumnName");
        String newColumnName = request.getParameter("newColumnName");
        
        AbstractOperation op = new ColumnRenameOperation(oldColumnName, newColumnName);
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:19,代码来源:RenameColumnCommand.java

示例9: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        AbstractOperation op;
        
        String startColumnName = request.getParameter("startColumnName");
        int columnCount = Integer.parseInt(request.getParameter("columnCount"));
        boolean ignoreBlankCells = Boolean.parseBoolean(request.getParameter("ignoreBlankCells"));
        boolean fillDown = Boolean.parseBoolean(request.getParameter("fillDown"));
        
        String combinedColumnName = request.getParameter("combinedColumnName");
        if (combinedColumnName != null) {
            boolean prependColumnName = Boolean.parseBoolean(request.getParameter("prependColumnName"));
            String separator = request.getParameter("separator");
            op = new TransposeColumnsIntoRowsOperation(
                startColumnName, columnCount,
                ignoreBlankCells, fillDown,
                combinedColumnName, prependColumnName, separator);
        } else {
            String keyColumnName = request.getParameter("keyColumnName");
            String valueColumnName = request.getParameter("valueColumnName");
            
            op = new TransposeColumnsIntoRowsOperation(
                startColumnName, columnCount,
                ignoreBlankCells, fillDown,
                keyColumnName, valueColumnName);
        }
        
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:39,代码来源:TransposeColumnsIntoRowsCommand.java

示例10: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        AbstractOperation op = new DenormalizeOperation();
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:16,代码来源:DenormalizeCommand.java

示例11: doPost

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    
    try {
        Project project = getProject(request);
        
        AbstractOperation op = createOperation(project, request, getEngineConfig(request));
        Process process = op.createProcess(project, new Properties());
        
        performProcessAndRespond(request, response, project, process);
    } catch (Exception e) {
        respondException(response, e);
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:16,代码来源:EngineDependentCommand.java

示例12: reconstructOperation

import com.google.refine.model.AbstractOperation; //导入方法依赖的package包/类
protected void reconstructOperation(Project project, JSONObject obj) {
    AbstractOperation operation = OperationRegistry.reconstruct(project, obj);
    if (operation != null) {
        try {
            Process process = operation.createProcess(project, new Properties());
            
            project.processManager.queueProcess(process);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:13,代码来源:ApplyOperationsCommand.java


注:本文中的com.google.refine.model.AbstractOperation.createProcess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。