@Override public void graphProcessingStopped(GraphContext graphContext) { VelocityContext velocityContext = metadataResourceEngine.getVelocityContext(); velocityContext.put("graph", graphContext.getGraph()); Product[] outputProducts = graphContext.getOutputProducts(); if (outputProducts.length >= 1) { Operator currentOperator = null; Map<String, Product> sourceProducts = new HashMap<>(); for (Node node : graphContext.getGraph().getNodes()) { final NodeContext nodeContext = graphContext.getNodeContext(node); currentOperator = nodeContext.getOperator();
private void initOutput(Operator graphOp) throws GraphException { for (Node node : getGraph().getNodes()) { NodeContext nodeContext = getNodeContext(node); if (nodeContext.isOutput()) { initNodeContext(nodeContext, graphOp); addOutputNodeContext(nodeContext); } } }
public void graphProcessingStopped(GraphContext graphContext) { ralla("graph [" + graphContext.getGraph().getId() + "] stopped"); }
public void graphProcessingStarted(GraphContext graphContext) { ralla("graph [" + graphContext.getGraph().getId() + "] started"); }
String referenceNodeId = referenceParts[0]; String propertyName = referenceParts[1]; Node node = getGraph().getNode(referenceNodeId); NodeContext referredNodeContext = getNodeContext(node); Operator operator = referredNodeContext.getOperator();
private void initNodeDependencies() throws GraphException { Graph graph = getGraph(); for (Node node : graph.getNodes()) { for (NodeSource source : node.getSources()) { String sourceNodeId = source.getSourceNodeId(); Node sourceNode = graph.getNode(sourceNodeId); if (sourceNode == null) { Header header = graph.getHeader(); boolean sourceDefinedInHeader = header != null && isSourceNodeIdInHeader(sourceNodeId, header.getSources()); if (!sourceDefinedInHeader) { throw new GraphException(getMissingSourceMessage(node, source)); } } if (sourceNode != null) { getNodeContext(sourceNode).incrementReferenceCount(); source.setSourceNode(sourceNode); } } } }