Package org.apache.jackrabbit.oak.plugins.memory

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry


    @Override
    public NodeState getChildNode(@Nonnull String name) {
        NodeState child = state.getChildNode(checkNotNull(name));
        if (child.exists() && !context.canReadAll()) {
            ChildNodeEntry entry = new MemoryChildNodeEntry(name, child);
            return new WrapChildEntryFunction().apply(entry).getNodeState();
        } else {
            return child;
        }
    }
View Full Code Here


                // tell in advance that the full subtree is readable. Then
                // we also wouldn't need the above getChildNodeCount() call
                // that's somewhat expensive on the MongoMK.
                return input;
            } else {
                return new MemoryChildNodeEntry(name, secureChild);
            }
        }
View Full Code Here

        } else if (childName == Template.MANY_CHILD_NODES) {
            return getChildNodeMap().getEntries();
        } else {
            Segment segment = getSegment();
            RecordId childNodeId = segment.readRecordId(getOffset(0, 1));
            return Collections.singletonList(new MemoryChildNodeEntry(
                    childName, new SegmentNodeState(childNodeId)));
        }
    }
View Full Code Here

                    for (String p : values) {
                        NodeState property = index.getChildNode(p);
                        if (property.exists()) {
                            // we have an entry for this value, so use it
                            it.enqueue(Iterators.singletonIterator(
                                    new MemoryChildNodeEntry("", property)));
                        }
                    }
                }
                return it;
            }
View Full Code Here

    @Override
    public NodeState getChildNode(@Nonnull String name) {
        NodeState child = state.getChildNode(checkNotNull(name));
        if (child.exists() && !treePermission.canReadAll()) {
            ChildNodeEntry entry = new MemoryChildNodeEntry(name, child);
            return new WrapChildEntryFunction().apply(entry).getNodeState();
        } else {
            return child;
        }
    }
View Full Code Here

                // tell in advance that the full subtree is readable. Then
                // we also wouldn't need the above getChildNodeCount() call
                // that's somewhat expensive on the DocumentMK.
                return input;
            } else {
                return new MemoryChildNodeEntry(name, secureChild);
            }
        }
View Full Code Here

            while (offset > 0) {
                iterator.next();
                offset--;
            }
            while (count > 0 && iterator.hasNext()) {
                entries.add(new MemoryChildNodeEntry(iterator.next()));
                count--;
            }
            offset = childNodes.size();
        }

        if (count > 0 && childNodeCount > MAX_CHILD_NODE_NAMES) {
            String json = kernel.getNodes(
                    path, revision, 0, offset, all ? -1 : count, null);

            JsopReader reader = new JsopTokenizer(json);
            reader.read('{');
            do {
                String name = reader.readString();
                reader.read(':');
                if (reader.matches('{')) {
                    reader.read('}');
                    String childPath = getChildPath(name);
                    NodeState child = new KernelNodeState(
                            kernel, valueFactory, childPath, revision);
                    entries.add(new MemoryChildNodeEntry(name, child));
                } else {
                    reader.read();
                }
            } while (reader.matches(','));
            reader.read('}');
View Full Code Here

                    if (reader.matches('{')) {
                        reader.read('}');
                        String childPath = getChildPath(name);
                        NodeState child =
                                new KernelNodeState(kernel, childPath, revision);
                        entries.add(new MemoryChildNodeEntry(name, child));
                    } else {
                        reader.read();
                    }
                } while (reader.matches(','));
                reader.read('}');
View Full Code Here

        PathRestriction restriciton = filter.getPathRestriction();
        switch (restriciton) {
        case EXACT:
        case ALL_CHILDREN:
            nodeIterators.add(Iterators.singletonIterator(
                    new MemoryChildNodeEntry(currentPath, node)));
            parentPath = "";
            break;
        case PARENT:
            if (parent != null) {
                nodeIterators.add(Iterators.singletonIterator(
                        new MemoryChildNodeEntry(parentPath, parent)));
                parentPath = "";
            }
            break;
        case DIRECT_CHILDREN:
            nodeIterators.add(node.getChildNodeEntries().iterator());
View Full Code Here

            switch (restriction) {
            case NO_RESTRICTION:
            case EXACT:
            case ALL_CHILDREN:
                nodeIterators.add(Iterators.singletonIterator(
                        new MemoryChildNodeEntry(currentPath, node)));
                parentPath = "";
                break;
            case PARENT:
                if (parent != null) {
                    nodeIterators.add(Iterators.singletonIterator(
                            new MemoryChildNodeEntry(parentPath, parent)));
                    parentPath = "";
                }
                break;
            case DIRECT_CHILDREN:
                nodeIterators.add(node.getChildNodeEntries().iterator());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

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.