Package org.exist.numbering

Examples of org.exist.numbering.NodeId


                        is.skipBytes( size );
                        continue;
                    }

                    //Process the nodes
                    NodeId    previous   = null;
                    NodeId    nodeId;
                    NodeProxy storedNode;

                    for( int j = 0; j < gidsCount; j++ ) {
                        nodeId     = broker.getBrokerPool().getNodeFactory().createFromStream( previous, is );
                        previous   = nodeId;
View Full Code Here


                    //Exit if the document is not concerned
                    if( storedDocument == null ) {
                        is.skipBytes( size );
                        continue;
                    }
                    NodeId    lastParentId = null;
                    NodeId    previous     = null;
                    NodeId    nodeId;
                    NodeProxy parentNode;

                    for( int j = 0; j < gidsCount; j++ ) {
                        nodeId   = broker.getBrokerPool().getNodeFactory().createFromStream( previous, is );
                        previous = nodeId;
View Full Code Here

                //Dummy value : actual one will be written below
                os.writeFixedInt( 0 );

                //Compute the GID list
                NodeId previous = null;

                for( final NodeId nodeId : gids ) {
                    try {
                        previous = nodeId.write( previous, os );
//                        nodeId.write(os);
View Full Code Here

                                is.copyRaw( os, size );
                            } else {

                                // data are related to our document:
                                // feed the new list with the GIDs
                                NodeId previous = null;

                                for( int j = 0; j < gidsCount; j++ ) {
                                    NodeId nodeId = broker.getBrokerPool().getNodeFactory().createFromStream( previous, is );
                                    previous = nodeId;

                                    // add the node to the new list if it is not
                                    // in the list of removed nodes
                                    if( !containsNode( storedGIDList, nodeId ) ) {
                                        newGIDList.add( nodeId );
                                    }
                                }
                            }
                        }

                        //append the data from the new list
                        if( newGIDList.size() > 0 ) {
                            final int gidsCount = newGIDList.size();

                            //Don't forget this one
                            FastQSort.sort( newGIDList, 0, gidsCount - 1 );
                            os.writeInt( this.doc.getDocId() );
                            os.writeInt( gidsCount );

                            //Mark position
                            final int nodeIDsLength = os.position();

                            //Dummy value : actual one will be written below
                            os.writeFixedInt( 0 );
                            NodeId previous = null;

                            for( final NodeId nodeId : newGIDList ) {
                                try {
                                    previous = nodeId.write( previous, os );
                                }
View Full Code Here

        final boolean hasNamespace = (data[pos] & 0x10) == 0x10;
        final int attrType = ( data[pos] & 0x4 ) >> 0x2;
        pos += StoredNode.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);
        pos += dln.size();
        final short id = (short) Signatures.read(idSizeType, data, pos);
        pos += Signatures.getLength(idSizeType);
        final String name = doc.getBrokerPool().getSymbols().getName(id);
        if (name == null)
            {throw new RuntimeException("no symbol for id " + id);}
View Full Code Here

        final boolean hasNamespace = (data[pos] & 0x10) == 0x10;
        final int attrType = ( data[pos] & 0x4 ) >> 0x2;
        pos += StoredNode.LENGTH_SIGNATURE_LENGTH;
        final int dlnLen = ByteConversion.byteToShort(data, pos);
        pos += NodeId.LENGTH_NODE_ID_UNITS;
        final NodeId dln = broker.getBrokerPool().getNodeFactory().createFromData(dlnLen, data, pos);
        pos += dln.size();
        final short id = (short) Signatures.read(idSizeType, data, pos);
        pos += Signatures.getLength(idSizeType);
        final String name = broker.getBrokerPool().getSymbols().getName(id);
        if (name == null)
            {throw new RuntimeException("no symbol for id " + id);}
View Full Code Here

    public boolean accept(XMLStreamReader reader) {
      if (reader.getEventType() == XMLStreamReader.END_ELEMENT) {
        return true;
      }
      final NodeId refId = referenceNode.getNodeId();
      final NodeId currentId = (NodeId) reader
          .getProperty(EmbeddedXMLStreamReader.PROPERTY_NODE_ID);
      if (currentId.equals(refId)) {
        return false;
      } else if (currentId.getTreeLevel() == refId.getTreeLevel()
          && test.matches(reader)) {
        NodeProxy sibling = result.get(referenceNode.getDocument(),
            currentId);
        if (sibling == null) {
          sibling = new NodeProxy(referenceNode.getDocument(),
View Full Code Here

    }

    public boolean accept(XMLStreamReader reader) {
      if (reader.getEventType() == XMLStreamReader.END_ELEMENT)
        {return true;}
      final NodeId refId = referenceNode.getNodeId();
      final NodeId currentId = (NodeId) reader
          .getProperty(EmbeddedXMLStreamReader.PROPERTY_NODE_ID);
      if (!isAfter)
        {isAfter = currentId.compareTo(refId) > 0
            && !currentId.isDescendantOf(refId);}
      if (isAfter && !refId.isDescendantOf(currentId)
          && test.matches(reader)) {
        final NodeProxy proxy = new NodeProxy(referenceNode.getDocument(),
            currentId, StaXUtil.streamType2DOM(reader
                .getEventType()),
View Full Code Here

    }

    public boolean accept(XMLStreamReader reader) {
      if (reader.getEventType() == XMLStreamReader.END_ELEMENT)
        {return true;}
      final NodeId refId = referenceNode.getNodeId();
      final NodeId currentId = (NodeId) reader
          .getProperty(EmbeddedXMLStreamReader.PROPERTY_NODE_ID);
      if (currentId.compareTo(refId) >= 0)
        {return false;}
      if (!refId.isDescendantOf(currentId) && test.matches(reader)) {
        final NodeProxy proxy = new NodeProxy(referenceNode.getDocument(),
            currentId, StaXUtil.streamType2DOM(reader
                .getEventType()),
View Full Code Here

    public static StoredNode deserialize(byte[] data, int start, int len, DocumentImpl doc, 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;
        int l = ByteConversion.byteToInt(data, pos);
        pos += LENGTH_TARGET_DATA;
        String target;
        target = new String(data, pos, l, UTF_8);
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.