Examples of PythonRepository


Examples of edu.isi.karma.er.helper.PythonRepository

    logger.debug("Executing PyTransform\n" + transformMethodStmt);

    // Prepare the Python interpreter
    PythonInterpreter interpreter = new PythonInterpreter();

    PythonRepository repo = PythonRepository.getInstance();
    repo.initializeInterperter(interpreter);
    repo.importUserScripts(interpreter);
   
    repo.compileAndAddToRepositoryAndExec(interpreter, transformMethodStmt);

    Collection<Node> nodes = new ArrayList<Node>(Math.max(1000, worksheet
        .getDataTable().getNumRows()));
    worksheet.getDataTable().collectNodes(hNode.getHNodePath(f), nodes, selection);

    Map<String, String> rowToValueMap = new HashMap<String, String>();

    int counter = 0;
    long starttime = System.currentTimeMillis();
    // Go through all nodes collected for the column with given hNodeId

    interpreter.set("workspaceid", workspace.getId());
    interpreter.set("command", this);
    interpreter.set("selectionName", selection.getName());
    PyCode py = repo.getTransformCode();

    int numRowsWithErrors = 0;

    for (Node node : nodes) {
      Row row = node.getBelongsToRow();
View Full Code Here

Examples of edu.isi.karma.er.helper.PythonRepository


    logger.debug("Executing PySelection\n" + transformMethodStmt);

    // Prepare the Python interpreter
    PythonRepository repo = PythonRepository.getInstance();
    repo.initializeInterperter(interpreter);
    repo.importUserScripts(interpreter);

    repo.compileAndAddToRepositoryAndExec(interpreter, transformMethodStmt);

    interpreter.set("workspaceid", workspace.getId());
    interpreter.set("selectionName", superSelectionName);
    interpreter.set("command", this);
    return repo.getTransformCode();
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.