Package org.exist.util

Examples of org.exist.util.XMLString


        cdata = data;
    }

    public void setData( char[] data, int start, int howmany ) throws DOMException {
        if(cdata == null)
            {cdata = new XMLString(data, start, howmany);}
        else
            {cdata.setData(data, start, howmany);}
    }
View Full Code Here


            }
           
            if (offsets != null) {
                FastQSort.sort(offsets, 0, offsets.size() - 1);
               
                final XMLString str = text.getXMLString();

                int pos = 0;
                for (final Match.Offset offset : offsets) {
                    if (offset.getOffset() > pos) {
                        nodeNr = builder.characters(str.substring(pos, offset.getOffset() - pos));
                        result.add(builder.getDocument().getNode(nodeNr));
                    }
                   
                    final Sequence params[] = {
                            new StringValue(str.substring(offset.getOffset(), offset.getLength())),
                            proxy,
                            extraArgs
                    };
                    result.addAll(callback.evalFunction(null, null, params));
                   
                    pos = offset.getOffset() + offset.getLength();
                }
                if (pos < str.length()) {
                    nodeNr = builder.characters(str.substring(pos, str.length() - pos));
                    result.add(builder.getDocument().getNode(nodeNr));
                }
            } else {
                nodeNr = builder.characters(text.getXMLString());
                result.add(builder.getDocument().getNode(nodeNr));
View Full Code Here

            if( ( rSpec != null ) || ( qSpec != null ) ) {

                if( contentStack == null ) {
                    contentStack = new Stack<XMLString>();
                }
                final XMLString contentBuf = new XMLString();
                contentStack.push( contentBuf );
            }
            super.startElement( transaction, element, path );
        }
View Full Code Here

        {
            final GeneralRangeIndexSpec rSpec = doc.getCollection().getIndexByPathConfiguration( broker, path );
            final QNameRangeIndexSpec   qSpec = doc.getCollection().getIndexByQNameConfiguration( broker, element.getQName() );

            if( ( rSpec != null ) || ( qSpec != null ) ) {
                final XMLString content = ( XMLString )contentStack.pop();

                if( rSpec != null ) {
                    storeElement( element, content.toString(), RangeIndexSpec.indexTypeToXPath( rSpec.getIndexType() ), NativeValueIndex.IDX_GENERIC, false );
                }

                if( qSpec != null ) {
                    storeElement( element, content.toString(), RangeIndexSpec.indexTypeToXPath( qSpec.getIndexType() ), NativeValueIndex.IDX_QNAME, false );
                }
            }
            super.endElement( transaction, element, path );
        }
View Full Code Here

        public void characters( Txn transaction, CharacterDataImpl text, NodePath path )
        {
            if( ( contentStack != null ) && !contentStack.isEmpty() ) {

                for( int i = 0; i < contentStack.size(); i++ ) {
                    final XMLString next = ( XMLString )contentStack.get( i );
                    next.append( text.getXMLString() );
                }
            }
            super.characters( transaction, text, path );
        }
View Full Code Here

        }
    }

    public AttrImpl (QName name, String str, SymbolTable symbols) throws DOMException {
        this(name, symbols);
        this.value = new XMLString( str.toCharArray() );
    }
View Full Code Here

            if (prefixLen > 0)
                {prefix = UTF8.decode(data, pos, prefixLen).toString();}
            pos += prefixLen;
        }
        final String namespace = nsId == 0 ? "" : doc.getBrokerPool().getSymbols().getNamespace(nsId);
        XMLString value = UTF8.decode(data, pos, len - (pos - start));

        //OK : we have the necessary material to build the attribute
        AttrImpl attr;
        if(pooled)
            {attr = (AttrImpl) NodePool.getInstance().borrowNode(Node.ATTRIBUTE_NODE);}
View Full Code Here

    public String getNodeValue() {
        return value.toString();
    }
   
    public void setValue(String str) throws DOMException {
        this.value = new XMLString(str.toCharArray());
    }
View Full Code Here

            if (text.length() == 0) {
                CharacterDataImpl.readData(nodeId, current, text);
            }
            return text;
        }
        return new XMLString();
    }
View Full Code Here

TOP

Related Classes of org.exist.util.XMLString

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.