Package org.apache.xindice.xml

Examples of org.apache.xindice.xml.SymbolTable


        // lastMod = ((Long) buffer.get("timestamp")).longValue();

        Document doc = new DocumentImpl((byte[]) buffer.get("symbols"), hcSyms, null);

        if (syms == null) {
            syms = new SymbolTable();
        }

        synchronized (syms) {
            syms.streamFromXML(doc.getDocumentElement());
        }
View Full Code Here


                    log.trace(localDebugHeader
                              + "Internal symbols=<" + TextWriter.toString(symConfig.getElement()) + ">");
                }

                try {
                    symbols = new SymbolTable(symConfig.getElement());
                } catch (Exception e) {
                    if (log.isWarnEnabled()) {
                        log.warn(localDebugHeader + "Error building symbol table from internal symbols", e);
                    }
                }
View Full Code Here

            return null;
        } else if (v instanceof Document) {
            return (Document) v;
        } else if (v instanceof byte[]) {
            try {
                SymbolTable s = col.getSymbols();
                NodeSource ns = new NodeSource(col, key);
                return new DocumentImpl((byte[]) v, s, ns);
            } catch (Exception e) {
                if (log.isWarnEnabled()) {
                    log.warn("ignored exception", e);
View Full Code Here

    public SymbolTable loadSymbols(Collection collection) throws DBException {
        String name = getSymbolTableName(collection);

        Collection symCol = getCollection(SYMBOLS);

        SymbolTable symbols = (SymbolTable) symCol.getObject(name);
        if (symbols == null) {
            symbols = new SymbolTable();
            saveSymbols(collection, symbols);
        }
        return symbols;
    }
View Full Code Here

        }

        try {
            if (data != null) {
                DocumentImpl doc = (DocumentImpl) getOwnerDocument();
                SymbolTable st = doc.getSymbols();

                ByteArrayInput bis = new ByteArrayInput(data, pos, len);
                XMLCompressedInput xci = new XMLCompressedInput(bis, st);

                xci.readSignature(); // Skip The Signature
View Full Code Here

        }
       
        try {
            if (data != null) {
                DocumentImpl doc = (DocumentImpl) getOwnerDocument();
                SymbolTable st = doc.getSymbols();

                ByteArrayInput bis = new ByteArrayInput(data, pos, len);
                XMLCompressedInput xci = new XMLCompressedInput(bis, st);

                xci.readSignature(); // Skip The Signature
View Full Code Here

            }
        }

        if (compress) {
            if (symbols == null) {
                symbols = new SymbolTable();
            }
            data = DOMCompressor.Compress(doc, symbols);
            pos = 0;
            len = data.length;
        }
View Full Code Here

                symbols = cDoc.getSymbols();
                data = cDoc.getDataBytes();
                pos = cDoc.getDataPos();
                len = cDoc.getDataLen();
            } else {
                symbols = new SymbolTable();
                data = DOMCompressor.Compress(doc, symbols);
                pos = 0;
                len = data.length;
            }
        } catch (Exception e) {
View Full Code Here

        }

        try {
            if (data != null) {
                DocumentImpl doc = (DocumentImpl) getOwnerDocument();
                SymbolTable st = doc.getSymbols();

                ByteArrayInput bis = new ByteArrayInput(data, pos, len);
                XMLCompressedInput in = new XMLCompressedInput(bis, st);

                in.readSignature(); // Skip The Signature
                in.readContentSize(); // Skip The Content Size

                symbolID = in.readShort();
                SymbolTable.SymbolInfo si = st.getSymbolInfo(symbolID);
                nodeName = si.getQName();
                nsURI = si.getNamespaceURI();

                loadChildren(st);
            }
View Full Code Here

        }

        try {
            if (data != null) {
                DocumentImpl doc = (DocumentImpl) getOwnerDocument();
                SymbolTable st = doc.getSymbols();

                ByteArrayInput bis = new ByteArrayInput(data, pos, len);
                XMLCompressedInput xci = new XMLCompressedInput(bis, st);

                byte signature = xci.readByte();
                byte entityType = (byte) (signature & 0x1F);
                switch (entityType) {

                    case Signatures.EntUnknown:
                        nodeName = null;
                        break;

                    case Signatures.EntDefined:
                        symbolID = xci.readShort();
                        nodeName = st.getName(symbolID);
                        break;

                    case Signatures.EntAmp:
                        nodeName = "&amp;";
                        break;
View Full Code Here

TOP

Related Classes of org.apache.xindice.xml.SymbolTable

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.