Package org.apache.isis.viewer.json.applib.util

Examples of org.apache.isis.viewer.json.applib.util.PathNode


    private JsonNode getNode(final String path) {
        JsonNode jsonNode = this.jsonNode;
        final String[] keys = path.split("\\.");
        for (final String key : keys) {
            final PathNode pathNode = PathNode.parse(key);
            if (!pathNode.getKey().isEmpty()) {
                jsonNode = jsonNode.path(pathNode.getKey());
            } else {
                // pathNode is criteria only; don't change jsonNode
            }
            if (jsonNode.isNull()) {
                return jsonNode;
            }
            if (!pathNode.hasCriteria()) {
                continue;
            }
            if (!jsonNode.isArray()) {
                return NullNode.getInstance();
            }
View Full Code Here


            return terminated(PathNode.NULL);
        }
        if (mode == Mode.TERMINATED) {
            return terminated(this.root);
        }
        final PathNode node = PathNode.parse(path);
        if (mode == Mode.FOLLOWING) {
            final Map<PathNode, Map> remaining = graph.get(node);
            if (remaining != null) {
                final PathNode key = findKey(node);
                return new LinkFollower(remaining, Mode.FOLLOWING, key);
            } else {
                return terminated(node);
            }
        }
View Full Code Here

    private static void mergeInto(final List<String> list, final Map<PathNode, Map> map) {
        if (list.size() == 0) {
            return;
        }
        final String str = list.get(0);
        final PathNode node = PathNode.parse(str);
        Map<PathNode, Map> submap = map.get(node);
        if (submap == null) {
            submap = Maps.newHashMap();
            map.put(node, submap);
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.json.applib.util.PathNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.