Package org.exist.memtree

Examples of org.exist.memtree.InMemoryNodeSet


      } else {
        final MemoryNodeSet nodes = contextSequence.toMemNodeSet();
        outerSequence = nodes.getParents(new AnyNodeTest());
        for (final SequenceIterator i = outerSequence.iterate(); i.hasNext();) {
          final NodeValue node = (NodeValue) i.nextItem();
          final InMemoryNodeSet newSet = new InMemoryNodeSet();
          ((NodeImpl) node).selectChildren(test, newSet);
          final Sequence temp = processPredicate(outerSequence, newSet);
          result.addAll(temp);
        }
      }
View Full Code Here


        } else
            {context.checkOptions(serializeOptions);}

        context.pushDocumentContext();
        try {
            final InMemoryNodeSet result = new InMemoryNodeSet();
            final MemTreeBuilder builder = context.getDocumentBuilder();
            final DocumentBuilderReceiver receiver = new DocumentBuilderReceiver(builder, true);
            for (final SequenceIterator i = args[0].iterate(); i.hasNext(); ) {
                final int nodeNr = builder.getDocument().getLastNode();
                final NodeValue next = (NodeValue) i.nextItem();
                next.toSAX(context.getBroker(), receiver, serializeOptions);
                result.add(builder.getDocument().getNode(nodeNr + 1));
            }
            return result;
        } catch (final SAXException e) {
            throw new XPathException(this, e);
        } finally {
View Full Code Here

        if (!NAMESPACE.equals(node.getNamespaceURI()))
            {throw new XMLStreamException("Root element is not in the correct namespace. Expected: " + NAMESPACE);}
        if (!SEQ_ELEMENT.equals(node.getLocalName()))
            {throw new XMLStreamException("Root element should be a " + SEQ_ELEMENT_QNAME);}
        final ValueSequence result = new ValueSequence();
        final InMemoryNodeSet values = new InMemoryNodeSet();
        node.selectChildren(new NameTest(Type.ELEMENT, VALUE_QNAME), values);
        for (final SequenceIterator i = values.iterate(); i.hasNext();) {
            final ElementImpl child = (ElementImpl) i.nextItem();
            final String typeName = child.getAttribute(ATTR_TYPE);
            if (typeName != null) {
                final int type = Type.getType(typeName);
                Item item;
View Full Code Here

TOP

Related Classes of org.exist.memtree.InMemoryNodeSet

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.