Examples of insertNodeAfter()


Examples of org.exist.storage.DBBroker.insertNodeAfter()

                    if (numActualAttribs != (short) numActualAttribs)
                        {throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "Too many attributes");}
                    elem.setAttributes((short) numActualAttribs);
                    lastPath.addComponent(elem.getQName());
                    // insert the node
                    broker.insertNodeAfter(transaction, last.getNode(), elem);
                    broker.indexNode(transaction, elem, lastPath);
                    broker.getIndexController().indexNode(transaction, elem, lastPath, listener);
                    elem.setChildCount(0);
                    last.setNode(elem);
                    //process child nodes
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                    return elem;
                case Node.TEXT_NODE :
                    final TextImpl text = new TextImpl(newNodeId, ((Text) child).getData());
                    text.setOwnerDocument(owner);
                    // insert the node
                    broker.insertNodeAfter(transaction, last.getNode(), text);
                    broker.indexNode(transaction, text, lastPath);
                    broker.getIndexController().indexNode(transaction, text, lastPath, listener);
                    last.setNode(text);
                    return text;
                case Node.CDATA_SECTION_NODE :
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                    return text;
                case Node.CDATA_SECTION_NODE :
                    final CDATASectionImpl cdata = new CDATASectionImpl(newNodeId, ((CDATASection) child).getData());
                    cdata.setOwnerDocument(owner);
                    // insert the node
                    broker.insertNodeAfter(transaction, last.getNode(), cdata);
                    broker.indexNode(transaction, cdata, lastPath);
                    last.setNode(cdata);
                    return cdata;
                case Node.ATTRIBUTE_NODE:
                    final Attr attr = (Attr) child;
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                        attrib.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attrib.getValue())));
                        attrib.setType(AttrImpl.ID);
                    } else {
                        attrName.setNameType(ElementValue.ATTRIBUTE);
                    }
                    broker.insertNodeAfter(transaction, last.getNode(), attrib);
                    broker.indexNode(transaction, attrib, lastPath);
                    broker.getIndexController().indexNode(transaction, attrib, lastPath, listener);
                    last.setNode(attrib);
                    return attrib;
                case Node.COMMENT_NODE:
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                case Node.COMMENT_NODE:
                    final CommentImpl comment = new CommentImpl(((Comment) child).getData());
                    comment.setNodeId(newNodeId);
                    comment.setOwnerDocument(owner);
                    // insert the node
                    broker.insertNodeAfter(transaction, last.getNode(), comment);
                    broker.indexNode(transaction, comment, lastPath);
                    last.setNode(comment);
                    return comment;
                case Node.PROCESSING_INSTRUCTION_NODE:
                    final ProcessingInstructionImpl pi =
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                        new ProcessingInstructionImpl(newNodeId,
                            ((ProcessingInstruction) child).getTarget(),
                            ((ProcessingInstruction) child).getData());
                    pi.setOwnerDocument(owner);
                    //insert the node
                    broker.insertNodeAfter(transaction, last.getNode(), pi);
                    broker.indexNode(transaction, pi, lastPath);
                    last.setNode(pi);
                    return pi;
                default :
                    throw new DOMException(DOMException.INVALID_MODIFICATION_ERR,
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

            //Remove the actual node data
            broker.removeNode(transaction, oldNode, oldPath, null);
            broker.endRemove(transaction);
            newNode.nodeId = oldNode.nodeId;
            //Reinsert the new node data
            broker.insertNodeAfter(transaction, previousNode, newNode);
            final NodePath path = newNode.getPath(currentPath);
            broker.indexNode(transaction, newNode, path);
            if (newNode.getNodeType() == Node.ELEMENT_NODE)
            {broker.endElement(newNode, path, null);}
            broker.updateNode(transaction, this, true);
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                       DOMException.INVALID_MODIFICATION_ERR,
                       "A node replacing the document root needs to be an element");}
                broker.removeNode(transaction, oldNode, oldNode.getPath(), null);
                broker.endRemove(transaction);
                newNode.setNodeId(oldNode.getNodeId());
                broker.insertNodeAfter(null, previousNode, newNode);
                final NodePath path = newNode.getPath();
                broker.indexNode(transaction, newNode, path);
                broker.endElement(newNode, path, null);
                broker.flush();
            } else {
View Full Code Here

Examples of org.exist.storage.DBBroker.insertNodeAfter()

                broker.flush();
            } else {
                broker.removeNode(transaction, oldNode, oldNode.getPath(), null);
                broker.endRemove(transaction);
                newNode.setNodeId(oldNode.getNodeId());
                broker.insertNodeAfter(transaction, previousNode, newNode);
            }
        } catch (final EXistException e) {
            LOG.warn("Exception while updating child node: " + e.getMessage(), e);
            //TODO : thow exception ?
        } finally {
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.