Package org.exist.dom

Examples of org.exist.dom.StoredNode


      {applyXSLHandler(writer);}
    else {
      //looking for serializer properties in <?exist-serialize?>
        final NodeList children = doc.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
          final StoredNode node = (StoredNode) children.item(i);
          if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE
              && "exist-serialize".equals(node.getNodeName())) {

                  final String params[] = ((ProcessingInstructionImpl)node).getData().split(" ");
                  for(final String param : params) {
                      final String opt[] = Option.parseKeyValuePair(param);
                      if (opt != null)
View Full Code Here


     * it as a {@link org.exist.dom.StoredNode}.
     *
     * @return the node at the current position.
     */
    public StoredNode getNode() {
        final StoredNode node = StoredNode.deserialize(current.data(), current.start(), current.getLength(), document);
        node.setOwnerDocument(document);
        node.setInternalAddress(current.getAddress());
        return node;
    }
View Full Code Here

     * event.
     *
     * @return the last node in document sequence before the current node
     */
    public StoredNode getPreviousNode() {
        final StoredNode node = StoredNode.deserialize(previous.data(), previous.start(), previous.getLength(), document);
        node.setOwnerDocument(document);
        node.setInternalAddress(previous.getAddress());
        return node;
    }
View Full Code Here

          serializeToReceiver(p.getDocument(), generateDocEvent);
          return;
      }
      setDocument(p.getDocument());
      if (generateDocEvent) {receiver.startDocument();}
        final Iterator<StoredNode> domIter = broker.getNodeIterator(new StoredNode(p));
        serializeToReceiver(null, domIter, p.getDocument(), checkAttributes, p.getMatches(), new TreeSet<String>());
        if (generateDocEvent) {receiver.endDocument();}
    }
View Full Code Here

      if (generateDocEvent)
        {receiver.startDocument();}
   
      if (doc.getDoctype() != null){
      if ("yes".equals(getProperty(EXistOutputKeys.OUTPUT_DOCTYPE, "no"))) {
        final StoredNode n = (StoredNode) doc.getDoctype();
        serializeToReceiver(n, null, (DocumentImpl) n.getOwnerDocument(), true, null, new TreeSet<String>());
      }
    }
     
      // iterate through children
      for (int i = 0; i < children.getLength(); i++) {
        final StoredNode node = (StoredNode) children.item(i);
        final Iterator<StoredNode> domIter = broker.getNodeIterator(node);
        domIter.next();
        final NodeProxy p = new NodeProxy(node);
        serializeToReceiver(node, domIter, (DocumentImpl)node.getOwnerDocument(),
            true, p.getMatches(), new TreeSet<String>());
      }

      if (generateDocEvent) {receiver.endDocument();}
View Full Code Here

                attribs.addAttribute(SOURCE_ATTRIB, doc.getFileURI().toString());
            }
            final int children = node.getChildCount();
            int count = 0;
            // int childLen;
            StoredNode child = null;
            while (count < children) {
                child = (StoredNode) iter.next();
                if (child!=null && child.getNodeType() == Node.ATTRIBUTE_NODE) {
                    if ((getHighlightingMode() & TAG_ATTRIBUTE_MATCHES) > 0)
                        {cdata = processAttribute(((AttrImpl) child).getValue(), node.getNodeId(), match);}
                    else
                        {cdata = ((AttrImpl) child).getValue();}
                    attribs.addAttribute(child.getQName(), cdata);
                    count++;
                    child.release();
                } else
                    {break;}
            }
            receiver.setCurrentNode(node);
            receiver.startElement(node.getQName(), attribs);
View Full Code Here

                listener.startElement(transaction, (ElementImpl) node, currentPath);
            }
            if (node.hasChildNodes()) {
                final int childCount = node.getChildCount();
                for (int i = 0; i < childCount; i++) {
                    final StoredNode child = iterator.next();
                    if (child.getNodeType() == Node.ELEMENT_NODE)
                        {currentPath.addComponent(child.getQName());}
                    scanNode(transaction, iterator, child, listener, currentPath);
                    if (child.getNodeType() == Node.ELEMENT_NODE)
                        {currentPath.removeLastComponent();}
                }
            }
            if (listener != null) {
                listener.endElement(transaction, (ElementImpl) node, currentPath);
View Full Code Here

TOP

Related Classes of org.exist.dom.StoredNode

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.