Package org.apache.jackrabbit.commons.iterator

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


                            public boolean apply(NodeDelegate state) {
                                // TODO: use Oak names
                                return ItemNameMatcher.matches(toJcrPath(state.getName()), nameGlobs);
                            }
                        });
                return new NodeIteratorAdapter(nodeIterator(children));
            }
        });
    }
View Full Code Here


        });
    }

    @Override @Nonnull
    public NodeIterator getSharedSet() {
        return new NodeIteratorAdapter(singleton(this));
    }
View Full Code Here

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

     * @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

     * @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

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

    public NodeIterator getNodes(String[] nameGlobs) throws RepositoryException {
        checkStatus();
        List nodes = new ArrayList();
        // traverse child nodes using a filtering item visitor
        accept(new ChildrenCollectorFilter(nameGlobs, nodes, true, false, 1));
        return new NodeIteratorAdapter(nodes);
    }
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

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

        sanityCheck();

        ArrayList nodes = new ArrayList();
        // traverse children using a special filtering 'collector'
        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.