Package org.apache.xindice.util

Examples of org.apache.xindice.util.Configuration


    }

    public void setUp() throws Exception {
        String name = getClass().getName();
        db = new Database();
        db.setConfig(new Configuration(DOMParser.toDocument(DatabaseTest.DATABASE)));
        collection = db.createCollection(name, new Configuration(
                DOMParser.toDocument(
                        "<collection compressed='true' name='" + name + "' inline-metadata='true'>" +
                            "<filer class='org.apache.xindice.core.filer.BTreeFiler'/>" +
                        "</collection>"), false
        ));
View Full Code Here


    private Indexer createIndex(String name, String pattern, String type) throws Exception {
        String config = "<index name='" + name + "' " +
                          "class='" + indexClass + "' " +
                          "pattern='" + pattern + "' type='" + type + "'/>";
        Indexer ind = collection.createIndexer(new Configuration(DOMParser.toDocument(config)));
        Thread.sleep(100);
        return ind;
    }
View Full Code Here

    }

    public void setUp() throws Exception {
        if (db == null) {
            Database db = new Database();
            db.setConfig(new Configuration(DOMParser.toDocument(DATABASE)));
            col = db.createCollection("testcol", new Configuration(DOMParser.toDocument(COLLECTION)));
            col.insertDocument(DOMParser.toDocument(DOCUMENT));

            XPathQueryResolverTest.db = db;
        }
View Full Code Here

        super(name);
    }

    public void setUp() throws Exception {
        db = new Database();
        db.setConfig(new Configuration(DOMParser.toDocument(DATABASE)));
        configurationA = new Configuration(DOMParser.toDocument(COLLECTIONA));
        configurationB = new Configuration(DOMParser.toDocument(COLLECTIONB));
        configurationC = new Configuration(DOMParser.toDocument(COLLECTIONC));
    }
View Full Code Here

    }

    public void setUp() throws Exception {
        String name = getClass().getName();
        db = new Database();
        db.setConfig(new Configuration(DOMParser.toDocument(DatabaseTest.DATABASE)));
        collection = db.createCollection(name, new Configuration(
                DOMParser.toDocument(
                        "<collection compressed=\"true\" name=\"" + name + "\" inline-metadata=\"true\">" +
                            "<filer class=\"org.apache.xindice.core.filer.BTreeFiler\" />" +
                        "</collection>"), false
        ));
View Full Code Here

            for (int i = 0; i < THREADS; i++) {

                threads[i] = new Thread() {
                    public void run() {
                        try {
                            db.createCollection(name, new Configuration(
                                    DOMParser.toDocument(
                                            "<collection  compressed='true' name='" + name + "' inline-metadata='true'>" +
                                            "  <filer class='org.apache.xindice.core.filer.BTreeFiler' />" +
                                            "</collection>"), false
                            ));
View Full Code Here

    // See superclass for documentation. Note that first argument is the path, not the name.
    public org.xmldb.api.base.Collection createCollection(String path, Document configuration) throws XMLDBException {
        checkOpen();
        try {
            Configuration config = new Configuration(configuration.getDocumentElement(), false);
            col.createCollection(path, config);

            // Traverse path to get newly created collection
            org.xmldb.api.base.Collection col = this;
            if (path.indexOf("/") != -1) {
View Full Code Here

    /* see superclass for documentation */
    public void createIndexer(Document configuration) throws XMLDBException {
        checkOpen();
        try {
            col.createIndexer(new Configuration(configuration, false));
        } catch (Exception e) {
            throw FaultCodes.createXMLDBException(e);
        }
    }
View Full Code Here

        try {
            System.out.println("Processing database " + path);
            System.out.println();
            System.out.println("DI\tCollection name");

            db.setConfig(new Configuration(DOMParser.toDocument(config)));

            if (log.isInfoEnabled()) {
                log.info("Rebuilding collections...");
            }
            success = processCollection(db, command);
View Full Code Here

        try {
            String[] list = col.listIndexers();
            for (int i = 0; i < list.length; i++) {
                Indexer idx = col.getIndexer(list[i]);
                Configuration idxConf = idx.getConfig();
                if (log.isInfoEnabled()) {
                    log.info("Rebuilding index " + list[i] + " for collection " + col.getCanonicalName());
                }
                col.dropIndexer(idx);
                col.createIndexer(idxConf);
View Full Code Here

TOP

Related Classes of org.apache.xindice.util.Configuration

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.