Package org.apache.jackrabbit.commons.flat

Examples of org.apache.jackrabbit.commons.flat.TreeTraverser$InclusionPolicy


    private static void checkTreeProperty(Node root, int minChildren, int maxChildren, Comparator<String> order)
            throws RepositoryException {

        int depth = -1;

        for (Node node : new TreeTraverser(root)) {
            String parentName = node.getName();

            if (node.hasNodes()) {
                int childCount = 0;
                for (NodeIterator nodes = node.getNodes(); nodes.hasNext(); ) {
View Full Code Here


            leaves.add(node);
        }
    }

    public void testTraverseNodesEmpty() throws RepositoryException {
        TreeTraverser traverser = new TreeTraverser(testNode, errorHandler, TreeTraverser.InclusionPolicy.ALL);
        checkNodes(traverser, singleton(""), testNode.getPath());
    }
View Full Code Here

        TreeTraverser traverser = new TreeTraverser(testNode, errorHandler, TreeTraverser.InclusionPolicy.ALL);
        checkNodes(traverser, singleton(""), testNode.getPath());
    }

    public void testTraverseLeavesEmpty() throws RepositoryException {
        TreeTraverser traverser = new TreeTraverser(testNode, errorHandler, TreeTraverser.InclusionPolicy.LEAVES);
        checkNodes(traverser, singleton(""), testNode.getPath());
    }
View Full Code Here

        checkNodes(traverser, singleton(""), testNode.getPath());
    }

    public void testTraverseNodes() throws RepositoryException {
        addNodes(testNode, nodes);
        TreeTraverser traverser = new TreeTraverser(testNode, errorHandler, TreeTraverser.InclusionPolicy.ALL);
        checkNodes(traverser, nodes.iterator(), testNode.getPath());
    }
View Full Code Here

        checkNodes(traverser, nodes.iterator(), testNode.getPath());
    }

    public void testTraverseLeaves() throws RepositoryException {
        addNodes(testNode, nodes);
        TreeTraverser traverser = new TreeTraverser(testNode, errorHandler, TreeTraverser.InclusionPolicy.LEAVES);
        checkNodes(traverser, leaves.iterator(), testNode.getPath());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.commons.flat.TreeTraverser$InclusionPolicy

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.