Package org.apache.xindice.xml.dom

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


                    }
                }
                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 {
View Full Code Here


    private Indexer createIndex(Collection col, String name, String pattern, String type, String pagesize, String maxkeysize)
            throws DBException {

        Document doc = new DocumentImpl();

        Element idxEle = doc.createElement("index");
        idxEle.setAttribute("name", name);
        idxEle.setAttribute("pattern", pattern);
        idxEle.setAttribute("class", XINDICE_VAL_INDEXER);

        if (type != null && type.length() > 0) {
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 {
View Full Code Here

     * @param expandSource if true, source meta attributes will be added
     */
    public static Document queryResultsToDOM(NodeSet nodeSet, boolean expandSource) {
        DocumentImpl doc = new DocumentImpl();

        Element root = doc.createElement("result");
        doc.appendChild(root);
        int count = 0;
        while (nodeSet != null && nodeSet.hasMoreNodes()) {
            final Object element = nodeSet.getNextNode();
            if (element instanceof Attr) {
View Full Code Here

    }

    public Node getContextNode() {
        if (elem == null) {
            Document d = new DocumentImpl();
            elem = d.createElement("nsmap");
            d.appendChild(elem);
            Iterator i = entrySet().iterator();
            while (i.hasNext()) {
                Map.Entry entry = (Map.Entry) i.next();
                String pfx = (String) entry.getKey();
View Full Code Here

                    return false;
                }

                Document doc = new DocumentImpl();

                Element colEle = doc.createElement("collection");
                colEle.setAttribute("name", colName);
                // FIXME Make this configurable
                colEle.setAttribute("compressed", "true");
                colEle.setAttribute("inline-metadata", "true");
View Full Code Here

                colEle.setAttribute("compressed", "true");
                colEle.setAttribute("inline-metadata", "true");

                doc.appendChild(colEle);

                Element filEle = doc.createElement("filer");
                filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
                if (table.containsKey(XMLTools.PAGE_SIZE)) {
                    filEle.setAttribute("pagesize", (String) table.get(XMLTools.PAGE_SIZE));
                }
View Full Code Here

        checkOpen();
        try {
            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");
View Full Code Here

            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);

            return createCollection(name, doc);
        } catch (Exception e) {
View Full Code Here

                if (table.get(XMLTools.NAME_OF) != null && table.get(XMLTools.PATTERN) != null) {

                    Document doc = new DocumentImpl();

                    // Create the index element to hold attributes
                    Element idxEle = doc.createElement("index");
                    idxEle.setAttribute("class", XINDICE_VAL_INDEXER);
                    idxEle.setAttribute("name", (String) table.get(XMLTools.NAME_OF));
                    idxEle.setAttribute("pattern", (String) table.get(XMLTools.PATTERN));

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.