Package org.apache.xindice.xml

Examples of org.apache.xindice.xml.SymbolTable


                    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


                }
            }

        } 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

        // Check if it's node of ours
        if (node instanceof NodeImpl) {
            NodeImpl impl = (NodeImpl) node;
            Document doc = node.getOwnerDocument();

            SymbolTable docSymbols = null;
            if (doc instanceof DocumentImpl) {
                docSymbols = ((DocumentImpl) doc).getSymbols();
            }

            // If document is compressed with exact same symbol table
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

    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();
        }
        return symbols;
    }
View Full Code Here

        loaded = true;
        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

    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();
        }
        return symbols;
    }
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

        // Check if it's node of ours
        if (node instanceof NodeImpl) {
            NodeImpl impl = (NodeImpl) node;
            Document doc = node.getOwnerDocument();

            SymbolTable docSymbols = null;
            if (doc instanceof DocumentImpl) {
                docSymbols = ((DocumentImpl) doc).getSymbols();
            }

            // If document is compressed with exact same symbol table
View Full Code Here

        }

        switch (e.getType()) {
            case DocumentCache.COMPRESSED:
                {          
                    SymbolTable s = col.getSymbols();
                    NodeSource ns = new NodeSource(col, key);
                    Document doc =  new DocumentImpl(e.getValue().getData(), s, ns);
                    return new Entry(key, doc, e.getMeta());
                }
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.