Package org.apache.xindice.xml.dom

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


                }

                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


                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

      fail("Can't parse xml document! "+e.getMessage());
    }
    MetaData meta = new MetaData();
    meta.streamFromXML(doc.getDocumentElement(), true);
    Document doc2 = new DocumentImpl();
        doc2.appendChild(meta.streamToXML(doc2, true));
    assertEquals(TextWriter.toString(doc), TextWriter.toString(doc2));
  }
}
View Full Code Here

        colEle.setAttribute("name", colName);
        // FIXME Make this configurable
        colEle.setAttribute("compressed", "true");
        colEle.setAttribute("inline-metadata", "true");

        doc.appendChild(colEle);

        Element filEle = doc.createElement("filer");
        String filerClass = "org.apache.xindice.core.filer.BTreeFiler";
        // see if user specified filer type
        if (table.getString(XMLTools.FILER) != null) {
View Full Code Here

        colEle.setAttribute(COMPRESSED_ATTR, compressed);
        if (inlineMeta == null || (!inlineMeta.equalsIgnoreCase("true") && !inlineMeta.equalsIgnoreCase("false"))) {
            inlineMeta = Boolean.toString(DEFAULT_INLINE_META);
        }
        colEle.setAttribute(INLINE_META_ATTR, inlineMeta);
        doc.appendChild(colEle);
        Element filEle = doc.createElement(FILER_ELE);
        if (filerClass == null || filerClass.length() == 0) {
            filerClass = DEFAULT_FILER_CLASS;
        }
        filEle.setAttribute(FILER_CLASS_ATTR, filerClass);
View Full Code Here

                idxEle.setAttribute(XMLTools.PAGE_COUNT, table.getString(XMLTools.PAGE_COUNT));
            }
        }

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

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

                if (customDoc != null) {
                    if (!customDoc.getDocumentElement().getNodeName().equals("custom")) {
                        Document newCustomDoc = new DocumentImpl();
                        Element customEle = newCustomDoc.createElement("custom");
                        customEle.appendChild(customDoc.getDocumentElement());
                        newCustomDoc.appendChild(customEle);
                        customDoc = newCustomDoc;
                    }
                    try {
                        MetaData customMeta = col.getCollectionMeta();
                        customMeta.setCustomDocument(customDoc);
View Full Code Here

        if (maxkeysize != null && maxkeysize.length() > 0) {
            idxEle.setAttribute("maxkeysize", maxkeysize);
        }

        doc.appendChild(idxEle);
        return col.createIndexer(new Configuration(doc, false));
    }

    private void printTypeSelector(ServletOutputStream output) throws IOException {
        output.println("<select name=\"type\" size\"1\">");
View Full Code Here

                if (customDoc != null) {
                    if (!customDoc.getDocumentElement().getNodeName().equals("custom")) {
                        Document newCustomDoc = new DocumentImpl();
                        Element customEle = newCustomDoc.createElement("custom");
                        customEle.appendChild(customDoc.getDocumentElement());
                        newCustomDoc.appendChild(customEle);
                        customDoc = newCustomDoc;
                    }
                    try {
                        MetaData customMeta = col.getDocumentMeta(name);
                        customMeta.setCustomDocument(customDoc);
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

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.