Examples of ItemInfo


Examples of org.apache.jackrabbit.spi.ItemInfo

     * @param id
     * @return
     * @throws ItemNotFoundException  if no such item exists
     */
    public ItemInfo getItemInfo(ItemId id) throws ItemNotFoundException {
        ItemInfo itemInfo = infos.get(id);

        return itemInfo == null
            ? ItemInfoStore.<ItemInfo>notFound(id)
            : itemInfo;
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

     * @param id
     * @return
     * @throws ItemNotFoundException  if no such node exists
     */
    public NodeInfo getNodeInfo(NodeId id) throws ItemNotFoundException {
        ItemInfo itemInfo = getItemInfo(id);

        return itemInfo.denotesNode()
            ? (NodeInfo) itemInfo
            : ItemInfoStore.<NodeInfo>notFound(id);
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

     * @param id
     * @return
     * @throws ItemNotFoundException  if no such property exists
     */
    public PropertyInfo getPropertyInfo(PropertyId id) throws ItemNotFoundException {
        ItemInfo itemInfo = getItemInfo(id);

        return itemInfo.denotesNode()
            ? ItemInfoStore.<PropertyInfo>notFound(id)
            : (PropertyInfo) itemInfo;
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

     * Otherwise returns <code>null</code>. If <code>cache</code> is not
     * <code>null</code>, caches all items by the given <code>generation</code>.
     * @param generation
     */
    private static NodeInfo first(Iterator<? extends ItemInfo> infos, ItemInfoCache cache, long generation) {
        ItemInfo first = null;
        if (infos.hasNext()) {
            first = infos.next();
            if (cache != null) {
                cache.put(first, generation);
            }

            if (!first.denotesNode()) {
                first = null;
            }
        }

        if (cache != null) {
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

        }

        // deal with all additional ItemInfos that may be present.
        NodeEntry parentEntry = nodeState.getNodeEntry();
        while (infos.hasNext()) {
            ItemInfo info = (ItemInfo) infos.next();
            if (info.denotesNode()) {
                createDeepNodeState((NodeInfo) info, parentEntry, infos);
            } else {
                createDeepPropertyState((PropertyInfo) info, parentEntry, infos);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

        /**
         * @return <code>true</code> if the next info could be retrieved.
         */
        private boolean prefetch() {
            if (infos.hasNext()) {
                ItemInfo info = (ItemInfo) infos.next();
                prefetchQueue.add(info);
                if (info.denotesNode()) {
                    NodeInfo nodeInfo = (NodeInfo) info;
                    nodeInfos.put(nodeInfo.getId(), nodeInfo);
                }
                return true;
            } else {
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

     */
    public void testGetItemInfosRootFirst() throws RepositoryException {
        itemInfosProvider = new Iterable() {
            Predicate isRoot = new Predicate() {
                public boolean evaluate(Object object) {
                    ItemInfo itemInfo = (ItemInfo) object;
                    return itemInfo.getPath().denotesRoot();
                }
            };

            public Iterator iterator() {
                return new IteratorChain(
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

        final String targetPath = "/node2/node21/node211/node2111/node21111/node211111/node2111111";

        itemInfosProvider = new Iterable() {
            Predicate isTarget = new Predicate() {
                public boolean evaluate(Object object) {
                    ItemInfo itemInfo = (ItemInfo) object;
                    return targetPath.equals(toJCRPath(itemInfo.getPath()));
                }
            };

            public Iterator iterator() {
                return new IteratorChain(
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

    }

    private void checkHierarchy() throws PathNotFoundException, RepositoryException, ItemNotFoundException,
            AccessDeniedException {
        for (Iterator itemInfos = itemInfosProvider.iterator(); itemInfos.hasNext();) {
            ItemInfo itemInfo = (ItemInfo) itemInfos.next();
            String jcrPath = toJCRPath(itemInfo.getPath());
            Item item = session.getItem(jcrPath);
            assertEquals(jcrPath, item.getPath());

            if (item.getDepth() > 0) {
                Node parent = item.getParent();
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

                                return info.getId();
                            }});

                Iterator childInfos = new TransformIterator(itemInfos.iterator(), new Transformer(){
                    public Object transform(Object input) {
                        ItemInfo info = (ItemInfo) input;
                        Name name = info.getPath().getNameElement().getName();
                        return new ChildInfoImpl(name, null, Path.INDEX_DEFAULT);
                    }});

                nodeInfo = new NodeInfoImpl(path, id, Path.INDEX_DEFAULT, NameConstants.NT_UNSTRUCTURED,
                        Name.EMPTY_ARRAY, EmptyIterator.INSTANCE, propertyIds, childInfos);
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.