{@inheritDoc}

@see jp.co.future.uroborosql.node.Node#passed(PassedRoute)
9473
@Override
	public void passed(final PassedRoute passed) {
		passed.appendBranchState(getPosition(), getPosition() + getLength() - 1, this.getState());
		super.passed(passed);
	}
119694
private static void traverseNode(final Node node, final Set<String> params) {
		if (node instanceof BindVariableNode) {
			params.add(((BindVariableNode) node).getExpression());
		} else if (node instanceof ParenBindVariableNode) {
			params.add(((ParenBindVariableNode) node).getExpression());
		} else if (node instanceof EmbeddedValueNode) {
			params.add(((EmbeddedValueNode) node).getExpression());
		} else if (node instanceof IfNode) {
			try {
				String expression = ((IfNode) node).getExpression();
				ognl.Node ognlNode = (ognl.Node) Ognl.parseExpression(expression);
				traverseExpression(ognlNode, params);
			} catch (OgnlException e) {
				e.printStackTrace();
			}
		}

		for (int i = 0; i < node.getChildSize(); i++) {
			Node childNode = node.getChild(i);
			traverseNode(childNode, params);
		}
	}
769386
public boolean process(Trace trace, Node node, Direction direction,
            Map<String, ?> headers, Object[] values) {

        if (predicate != null) {
            return predicate.test(trace, node, direction, headers, values);
        }

        return true;
    }
155758
function decendTreeByRoutedToken(node, value, routeToken) {
    var next = null;
    switch (value) {
        case Keys.keys:
        case Keys.integers:
        case Keys.ranges:
            next = node[value];
            if (!next) {
                next = node[value] = {};
            }
            break;
        default:
            break;
    }
    if (next && routeToken) {
        // matches the naming information on the node.
        next[Keys.named] = routeToken.named;
        next[Keys.name] = routeToken.name;
    }

    return next;
}
82844
public function node(string $path_spec, string $varname = null, string $type = null) : RouteNodeInterface
    {
        $children = $this->getChildren();
        $node = $children[$path_spec] ?? null;
        if (!$node){
            $child_node_id = $this->getNodeId() . '/' . $path_spec;
            $node = new RouteNode($child_node_id, $path_spec, $varname, $type);
            $children[$path_spec] = $node;
            $this->setChildren($children);
        }
        return $node;
    }
1076322
function getRoute(node) {
	var id = "";

	var parent = node.parentNode;
	var index = -1;

	if(!parent) {
		return {id:"0"};
	}

	var child = parent.firstChild;
	while(child) {
		index++;
		if(child === node) {
			break;
		}
		child = child.nextSibling;
	}

	// ARG!

	var parentInfo = parent.nodeType === 9 ? {id:""} :
		getCachedInfo(parent) || getRoute(parent);

	var parentId = parentInfo.id;

	id = (parentId ? parentId + SEPARATOR : "") + index;

	var routeInfo = {
		id: id,
		branch: getBranch(index, node, parentInfo.branch)
	};
	cache(node, routeInfo);

	return routeInfo;
}
373453
private static Node checkFollowedIdentifier(
			final HttpServletRequest request,
			final DeleteFollowResponse response) {
		final String followedId = request
				.getParameter(ProtocolConstants.Parameters.Delete.Follow.FOLLOWED_IDENTIFIER);
		if (followedId != null) {
			final Node followed = NeoUtils.getUserByIdentifier(followedId);
			if (followed != null) {
				return followed;
			}
			response.followedIdentifierInvalid(followedId);
		} else {
			response.followedIdentifierMissing();
		}

		return null;
	}
1256290
public function visit($query, $node, string $context)
    {
        if ($node instanceof $this->node) {
            $bindings = [];
            $sql = [];

            $child0 = $node->getChildByIndex(0);
            $child1 = $node->getChildByIndex(1);

            if ($child0 instanceof Nodes\KeyNode) {
                $context === Nodes\OrNode::class && $query->orWhereNotNull($this->parseKey($child0->getValue()));
                $context === Nodes\AndNode::class && $query->whereNotNull($this->parseKey($child0->getValue()));
            }
        }
    }
987885
public static void nodeWalker(NodeList childNodes, NodeElementParser parser) throws ParseException {
        for (int i = 0; i < childNodes.getLength(); i++) {
            Node item = childNodes.item(i);
            String node = item.getNodeName();
            if(item.getNodeType() == Node.ELEMENT_NODE){
                parser.parse(item);
            }
            nodeWalker(item.getChildNodes(), parser);
        }
    }
1193414
function advanceActivatedRoute(route) {
    if (route.snapshot) {
        var currentSnapshot = route.snapshot;
        var nextSnapshot = route._futureSnapshot;
        route.snapshot = nextSnapshot;
        if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {
            route.queryParams.next(nextSnapshot.queryParams);
        }
        if (currentSnapshot.fragment !== nextSnapshot.fragment) {
            route.fragment.next(nextSnapshot.fragment);
        }
        if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {
            route.params.next(nextSnapshot.params);
        }
        if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {
            route.url.next(nextSnapshot.url);
        }
        if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {
            route.data.next(nextSnapshot.data);
        }
    }
    else {
        route.snapshot = route._futureSnapshot;
        // this is for resolved data
        route.data.next(route._futureSnapshot.data);
    }
}
959481
@Override
    public void handle(final RoutingContext routingContext) {

        // No longer sufficient to check whether we have a user, as the user must have an appropriate pac4j profile
        // so a user != null check is insufficient, so we'll go straight to the pac4j logic check
        // Note that at present the security logic call is blocking (and authorization contained within can also
        // be blocking) so we have to wrap the following call in an executeBlocking call to avoid blocking the
        // event loop
        final VertxWebContext webContext = new VertxWebContext(routingContext, sessionStore);
        // Strip out DirectClients from pac4j user at this point
        final Pac4jUser pac4jUser = (Pac4jUser) routingContext.user();
        if (pac4jUser != null) {
            final Map<String, CommonProfile> indirectProfiles = pac4jUser.pac4jUserProfiles().entrySet().stream()
                    .filter(e -> {
                        final String clientName = e.getValue().getClientName();
                        return (config.getClients().findClient(clientName) instanceof IndirectClient);
                    })
                    .collect(toMap(e -> e.getKey(), e -> e.getValue()));
            if (!indirectProfiles.isEmpty()) {
                pac4jUser.pac4jUserProfiles().clear();
                pac4jUser.pac4jUserProfiles().putAll(indirectProfiles);
            } else {
                routingContext.clearUser();
            }
        }

        vertx.executeBlocking(future -> securityLogic.perform(webContext, config,
            (ctx, profiles, parameters) -> {
                // This is what should occur if we are authenticated and authorized to view the requested
                // resource
                future.complete();
                return null;
            },
            httpActionAdapter,
            clientNames,
            authorizerName,
            matcherName,
            multiProfile),
        asyncResult -> {
            // If we succeeded we're all good here, the job is done either through approving, or redirect, or
            // forbidding
            // However, if an error occurred we need to handle this here
            if (asyncResult.failed()) {
                unexpectedFailure(routingContext, asyncResult.cause());
            } else {
                LOG.info("Authorised to view resource " + routingContext.request().path());
                routingContext.next();
            }
        });

    }
476944
@Override
	public void onQuery() {

		final App app = StructrApp.getInstance();
		try (final Tx tx = app.tx()) {

			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
				nodes.put(node.getUuid(), node);
			}

			if (nodes.size() != repository.objectCount()) {

				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );

				repository.clear();

				for (final SharedNodeInterface node : nodes.values()) {
					addObjectToRepository(node);
				}
			}

			tx.success();

		} catch (FrameworkException fex) {

			logger.warn("", fex);
		}
	}
164564
protected void routeTo(RoutedMessage routedMessage, String logHandlerId) {
        WsLogHandler wsLogHandler = wsLogHandlerServices.get(logHandlerId);
        if (wsLogHandler != null) {
            wsLogHandler.publish(routedMessage);
        }
    }
1255949
@Override
    public R visitProvides(ProvidesTree node, P p) {
        R r = scan(node.getServiceType(), p);
        r = scanAndReduce(node.getDescription(), p, r);
        return r;
    }
503869
private NextNodeAndQuery optimizeJoinOrFilter(IntermediateQuery currentQuery, JoinOrFilterNode currentNode) {

        /**
         * Tries to build a PushDownBooleanExpressionProposal for the current node
         */
        Optional<PushDownBooleanExpressionProposal> optionalProposal = makeProposal(
                currentQuery, currentNode);

        /**
         * Applies it and extracts from the results the necessary information
         * for continuing the navigation
         */
        if (optionalProposal.isPresent()) {
            PushDownBooleanExpressionProposal proposal = optionalProposal.get();

            // Applies the proposal and casts the results
            NodeCentricOptimizationResults<JoinOrFilterNode> results;
            try {
                results = currentQuery.applyProposal(proposal);
            } catch (EmptyQueryException e) {
                throw new IllegalStateException("Unexpected empty query exception while pushing down boolean expressions");
            }

            return getNextNodeAndQuery(currentQuery, results);
        } else {
            return new NextNodeAndQuery(getDepthFirstNextNode(currentQuery, currentNode), currentQuery);
        }
    }
52535
@Override
  public boolean visit(final InjectionPlan<?> nodeFrom, final InjectionPlan<?> nodeTo) {
    this.graphStr
        .append("  \"")
        .append(nodeFrom.getClass())
        .append('_')
        .append(nodeFrom.getNode().getName())
        .append("\" -> \"")
        .append(nodeTo.getClass())
        .append('_')
        .append(nodeTo.getNode().getName())
        .append("\" [style=solid];\n");
    return true;
  }
446271
function _walk(node) {
				var i,
					l,
					child,
					s,
					state,
					allSelected,
					someSelected,
					unselIgnore,
					unselState,
					children = node.children;

				if (children && children.length) {
					// check all children recursively
					allSelected = true;
					someSelected = false;

					for (i = 0, l = children.length; i < l; i++) {
						child = children[i];
						// the selection state of a node is not relevant; we need the end-nodes
						s = _walk(child);
						// if( !child.unselectableIgnore ) {
						unselIgnore = FT.evalOption(
							"unselectableIgnore",
							child,
							child,
							opts,
							false
						);
						if (!unselIgnore) {
							if (s !== false) {
								someSelected = true;
							}
							if (s !== true) {
								allSelected = false;
							}
						}
					}
					state = allSelected
						? true
						: someSelected
							? undefined
							: false;
				} else {
					// This is an end-node: simply report the status
					unselState = FT.evalOption(
						"unselectableStatus",
						node,
						node,
						opts,
						undefined
					);
					state = unselState == null ? !!node.selected : !!unselState;
				}
				node._changeSelectStatusAttrs(state);
				return state;
			}