Package javax.jcr

Examples of javax.jcr.NodeIterator.nextNode()


        // the child nodes
        if (recursionLevelActive(currentRecursionLevel, maxRecursionLevels)) {
            final NodeIterator children = node.getNodes();
            while (children.hasNext()) {
                final Node n = children.nextNode();
                dumpSingleNode(n, w, currentRecursionLevel, maxRecursionLevels);
            }
        }

        w.endObject();
View Full Code Here


        // Add all matching nodes to result
        try {
            NodeIterator it = node.getNodes(name);
            while (it.hasNext()) {
                items.add(ScriptRuntime.toObject(this, it.nextNode()));
            }
        } catch (RepositoryException e) {
            log.debug("RepositoryException while collecting Node children",e);
        }
View Full Code Here

            Query q = qm.createQuery(
                "/jcr:root//element(*,mix:lockable)[@jcr:lockOwner='"
                    + session.getUserID() + "']", Query.XPATH);
            NodeIterator ni = q.execute().getNodes();
            while (ni.hasNext()) {
                Node node = ni.nextNode();
                String path = node.getPath();
                try {
                    final Lock lock = node.getLock();
                    if (lock.getLockToken() == null) {
                        log.debug("Ignoring lock on {} held by {}, not held by this session",
View Full Code Here

                //do nothing, just do not list properties
            }
            try {
                NodeIterator nit = node.getNodes();
                while (nit.hasNext()) {
                    ids.add(nit.nextNode().getName());
                }
            } catch (RepositoryException e) {
                //do nothing, just do not list child nodes
            }
        }
View Full Code Here

   {
      NodeIterator children = node.getNodes();
      List<Resource> resources = new ArrayList<Resource>();
      while (children.hasNext())
      {
         Node node = children.nextNode();

         if (ResourceUtil.isVersioned(node))
         {
            if (ResourceUtil.isFile(node))
            {
View Full Code Here

               try
               {
                  NodeIterator children = currentNode.getNodes();
                  while (children.hasNext())
                  {
                     allIterators.add(new TraversingNodeIterator(children.nextNode(), maxDepth - 1));
                  }
               }
               catch (RepositoryException e)
               {
                  if (LOG.isTraceEnabled())
View Full Code Here

   {
      NodeIterator children = node.getNodes();
      List<Resource> resources = new ArrayList<Resource>();
      while (children.hasNext())
      {
         Node node = children.nextNode();

         if (ResourceUtil.isVersioned(node))
         {
            if (ResourceUtil.isFile(node))
            {
View Full Code Here

        }

        Map<PropertyDefinitionKey, Node> propertyDefsFromGraph = new HashMap<PropertyDefinitionKey, Node>();
        NodeIterator properties = typeNode.getNodes(JcrLexicon.PROPERTY_DEFINITION.getString(registry));
        while (properties.hasNext()) {
            Node def = properties.nextNode();
            propertyDefsFromGraph.put(new PropertyDefinitionKey(def, registry), def);
        }

        PropertyDefinition[] propertyDefs = nodeType.getDeclaredPropertyDefinitions();
        for (int i = 0; i < propertyDefs.length; i++) {
View Full Code Here

        }

        Map<NodeDefinitionKey, Node> nodeDefsFromGraph = new HashMap<NodeDefinitionKey, Node>();
        NodeIterator nodes = typeNode.getNodes(JcrLexicon.CHILD_NODE_DEFINITION.getString(registry));
        while (nodes.hasNext()) {
            Node def = nodes.nextNode();
            nodeDefsFromGraph.put(new NodeDefinitionKey(def, registry), def);
        }

        NodeDefinition[] nodeDefs = nodeType.getDeclaredChildNodeDefinitions();
        for (int i = 0; i < nodeDefs.length; i++) {
View Full Code Here

        NodeIterator children = parentNode.getNodes();

        while (children.hasNext()) {
            childCount++;

            childCount += traverseChildren(children.nextNode());
        }

        return childCount;
    }
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.