Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NodeInfo


            NodeId srcId = getNodeId(testPath);
            NodeId destParentId = getNodeId("/");
            rs.copy(si, si.getWorkspaceName(), srcId, destParentId, resolver.getQName("destname"));

            nid = getNodeId("/destname");
            NodeInfo nInfo = rs.getNodeInfo(si, nid);
            Iterator it = rs.getItemInfos(si, nid);

            assertTrue(it.hasNext());
            NodeInfo nInfo2 = (NodeInfo) it.next();
            assertEquals(nInfo.getId(), nInfo2.getId());
            assertEquals(nInfo.getNodetype(), nInfo2.getNodetype());
        } finally {
            if (nid != null) {
                Batch b = rs.createBatch(si, getNodeId("/"));
                b.remove(nid);
                rs.submit(b);
View Full Code Here


        NodeId srcId = getNodeId(testPath);
        NodeId destParentId = getNodeId("/");
        rs.copy(sInfo, si.getWorkspaceName(), srcId, destParentId, resolver.getQName("destname"));

        copiedId = getNodeId("/destname");
        NodeInfo nInfo = rs.getNodeInfo(sInfo, copiedId);
        Iterator it = rs.getItemInfos(sInfo, copiedId);

        assertTrue(it.hasNext());
        NodeInfo nInfo2 = (NodeInfo) it.next();
        assertEquals(nInfo.getId(), nInfo2.getId());
        assertEquals(nInfo.getNodetype(), nInfo2.getNodetype());
    }
View Full Code Here

        NodeId srcId = getNodeId(testPath);
        NodeId destParentId = getNodeId("/");
        rs.clone(sInfo, si.getWorkspaceName(), srcId, destParentId, resolver.getQName("destname"), true);

        clonedId = getNodeId("/destname");
        NodeInfo nInfo = rs.getNodeInfo(sInfo, clonedId);
        Iterator it = rs.getItemInfos(sInfo, clonedId);

        assertTrue(it.hasNext());
        NodeInfo nInfo2 = (NodeInfo) it.next();
        assertEquals(nInfo.getId(), nInfo2.getId());
        assertEquals(nInfo.getNodetype(), nInfo2.getNodetype());
    }
View Full Code Here

        } catch (NameException e) {
            // ignore. should never occur
        }
        int depth = batchReadConfig.getDepth(ntName);
        if (depth == BatchReadConfig.DEPTH_DEFAULT) {
            NodeInfo info;
            try {
                info = new NodeInfoImpl(node, idFactory, sInfo.getNamePathResolver());
            } catch (NameException e) {
                throw new RepositoryException(e);
            }
View Full Code Here

        } catch (NameException e) {
            // ignore. should never occur
        }
        int depth = batchReadConfig.getDepth(ntName);
        if (depth == BatchReadConfig.DEPTH_DEFAULT) {
            NodeInfo info;
            try {
                info = new NodeInfoImpl(node, idFactory, sInfo.getNamePathResolver());
            } catch (NameException e) {
                throw new RepositoryException(e);
            }
View Full Code Here

        }

        // nodestate has a unique ID and is potentially mix:referenceable
        // => try to retrieve references
        try {
            NodeInfo nInfo = service.getNodeInfo(sessionInfo, entry.getWorkspaceId());
            return nInfo.getReferences();
        } catch (RepositoryException e) {
            log.debug("Unable to determine references to {}", nodeState);
            return new PropertyId[0];
        }
    }
View Full Code Here

            throws ItemNotFoundException, RepositoryException {
        NodeState nodeState;
        ItemInfos infos = new ItemInfos(itemInfos);
        // first entry in the iterator is the originally requested Node.
        if (infos.hasNext()) {
            NodeInfo first = (NodeInfo) infos.next();
            if (isDeep) {
                // for a deep state, the hierarchy entry does not correspond to
                // the given NodeEntry -> retrieve NodeState before executing
                // validation check.
                nodeState = createDeepNodeState(first, entry, infos);
View Full Code Here

         * by the given <code>parentId</code> or <code>null</code> if the parent
         * has not been read yet, has already been processed (childInfo is up
         * to date) or does not provide child infos.
         */
        private Iterator getChildInfos(NodeId parentId) {
            NodeInfo nodeInfo = (NodeInfo) nodeInfos.get(parentId);
            while (nodeInfo == null && prefetch()) {
                nodeInfo = (NodeInfo) nodeInfos.get(parentId);
            }
            return nodeInfo == null? null : nodeInfo.getChildInfos();
        }
View Full Code Here

        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 {
                return false;
            }
View Full Code Here

        } catch (NameException e) {
            // ignore. should never occur
        }
        int depth = batchReadConfig.getDepth(ntName);
        if (depth == BatchReadConfig.DEPTH_DEFAULT) {
            NodeInfo info;
            try {
                info = new NodeInfoImpl(node, idFactory, sInfo.getNamePathResolver());
            } catch (NameException e) {
                throw new RepositoryException(e);
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.NodeInfo

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.