Examples of ChildNodeEntries


Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

        }
        if (ie instanceof ChildNodeEntry) {
            ChildNodeEntry cne = (ChildNodeEntry) ie;
            return cne.getName().equals(name) ? cne : null;
        }
        ChildNodeEntries container = ((ContainerEntry) ie).getContainer();
        if (container != null) {
            return container.get(name);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

                continue;
            }
            if (ie instanceof ChildNodeEntry) {
                list.add((ChildNodeEntry) ie);
            } else {
                ChildNodeEntries container = ((ContainerEntry) ie).getContainer();
                if (container != null) {
                    for (Iterator<ChildNodeEntry> it = container.getEntries(offset - skipped, count - list.size());
                            it.hasNext(); ) {
                        list.add(it.next());
                    }
                   skipped = offset;
                }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

                count++;
                return null;
            }
        }
        ContainerEntry ce = (ContainerEntry) ie;
        ChildNodeEntries container = ce.getContainer();
        ChildNodeEntry existing = container.add(entry);
        if (entry.equals(existing)) {
            // no-op
            return existing;
        }
        ce.setDirty(container);
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

            } else {
                return null;
            }
        }
        ContainerEntry ce = (ContainerEntry) ie;
        ChildNodeEntries container = ce.getContainer();
        ChildNodeEntry existing = container.remove(name);
        if (existing == null) {
            return null;
        }
        if (container.getCount() == 0) {
            index[hash] = null;
        } else if (container.getCount() == 1) {
            // inline single remaining entry
            ChildNodeEntry remaining = container.getEntries(0, 1).next();
            index[hash] = new NodeEntry(remaining.getName(), remaining.getId());
        } else {
            ce.setDirty(container);
        }
        count--;
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

            if (ie1 == null) {
                // this index entry in null => other must be non-null, add all its entries
                if (ie2 instanceof ChildNodeEntry) {
                    added.add((ChildNodeEntry) ie2);
                } else {
                    ChildNodeEntries container = ((ContainerEntry) ie2).getContainer();
                    for (Iterator<ChildNodeEntry> it = container.getEntries(0, -1); it.hasNext(); ) {
                        added.add(it.next());
                    }
                }
                continue;
            }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

       
        public Iterator<ChildNodeEntry> getAdded(IndexEntry other) {
            if (other == null) {
                return null;
            }
            ChildNodeEntries container = ((ContainerEntry) other).createCompatibleContainer();
            container.add(this);
            return container.getAdded(((ContainerEntry) other).getContainer());
        }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

        public Iterator<ChildNodeEntry> getModified(IndexEntry other) {
            if (other == null) {
                return null;
            }
            ChildNodeEntries container = ((ContainerEntry) other).createCompatibleContainer();
            container.add(this);
            return container.getModified(((ContainerEntry) other).getContainer());
        }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

        public Iterator<ChildNodeEntry> getAdded(IndexEntry other) {
            if (other == null) {
                return null;
            }
            if (other instanceof ChildNodeEntry) {
                ChildNodeEntries container  = ((ContainerEntry) other).createCompatibleContainer();
                container.add((ChildNodeEntry) other);
                return getContainer().getAdded(container);
            }
            return getContainer().getAdded(((ContainerEntry) other).getContainer());
        }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

        public Iterator<ChildNodeEntry> getModified(IndexEntry other) {
            if (other == null) {
                return null;
            }
            if (other instanceof ChildNodeEntry) {
                ChildNodeEntries container = ((ContainerEntry) other).createCompatibleContainer();
                container.add((ChildNodeEntry) other);
                return getContainer().getModified(container);
            }
            return getContainer().getModified(((ContainerEntry) other).getContainer());
        }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.ChildNodeEntries

        }
        if (ie instanceof ChildNodeEntry) {
            ChildNodeEntry cne = (ChildNodeEntry) ie;
            return cne.getName().equals(name) ? cne : null;
        }
        ChildNodeEntries container = ((ContainerEntry) ie).getContainer();
        if (container != null) {
            return container.get(name);
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.