Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.ChildInfo


                    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


            ((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

         this.parent = parent;
         this.factory = factory;

         if (childNodeInfos != null) {
             while (childNodeInfos.hasNext()) {
                 ChildInfo ci = childNodeInfos.next();
                 NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                 add(entry, ci.getIndex());
             }
             complete = true;
         } else {
             complete = false;
         }
View Full Code Here

     */
    synchronized void update(Iterator<ChildInfo> childNodeInfos) {
        // insert missing entries and reorder all if necessary.
        LinkedEntries.LinkNode prevLN = null;
        while (childNodeInfos.hasNext()) {
            ChildInfo ci = childNodeInfos.next();
            LinkedEntries.LinkNode ln = entriesByName.getLinkNode(ci.getName(), ci.getIndex(), ci.getUniqueID());
            if (ln == null) {
                // add missing at the correct position.
                NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                ln = internalAddAfter(entry, ci.getIndex(), prevLN);
            } else if (prevLN != null) {
                // assert correct order of existing
                if (prevLN != ln) {
                    reorderAfter(ln, prevLN);
                } else {
View Full Code Here

            NodeInfoImpl nInfo = (NodeInfoImpl) nodeInfos.pop();
            nInfo.resolveUUID(idFactory);
            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 remaining = new ArrayList();
            while (childInfos.hasNext()) {
                ChildInfo ci = (ChildInfo) childInfos.next();
                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID())) {
                    remaining.add(ci);
                }
            }
            ((ChildNodeEntriesImpl) childNodeEntries).update(remaining.iterator());
        }
View Full Code Here

         this.parent = parent;
         this.factory = factory;

         if (childNodeInfos != null) {
             while (childNodeInfos.hasNext()) {
                 ChildInfo ci = childNodeInfos.next();
                 NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                 add(entry, ci.getIndex());
             }
             complete = true;
         } else {
             complete = false;
         }
View Full Code Here

     */
    synchronized void update(Iterator<ChildInfo> childNodeInfos) {
        // insert missing entries and reorder all if necessary.
        LinkedEntries.LinkNode prevLN = null;
        while (childNodeInfos.hasNext()) {
            ChildInfo ci = childNodeInfos.next();
            LinkedEntries.LinkNode ln = entriesByName.getLinkNode(ci.getName(), ci.getIndex(), ci.getUniqueID());
            if (ln == null) {
                // add missing at the correct position.
                NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                ln = internalAddAfter(entry, ci.getIndex(), prevLN);
            } else if (prevLN != null) {
                // assert correct order of existing
                if (prevLN != ln) {
                    reorderAfter(ln, prevLN);
                } else {
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

         this.parent = parent;
         this.factory = factory;

         if (childNodeInfos != null) {
             while (childNodeInfos.hasNext()) {
                 ChildInfo ci = (ChildInfo) childNodeInfos.next();
                 NodeEntry entry = factory.createNodeEntry(parent, ci.getName(), ci.getUniqueID());
                 add(entry, ci.getIndex());
             }
             complete = true;
         } else {
             complete = false;
         }
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.