Package org.exist.numbering

Examples of org.exist.numbering.NodeId


         * @param contextId
         */
        NodeSet getDescendantsInSet(NodeSet result, NodeProxy parent, boolean childOnly,
                boolean includeSelf, int mode, int contextId, boolean copyMatches) {
            NodeProxy p;
            final NodeId parentId = parent.getNodeId();
            // document nodes are treated specially
            if (parentId == NodeId.DOCUMENT_NODE) {
                for (int i = 0; i < length; i++) {
                    boolean add;
                    if (childOnly) {
View Full Code Here


             boolean includeSelf, boolean restrictToDirectParent, int recursions) {
        /* if the node is a doument node we still need to
         * complete this method to check if we have found a potential parent
         * in one of the iterations before.
         */
        final NodeId parentOfSelfId = self.getNodeId().getParentId();
        // check if the start-node should be included, e.g. to process an
        // expression like *[. = 'xxx']
        //TODO : investigate on expression like *[.//* = 'xxx']
        if (recursions == 0 && includeSelf && test.matches(self)) {
            // if we're on the child axis, test if
View Full Code Here

                    default:
                        if (((axis == Constants.CHILD_AXIS && level == 0) ||
                            axis == Constants.DESCENDANT_AXIS ||
                            axis == Constants.DESCENDANT_SELF_AXIS) &&
                            test.matches(reader)) {
                            final NodeId nodeId = (NodeId) reader.getProperty(ExtendedXMLStreamReader.PROPERTY_NODE_ID);
                            final NodeProxy p = new NodeProxy(contextNode.getDocument(), nodeId,
                                reader.getNodeType(), reader.getCurrentPosition());
                            p.deepCopyContext(contextNode);
                            if (useSelfAsContext && inPredicate) {
                                p.addContextNode(contextId, p);
View Full Code Here

            os.writeInt(occurences.getTermCount());
            //Mark position
            int lenOffset = os.position();
            //Dummy value : actual one will be written below
            os.writeFixedInt(0);
            NodeId previous = null;
            for (int m = 0; m < occurences.getSize(); ) {
                try {
                    previous = occurences.getNode(m).write(previous, os);
                } catch (IOException e) {
                    LOG.error("IOException while writing fulltext index: " + e.getMessage(), e);
View Full Code Here

                            is.skipBytes(length);
                        } else {
                            // removing nodes: need to filter out the node ids to be removed
                            // feed the new list with the GIDs

                            NodeId previous = null;
                            OccurrenceList newOccurrences = new OccurrenceList();
                            for (int m = 0; m < occurrences; m++) {
                                NodeId nodeId = index.getBrokerPool().getNodeFactory().createFromStream(previous, is);
                                previous = nodeId;
                                int freq = is.readInt();
                                // add the node to the new list if it is not
                                // in the list of removed nodes
                                if (!occurencesList.contains(nodeId)) {
View Full Code Here

                    int startOffset = 0;
                    try {
                        XMLStreamReader reader = broker.getXMLStreamReader(p, false);
                        while (reader.hasNext()) {
                            int ev = reader.next();
                            NodeId nodeId = (NodeId) reader.getProperty(ExtendedXMLStreamReader.PROPERTY_NODE_ID);
                            if (nodeId.equals(proxy.getNodeId()))
                                break;
                            if (ev == XMLStreamConstants.CHARACTERS)
                                startOffset += reader.getText().length();
                        }
                    } catch (IOException e) {
View Full Code Here

                    //Exit if the document is not concerned
                    if (storedDocument == null) {
                        is.skipBytes(length);
                        continue;
                    }
                    NodeId previous = null;
                    for (int m = 0; m < occurrences; m++) {
                        NodeId nodeId = index.getBrokerPool().getNodeFactory().createFromStream(previous, is);
                        previous = nodeId;
                        int freq = is.readInt();
                        NodeProxy storedNode = new NodeProxy(storedDocument, nodeId);
                        // if a context set is specified, we can directly check if the
                        // matching node is a descendant of one of the nodes
View Full Code Here

                    //Exit if the document is not concerned
                    if (storedDocument == null) {
                        is.skipBytes(length);
                        continue;
                    }
                    NodeId previous = null;
                    for (int m = 0; m < occurrences; m++) {
                        NodeId nodeId = index.getBrokerPool().getNodeFactory().createFromStream(previous, is);
                        previous = nodeId;
                        int freq = is.readInt();
                        is.skip(freq);
                        boolean include = true;
                        //TODO : revisit
View Full Code Here

            boolean pooled) {
        int pos = start;
        pos += LENGTH_SIGNATURE_LENGTH;
        final int dlnLen = ByteConversion.byteToShort(data, pos);
        pos += NodeId.LENGTH_NODE_ID_UNITS;
        final NodeId dln = doc.getBrokerPool().getNodeFactory().createFromData(dlnLen, data, pos);       
        int nodeIdLen = dln.size();
        pos += nodeIdLen;
        final CDATASectionImpl cdata = new CDATASectionImpl(dln);
        cdata.cdata = UTF8.decode(data, pos, len - (pos - start));
        return cdata;
    }
View Full Code Here

        } catch (final XMLDBException xe) {
            throw new XPathException("Failed to get document for RemoteXMLResource: " + xe.getMessage());
        } catch(final PermissionDeniedException pde) {
            throw new XPathException("Failed to get document: " + pde.getMessage());
        }
        final NodeId nodeId = broker.getBrokerPool().getNodeFactory().createFromString(((RemoteXMLResource)xres).getNodeId());
        return new NodeProxy(document, nodeId);
       
    }
View Full Code Here

TOP

Related Classes of org.exist.numbering.NodeId

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.