Examples of ItemInfo


Examples of org.apache.jackrabbit.spi.ItemInfo

        rs.submit(b);

        NodeId id = rs.getIdFactory().createNodeId(nid, resolver.getQPath("aNode"));
        Iterator<? extends ItemInfo> it = rs.getItemInfos(si, id);
        while (it.hasNext()) {
            ItemInfo info = it.next();
            if (info.denotesNode()) {
                NodeInfo nInfo = (NodeInfo) info;
                assertEquals(NameConstants.NT_UNSTRUCTURED, nInfo.getNodetype());
                Iterator<ChildInfo> childIt = nInfo.getChildInfos();
                assertTrue(childIt == null || !childIt.hasNext());
                assertEquals(id, nInfo.getId());
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

        assertEquals(Arrays.asList(new QValue[0]), Arrays.asList(pi.getValues()));
        assertFalse(pi.getType() == PropertyType.UNDEFINED);

        Iterator<? extends ItemInfo> it = rs.getItemInfos(si, nid);
        while (it.hasNext()) {
            ItemInfo info = it.next();
            if (!info.denotesNode()) {
                PropertyInfo pInfo = (PropertyInfo) info;
                if (propName.equals((pInfo.getId().getName()))) {
                    assertTrue(pi.isMultiValued());
                    assertEquals(Arrays.asList(new QValue[0]), Arrays.asList(pi.getValues()));
                    assertFalse(pi.getType() == PropertyType.UNDEFINED);
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

    }

    private PropertyInfo getPropertyInfo(NodeId parentId, Name propName) throws RepositoryException {
        Iterator<? extends ItemInfo> it = rs.getItemInfos(si, parentId);
        while (it.hasNext()) {
            ItemInfo info = it.next();
            if (!info.denotesNode()) {
                PropertyInfo pInfo = (PropertyInfo) info;
                if (propName.equals((pInfo.getId().getName()))) {
                    return pInfo;
                }
            }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

        // Assuming locality of the itemInfos, we keep an estimate of a parent entry.
        // This reduces the part of the hierarchy to traverse. For large batches this
        // optimization results in about 25% speed up.
        NodeEntry approxParentEntry = nodeState.getNodeEntry();
        while (infos.hasNext()) {
            ItemInfo info = infos.next();
            if (info.denotesNode()) {
                approxParentEntry = createDeepNodeState((NodeInfo) info, approxParentEntry, infos).getNodeEntry();
            } else {
                createDeepPropertyState((PropertyInfo) info, approxParentEntry, infos);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.spi.ItemInfo

         */
        public ItemInfo next() {
            if (prefetchQueue.isEmpty()) {
                throw new NoSuchElementException();
            } else {
                ItemInfo next = prefetchQueue.remove(0);
                if (next instanceof NodeInfo) {
                    nodeInfos.remove(((NodeInfo) next).getId());
                }
                return next;
            }
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 = 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

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

Examples of org.apache.jackrabbit.spi.ItemInfo

        // deal with all additional ItemInfos that may be present.
        NodeEntry parentEntry = nodeState.getNodeEntry();
        if (parentEntry.getStatus() != Status.INVALIDATED) {
            while (itemInfos.hasNext()) {
                ItemInfo info = (ItemInfo) itemInfos.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

        // Assuming locality of the itemInfos, we keep an estimate of a parent entry.
        // This reduces the part of the hierarchy to traverse. For large batches this
        // optimization results in about 25% speed up.
        NodeEntry approxParentEntry = nodeState.getNodeEntry();
        while (infos.hasNext()) {
            ItemInfo info = infos.next();
            if (info.denotesNode()) {
                approxParentEntry = createDeepNodeState((NodeInfo) info, approxParentEntry, infos).getNodeEntry();
            } else {
                createDeepPropertyState((PropertyInfo) info, approxParentEntry, infos);
            }
        }
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.