Ejemplo n.º 1
0
  public NodeLevelMap apply(ValueStreamMap valueStreamMap) {
    Node rootNode =
        valueStreamMap.getCurrentPipeline() != null
            ? valueStreamMap.getCurrentPipeline()
            : valueStreamMap.getCurrentMaterial();
    rootNode.setLevel(0);

    if (!rootNode.getParents().isEmpty()) {
      assignLevelsToDependencies(rootNode, new Upstream());
    }

    if (!rootNode.getChildren().isEmpty()) {
      assignLevelsToDependencies(rootNode, new Downstream());
    }

    return levelToNodesMap(valueStreamMap);
  }
Ejemplo n.º 2
0
 @Override
 public List<Node> getRelatedNodes(Node node) {
   return node.getChildren();
 }