Package org.apache.jackrabbit.commons.iterator

Examples of org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter


     * @param nodes the expected nodes in the result set.
     * @throws RepositoryException if an error occurs while reading from the result.
     */
    protected void checkResult(RowIterator result, Node[] nodes)
            throws RepositoryException {
        checkResult(new NodeIteratorAdapter(result) {
            public Object next() throws NoSuchElementException {
                Row next = (Row) super.next();
                try {
                    return superuser.getItem(next.getValue("jcr:path").getString());
                } catch (RepositoryException e) {
View Full Code Here


        sanityCheck();

        ArrayList nodes = new ArrayList();
        // traverse children using a special filtering 'collector'
        accept(new ChildrenCollectorFilter(namePattern, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

    public NodeIterator getNodes(String namePattern) throws RepositoryException {
        checkStatus();
        ArrayList nodes = new ArrayList();
        // traverse children using a special filtering 'collector'
        accept(new ChildrenCollectorFilter(namePattern, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

    public NodeIterator getNodes(String namePattern) throws RepositoryException {
        checkStatus();
        ArrayList nodes = new ArrayList();
        // traverse children using a special filtering 'collector'
        accept(new ChildrenCollectorFilter(namePattern, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

    private NodeIterator collectNodes(String value, Set props, Name ntName,
                                      NodeIterator nodes, boolean exact,
                                      long maxSize) {
        Set matchSet = new HashSet();
        collectNodes(value, props, ntName, nodes, matchSet, exact, maxSize);
        return new NodeIteratorAdapter(matchSet);
    }
View Full Code Here

        sanityCheck();

        ArrayList nodes = new ArrayList();
        // traverse children using a special filtering 'collector'
        accept(new ChildrenCollectorFilter(namePattern, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

            while (iter.hasNext()) {
                NodeId parentId = (NodeId) iter.next();
                list.add(itemMgr.getNode(getNodeId(), parentId));
            }
        }
        return new NodeIteratorAdapter(list);
    }
View Full Code Here

            NodeState state = data.getNodeState();
            for (NodeId parentId : state.getSharedSet()) {
                list.add(itemMgr.getNode(getNodeId(), parentId));
            }
        }
        return new NodeIteratorAdapter(list);
    }
View Full Code Here

    public static NodeIterator collectChildNodes(
            Node node, String namePattern) throws RepositoryException {
        Collection<Item> nodes = new ArrayList<Item>();
        node.accept(new ChildrenCollectorFilter(
                namePattern, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

    public static NodeIterator collectChildNodes(
            Node node, String[] nameGlobs) throws RepositoryException {
        Collection<Item> nodes = new ArrayList<Item>();
        node.accept(new ChildrenCollectorFilter(
                nameGlobs, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter

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.