/** * For coregistration * * @param graphEx the graph executer * @param productSetID the product set reader * @param masterFile master file * @param slaveFiles slave file list */ protected static void setSlaveIO(final GraphExecuter graphEx, final String productSetID, final File masterFile, final File[] slaveFiles) { final GraphNode productSetNode = graphEx.getGraphNodeList().findGraphNodeByOperator(productSetID); if (productSetNode != null) { StringBuilder str = new StringBuilder(masterFile.getAbsolutePath()); for (File slaveFile : slaveFiles) { str.append(','); str.append(slaveFile.getAbsolutePath()); } graphEx.setOperatorParam(productSetNode.getID(), "fileList", str.toString()); } }
protected void setIO(final GraphExecuter graphEx, final String readID, final File readPath, final String writeID, final File writePath, final String format) { final GraphNode readNode = graphEx.getGraphNodeList().findGraphNodeByOperator(readID); if (readNode != null) { graphEx.setOperatorParam(readNode.getID(), "file", readPath.getAbsolutePath()); } if (replaceWritersWithUniqueTargetProduct && writeID != null) { final GraphNode writeNode = graphEx.getGraphNodeList().findGraphNodeByOperator(writeID); if (writeNode != null) { if (format != null) graphEx.setOperatorParam(writeNode.getID(), "formatName", format); graphEx.setOperatorParam(writeNode.getID(), "file", writePath.getAbsolutePath()); } } }
/** * Update the nodes in the graph with the given reader file and writer file */ public static void setGraphIO(final GraphExecuter graphEx, final String readID, final File readPath, final String writeID, final File writePath, final String format) { final GraphNode readNode = graphEx.getGraphNodeList().findGraphNode(readID); if (readNode != null) { graphEx.setOperatorParam(readNode.getID(), "file", readPath.getAbsolutePath()); } if (writeID != null) { final GraphNode writeNode = graphEx.getGraphNodeList().findGraphNode(writeID); if (writeNode != null) { graphEx.setOperatorParam(writeNode.getID(), "formatName", format); graphEx.setOperatorParam(writeNode.getID(), "file", writePath.getAbsolutePath()); } } }