Package org.apache.xindice.client.xmldb.resources

Examples of org.apache.xindice.client.xmldb.resources.BinaryResourceImpl


            } else if (result instanceof Hashtable) {
                Hashtable compressed = (Hashtable) result;
                SymbolDeserializer symbolDeserial = new SymbolDeserializer();
                return new XMLResourceImpl(id, id, this, symbolDeserial.getSymbols(compressed), (byte[]) compressed.get("document"));
            } else if (result instanceof byte[]) {
                return new BinaryResourceImpl(id, this, (byte[]) result);
            } else {
                return new XMLResourceImpl(id, this, (String) result);
            }

        } catch (XMLDBException x) {
View Full Code Here


        }

        if ("XMLResource".equals(type)) {
            return new XMLResourceImpl(name, this);
        } else {
            return new BinaryResourceImpl(name, this, null);
        }
    }
View Full Code Here

                return new XMLResourceImpl(id, id, this,
                                           doc.getSymbols(),
                                           doc.getDataBytes());

            } else if (entry instanceof byte[]) {
                return new BinaryResourceImpl(id, this, (byte[])entry);
            } else {
                throw new XMLDBException(ErrorCodes.UNKNOWN_RESOURCE_TYPE,
                                         "Internal error: Unexpected resource type " + entry.getClass().getName());
            }
        } catch (Exception e) {
View Full Code Here

                    } else {
                        return new XMLResourceImpl(id, id, this, doc.getSymbols(), doc.getDataBytes());
                    }

                case Entry.BINARY:
                    return new BinaryResourceImpl(id, this, (byte[]) entry.getValue());

                default:
                    throw new XMLDBException(ErrorCodes.UNKNOWN_RESOURCE_TYPE,
                                             "Internal error: Unexpected resource type " + entry.getEntryType());
            }
View Full Code Here

        }

        if ("XMLResource".equals(type)) {
            return new XMLResourceImpl(name, this);
        } else {
            return new BinaryResourceImpl(name, this, null);
        }
    }
View Full Code Here

                } else {
                    return new XMLResourceImpl(id, id, this, doc.getSymbols(), doc.getDataBytes());
                }

            } else if (entry instanceof byte[]) {
                return new BinaryResourceImpl(id, this, (byte[])entry);
            } else {
                throw new XMLDBException(ErrorCodes.UNKNOWN_RESOURCE_TYPE,
                                         "Internal error: Unexpected resource type " + entry.getClass().getName());
            }
        } catch (Exception e) {
View Full Code Here

                Hashtable compressed = (Hashtable) result;
                SymbolDeserializer symbolDeserial = new SymbolDeserializer();
                return new XMLResourceImpl(id, id, this, symbolDeserial.getSymbols(compressed), (byte[]) compressed.get("document"));
            } else if (result instanceof byte[]) {
                // Result is binary.
                return new BinaryResourceImpl(id, this, (byte[]) result);
            } else {
                // Result is XML.
                return new XMLResourceImpl(id, this, (String) result);
            }
View Full Code Here

                SymbolDeserializer symbolDeserial = new SymbolDeserializer();
                return new XMLResourceImpl(id, id, this, symbolDeserial.getSymbols(compressed), (byte[]) compressed.get("document"));

            } else if (result instanceof byte[]) {
                // Result is binary.
                return new BinaryResourceImpl(id, this, (byte[]) result);

            } else {
                // Result is XML.
                return new XMLResourceImpl(id, this, (String) result);
            }
View Full Code Here

        }

        if ("XMLResource".equals(type)) {
            return new XMLResourceImpl(name, this);
        } else {
            return new BinaryResourceImpl(name, this, null);
        }
    }
View Full Code Here

                return new XMLResourceImpl(id, id, this,
                                           doc.getSymbols(),
                                           doc.getDataBytes());

            } else if (entry instanceof byte[]) {
                return new BinaryResourceImpl(id, this, (byte[])entry);
            } else {
                throw new XMLDBException(ErrorCodes.UNKNOWN_RESOURCE_TYPE,
                                         "Internal error: Unexpected resource type " + entry.getClass().getName());
            }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.xindice.client.xmldb.resources.BinaryResourceImpl

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.