Package org.exist.storage

Examples of org.exist.storage.NodePath.addComponent()


                if (child.getNodeType() == Node.ATTRIBUTE_NODE) {
                    last = child;
                    break;
                }
                if (child.getNodeType() == Node.ELEMENT_NODE)
                    {path.addComponent(child.getQName());}
                broker.removeAllNodes(transaction, child, path, listener);
                if (child.getNodeType() == Node.ELEMENT_NODE)
                    {path.removeLastComponent();}
            }
            broker.getIndexController().flush();
View Full Code Here


                continue;
            }
            if (!test.isWildcardTest() && test.getName() != null) {
                int axis = step.getAxis();
                if (axis == Constants.DESCENDANT_AXIS || axis == Constants.DESCENDANT_SELF_AXIS) {
                    path.addComponent(NodePath.SKIP);
                } else if (axis != Constants.CHILD_AXIS && axis != Constants.ATTRIBUTE_AXIS) {
                    return null// not optimizable
                }
                path.addComponent(test.getName());
            }
View Full Code Here

                if (axis == Constants.DESCENDANT_AXIS || axis == Constants.DESCENDANT_SELF_AXIS) {
                    path.addComponent(NodePath.SKIP);
                } else if (axis != Constants.CHILD_AXIS && axis != Constants.ATTRIBUTE_AXIS) {
                    return null// not optimizable
                }
                path.addComponent(test.getName());
            }
        }
        return path;
    }
View Full Code Here

        elem.setNodeId(broker.getBrokerPool().getNodeFactory().createInstance());
        elem.setOwnerDocument(targetDoc);
        elem.setChildCount(doc.getChildCount());
        elem.addNamespaceMapping("exist", Namespaces.EXIST_NS);
        final NodePath path = new NodePath();
        path.addComponent(ROOT_QNAME);
        stack.push(elem);
        broker.storeNode(transaction, elem, path, indexSpec);
        targetDoc.appendChild(elem);
        elem.setChildCount(0);
        // store the document nodes
View Full Code Here

    }

    public NodePath getPath() {
        final NodePath path = new NodePath();
        if (getNodeType() == Node.ELEMENT_NODE)
            {path.addComponent(getQName());}
        NodeImpl parent = (NodeImpl)getParentNode();
        while (parent != null && parent.getNodeType() != Node.DOCUMENT_NODE) {
            path.addComponentAtStart(parent.getQName());
            parent = (NodeImpl)parent.getParentNode();
        }
View Full Code Here

                        for (int i = 0; i < stack.size(); i++) {
                            final NodeStats next = stack.elementAt(i);
                            next.incDepth();
                        }
                        qname = reader.getQName();
                        path.addComponent(qname);
                        final NodeStats nodeStats = perDocGuide.add(path);
                        stack.push(nodeStats);
                        break;
                    case XMLStreamReader.END_ELEMENT:
                        path.removeLastComponent();
View Full Code Here

        NodePath newPath;
        if (qname == null)
            {newPath = currentPath;}
        else {
            newPath = new NodePath(currentPath);
            newPath.addComponent(qname);
            other.add(newPath, this);
        }

        if (children != null) {
            for (int i = 0; i < children.length; i++) {
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.