Examples of NodeIterator


Examples of com.caucho.xpath.pattern.NodeIterator

    throws Exception
  {
    ArrayList<Node> sortKeys = new ArrayList<Node>();

    Iterator<Node> sortIter;
    NodeIterator iter = pattern.select(node, env);

    while (iter.hasNext()) {
      Node child = iter.next();
      sortKeys.add(child);
    }

    int []map = new int[sortKeys.size()];
    for (int i = map.length - 1; i >= 0; i--)
View Full Code Here

Examples of com.googlecode.totallylazy.iterators.NodeIterator

    }

    public static Sequence<Node> sequence(final NodeList nodes) {
        return new Sequence<Node>() {
            public Iterator<Node> iterator() {
                return new NodeIterator(nodes);
            }
        };
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.NodeIterator

        ct.toXML(elem, r, 0, unsequenced(r), ctx);
        return true;
      }     

      // add (sequenced) sub-elements
      NodeIterator ni = ctx.getModel().getSeq(r).iterator();
      while (ni.hasNext()) {
        Statement stmt = element.asStatement((Resource) ni.nextNode());
        if (stmt.getPredicate().equals(RDF.value)) {
          // add literal value
          RDFNode value = stmt.getObject();
          if (value.isLiteral())
            elem.appendChild(doc.createTextNode(value.toString()))
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.NodeIterator

    while (si.hasNext()) {
      Statement stmt = si.nextStatement();
      // don't add ordinals
      if (stmt.getPredicate().getOrdinal()==0) s.add(stmt);
    }
    NodeIterator ni = rdf.getModel().getSeq(rdf).iterator();
    while (ni.hasNext()) {
      Statement stmt = asStatement((Resource) ni.nextNode());
      if (s.contains(stmt)) s.remove(stmt);
    }
    return s;
  }
View Full Code Here

Examples of com.jclark.xsl.om.NodeIterator

                System.err.println("root is null!");
                System.err.println("sourceDirURL:" + sourceDirURL);
                System.err.println("jarRootURL:" + jarRootURL);
                System.err.println("iter:" + iter.toString());
            }
            NodeIterator descIter = new DescendantsOrSelfNodeIterator(root);
            CloneableNodeIterator cloneIter= new CloneableNodeIteratorImpl(descIter);

            contentTableHeadings = (NodeIterator) cloneIter.clone();
            //giving out all nodes of the node-set(NodeIterator) upto a certain element
            if(mDebug) printAllNodes((NodeIterator)cloneIter.clone(), OOoMasterDocument.STOP_ELEMENT);
View Full Code Here

Examples of javax.jcr.NodeIterator

        ArrayList<DavResource> memberList = new ArrayList<DavResource>();
        if (exists()) {
            try {
                Node n = (Node)item;
                // add all node members
                NodeIterator it = n.getNodes();
                while (it.hasNext()) {
                    Node node = it.nextNode();
                    DavResourceLocator loc = getLocatorFromItem(node);
                    memberList.add(createResourceFromLocator(loc));
                }
                // add all property members
                PropertyIterator propIt = n.getProperties();
View Full Code Here

Examples of javax.jcr.NodeIterator

                    (NodeTypeImpl) node.getPrimaryNodeType(),
                    node.getMixinTypeNames(),
                    node.getSession()
            ));
        }
        NodeIterator niter = node.getNodes();
        while (niter.hasNext()) {
            NodeImpl n = (NodeImpl) niter.nextNode();
            recursiveAdd(events, node, n);
        }
    }
View Full Code Here

Examples of javax.jcr.NodeIterator

                node.getPrimaryPath().getNameElement(),
                (NodeTypeImpl) parent.getPrimaryNodeType(),
                parent.getMixinTypeNames(),
                node.getSession()
        ));
        NodeIterator niter = node.getNodes();
        while (niter.hasNext()) {
            NodeImpl n = (NodeImpl) niter.nextNode();
            recursiveRemove(events, node, n);
        }
    }
View Full Code Here

Examples of javax.jcr.NodeIterator

    /**
     * Returns a {@link SizedIterator} of the child nodes of <code>node</code>.
     */
    @SuppressWarnings("unchecked")
    protected SizedIterator<Node> getNodes(Node node) throws RepositoryException {
        NodeIterator nodes = node.getNodes();
        return getSizedIterator(nodes, nodes.getSize());
    }
View Full Code Here

Examples of javax.jcr.NodeIterator

    /**
     * Returns an iterator of iterators of the child nodes of <code>node</code>.
     */
    private Iterator<Iterator<Node>> childIterators(Node node) {
        try {
            final NodeIterator childNodes = node.getNodes();
            return new Iterator<Iterator<Node>>() {
                public boolean hasNext() {
                    return childNodes.hasNext();
                }
                public Iterator<Node> next() {
                    return iterator(childNodes.nextNode());
                }
                public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
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.