public void assignParameters(final XppDom presentationXML) throws GraphException { for (GraphNode n : nodeList) { if (n.GetOperatorUI() != null) { n.AssignParameters(presentationXML); } } }
/** * pass in a file list for a ProductSetReader * * @param productFileList the product files */ public void setInputFiles(final File[] productFileList) { final GraphNode productSetNode = graphEx.getGraphNodeList().findGraphNodeByOperator("ProductSet-Reader"); if (productSetNode != null) { ProductSetReaderOpUI ui = (ProductSetReaderOpUI) productSetNode.GetOperatorUI(); ui.setProductFileList(productFileList); } }
private JComponent CreateOperatorTab(final GraphNode node) { return node.GetOperatorUI().CreateOpTab(node.getOperatorName(), node.getParameterMap(), appContext); }
protected void cloneGraphs() throws Exception { final GraphExecuter graphEx = graphExecutorList.get(0); for (int graphIndex = 1; graphIndex < graphExecutorList.size(); ++graphIndex) { final GraphExecuter cloneGraphEx = graphExecutorList.get(graphIndex); cloneGraphEx.ClearGraph(); } graphExecutorList.clear(); graphExecutorList.add(graphEx); final File[] fileList = productSetPanel.getFileList(); for (int graphIndex = 1; graphIndex < fileList.length; ++graphIndex) { final GraphExecuter cloneGraphEx = new GraphExecuter(); LoadGraph(cloneGraphEx, graphFile, false); graphExecutorList.add(cloneGraphEx); // copy UI parameter to clone final GraphNode[] cloneGraphNodes = cloneGraphEx.GetGraphNodes(); for (GraphNode cloneNode : cloneGraphNodes) { final GraphNode node = graphEx.getGraphNodeList().findGraphNode(cloneNode.getID()); if (node != null) cloneNode.setOperatorUI(node.GetOperatorUI()); } } }
private void addGraphTabs(final String title, final boolean addUI) { if (graphExecutorList.isEmpty()) { return; } tabbedPane.setSelectedIndex(0); while (tabbedPane.getTabCount() > 1) { tabbedPane.remove(tabbedPane.getTabCount() - 1); } final GraphExecuter graphEx = graphExecutorList.get(0); for (GraphNode n : graphEx.GetGraphNodes()) { if (n.GetOperatorUI() == null) continue; if (n.getNode().getOperatorName().equals("Read") || (replaceWritersWithUniqueTargetProduct && n.getNode().getOperatorName().equals("Write")) || n.getNode().getOperatorName().equals("ProductSet-Reader")) { n.setOperatorUI(null); continue; } if (addUI) { String tabTitle = title; if (tabTitle.isEmpty()) tabTitle = n.getOperatorName(); tabbedPane.addTab(tabTitle, null, n.GetOperatorUI().CreateOpTab(n.getOperatorName(), n.getParameterMap(), appContext), n.getID() + " Operator"); } } }
/** * pass in a file list for a ProductSetReader * * @param product the product files */ public void setInputFile(final Product product) { final GraphNode readerNode = graphEx.getGraphNodeList().findGraphNodeByOperator( ReadOp.Spi.getOperatorAlias(ReadOp.class)); if (readerNode != null) { SourceUI ui = (SourceUI) readerNode.GetOperatorUI(); ui.setSourceProduct(product); ValidateAllNodes(); } }