Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.ChildInfo


            ((ChildNodeEntriesImpl) childNodeEntries).update(childInfos);
        } else {
            // filter those entries that have been moved to the attic.
            List<ChildInfo> remaining = new ArrayList<ChildInfo>();
            while (childInfos.hasNext()) {
                ChildInfo ci = childInfos.next();
                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID())) {
                    remaining.add(ci);
                }
            }
            ((ChildNodeEntriesImpl) childNodeEntries).update(remaining.iterator());
        }
View Full Code Here


                    new Iterator<ChildInfo>() {
                        public boolean hasNext() {
                            return childInfos.hasNext();
                        }
                        public ChildInfo next() {
                            ChildInfo cInfo = childInfos.next();
                            if (cInfo instanceof Serializable) {
                                return cInfo;
                            } else {
                                return new ChildInfoImpl(cInfo.getName(), cInfo.getUniqueID(), cInfo.getIndex());
                            }
                        }
                        public void remove() {
                            throw new UnsupportedOperationException();
                        }
View Full Code Here

        rs.submit(b);

        Iterator<ChildInfo> it = rs.getChildInfos(si, nid);
        int i = 1;
        while (it.hasNext()) {
            ChildInfo ci = it.next();
            assertEquals(i, Integer.parseInt(ci.getName().getLocalName()));
            i++;
        }
    }
View Full Code Here

        rs.submit(b);

        Iterator<ChildInfo> it = rs.getChildInfos(si, nid);
        int i = 1;
        while (it.hasNext()) {
            ChildInfo ci = it.next();
            assertEquals(i, Integer.parseInt(ci.getName().getLocalName()));
            i++;
        }
    }
View Full Code Here

            ((ChildNodeEntriesImpl) childNodeEntries).update(childInfos);
        } else {
            // filter those entries that have been moved to the attic.
            List<ChildInfo> remaining = new ArrayList<ChildInfo>();
            while (childInfos.hasNext()) {
                ChildInfo ci = childInfos.next();
                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID())) {
                    remaining.add(ci);
                }
            }
            ((ChildNodeEntriesImpl) childNodeEntries).update(remaining.iterator());
        }
View Full Code Here

            ((ChildNodeEntriesImpl) childNodeEntries).update(childInfos);
        } else {
            // filter those entries that have been moved to the attic.
            List<ChildInfo> remaining = new ArrayList<ChildInfo>();
            while (childInfos.hasNext()) {
                ChildInfo ci = childInfos.next();
                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID())) {
                    remaining.add(ci);
                }
            }
            ((ChildNodeEntriesImpl) childNodeEntries).update(remaining.iterator());
        }
View Full Code Here

        NodeId id = parent.getWorkspaceId();
        Iterator it = factory.getItemStateFactory().getChildNodeInfos(id);
        // simply add all child entries to the empty collection
        while (it.hasNext()) {
            ChildInfo ci = (ChildInfo) it.next();
            NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
            add(entry, ci.getIndex());
        }
    }
View Full Code Here

            cInfos.add(it.next());
        }
        // first make sure the ordering of all existing entries is ok
        NodeEntry entry = null;
        for (it = cInfos.iterator(); it.hasNext();) {
            ChildInfo ci = (ChildInfo) it.next();
            NodeEntry nextEntry = get(ci);
            if (nextEntry != null) {
                if (entry != null) {
                    reorder(entry, nextEntry);
                }
                entry = nextEntry;
            }
        }
        // then insert the 'new' entries
        List newEntries = new ArrayList();
        for (it = cInfos.iterator(); it.hasNext();) {
            ChildInfo ci = (ChildInfo) it.next();
            NodeEntry beforeEntry = get(ci);
            if (beforeEntry == null) {
                NodeEntry ne = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                newEntries.add(ne);
            } else {
                // insert all new entries from the list BEFORE the existing
                // 'nextEntry'. Then clear the list.
                for (int i = 0; i < newEntries.size(); i++) {
View Full Code Here

        try {
            NodeInfoImpl nInfo = (NodeInfoImpl) nodeInfos.pop();
            NodeInfo parent = getCurrentNodeInfo();
            if (parent != null) {
                if (nInfo.getPath().getAncestor(1).equals(parent.getPath())) {
                    ChildInfo ci = new ChildInfoImpl(nInfo.getName(), nInfo.getUniqueID(), nInfo.getIndex());
                    ((NodeInfoImpl) parent).addChildInfo(ci);
                } else {
                    log.debug("NodeInfo '"+ nInfo.getPath() + "' out of hierarchy. Parent path = " + parent.getPath());
                }
            }
View Full Code Here

            ((ChildNodeEntriesImpl) childNodeEntries).update(childInfos);
        } else {
            // filter those entries that have been moved to the attic.
            List<ChildInfo> remaining = new ArrayList<ChildInfo>();
            while (childInfos.hasNext()) {
                ChildInfo ci = childInfos.next();
                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID())) {
                    remaining.add(ci);
                }
            }
            ((ChildNodeEntriesImpl) childNodeEntries).update(remaining.iterator());
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.ChildInfo

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.