Package org.apache.xindice.xml.dom

Examples of org.apache.xindice.xml.dom.DocumentImpl.appendChild()


            // meta information is not enabled !
            throw new Exception(MISSING_META_CONFIGURATION);
        }
        MetaData meta = col.getCollectionMeta();
        Document doc = new DocumentImpl();
        doc.appendChild(meta.streamToXML(doc, true));

        result.put(RESULT, TextWriter.toString(doc));
        return result;
    }
}
View Full Code Here


            throw new Exception(MISSING_NAME_PARAM);
        }
        String docname = (String) message.get(NAME);
        MetaData meta = col.getDocumentMeta(docname);
        Document doc = new DocumentImpl();
        doc.appendChild(meta.streamToXML(doc, true));

        result.put(RESULT, TextWriter.toString(doc));
        return result;
    }
}
View Full Code Here

                }

                DocumentImpl doc = new DocumentImpl();
                Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:" + NodeSource.SOURCE_MODIFIED);
                elem.setAttribute(NodeImpl.XMLNS_PREFIX + ":src", NodeSource.SOURCE_NS);
                doc.appendChild(elem);
                Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
                elem.appendChild(count);

                return new NodeListSet(doc.getChildNodes());
            } catch (Exception e) {
View Full Code Here

            Document doc = new DocumentImpl();

            Element colEle = doc.createElement("collection");
            colEle.setAttribute("compressed", "true");
            colEle.setAttribute("name", name);
            doc.appendChild(colEle);

            Element filEle = doc.createElement("filer");
            filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
            colEle.appendChild(filEle);
View Full Code Here

            log.trace(debugHeader() + "putObject: key=<" + key + "> class=<" + obj.getClass().getName() + ">");
        }

        Document doc = new DocumentImpl();
        ProcessingInstruction pi = doc.createProcessingInstruction(CLASSNAME, obj.getClass().getName());
        doc.appendChild(pi);
        Element elem = obj.streamToXML(doc);
        doc.appendChild(elem);
        putDocument(key, doc /*, create */);
    }

View Full Code Here

        Document doc = new DocumentImpl();
        ProcessingInstruction pi = doc.createProcessingInstruction(CLASSNAME, obj.getClass().getName());
        doc.appendChild(pi);
        Element elem = obj.streamToXML(doc);
        doc.appendChild(elem);
        putDocument(key, doc /*, create */);
    }

    /**
     * queryCollection performs a query against the current collection
View Full Code Here

                    if (table.containsKey(XMLTools.MAX_KEY_SIZE)) {
                        idxEle.setAttribute("maxkeysize", (String) table.get(XMLTools.MAX_KEY_SIZE));
                    }

                    // Add Element to the document
                    doc.appendChild(idxEle);

                    // If in verbose mode, show....
                    if (table.get(XMLTools.VERBOSE) == "true") {
                        String indexstr = TextWriter.toString(doc);
                        System.out.println("Index node element = ");
View Full Code Here

                if (bytes != null) {
                    DocumentImpl doc = new DocumentImpl();
                    doc.setSymbols(symbols);
                    doc.importNode(n, true);
                    doc.appendChild(n);
                    byte[] b = DOMCompressor.Compress(doc, symbols);
                    resource = new XMLResourceImpl(null, documentId, collection,
                                                   symbols, b);
                } else {
                    resource = new XMLResourceImpl(null, documentId, collection,
View Full Code Here

        Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
        set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
                           "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
        set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
        doc.appendChild(set);

        int i = 0;
        while (i < resources.size()) {
            XMLResource res = (XMLResource) resources.get(i);
            Element resource = doc.createElementNS(RESOURCE_SET_NS,
View Full Code Here

                params.put(RPCDefaultMessage.NAME, id);
            }
            params.put(RPCDefaultMessage.COMPRESSED, "true");

            Document doc = new DocumentImpl();
            doc.appendChild(meta.streamToXML(doc, true));
            params.put(RPCDefaultMessage.META, TextWriter.toString(doc));

            // Object result =
            runRemoteCommand(id == null ? "SetCollectionMeta" : "SetDocumentMeta", params);
            // Document metaDoc = DOMParser.toDocument(result.toString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.