Package org.exist.util

Examples of org.exist.util.Configuration$IndexModuleConfig


   * @author Patrick Bosek <patrick.bosek@jorsek.com>
   * @throws DatabaseConfigurationException
   */
  public static void moveDataDirBack(String backupDataDirPath) throws IOException, DatabaseConfigurationException {

    Configuration conf = new Configuration();
   
    String dataDirPath = (String) conf.getProperty(BrokerPool.PROPERTY_DATA_DIR);
    dataDirPath = dataDirPath.replaceAll("/$", "");
   
    File lastTestRunDataDir = new File(dataDirPath + ".last-test-run");
   
    if(lastTestRunDataDir.exists()) FileUtils.deleteDirectory(lastTestRunDataDir);
View Full Code Here


        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            File confFile = ConfigurationHelper.lookup("conf.xml");
            Configuration config = new Configuration(confFile.getAbsolutePath());
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();
            assertNotNull(pool);
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
View Full Code Here

        DatabaseManager.registerDatabase(database);

        rootCollection =
                DatabaseManager.getCollection("xmldb:exist://" + XmldbURI.ROOT_COLLECTION, "admin", "");
       
        Configuration config = BrokerPool.getInstance().getConfiguration();
        Map map = (Map)config.getProperty(XQueryContext.PROPERTY_BUILT_IN_MODULES);
        map.put(
        "http://exist-db.org/xquery/versioning/svn",
        org.exist.versioning.svn.xquery.SVNModule.class);
    }
View Full Code Here

            "xmldb:exist://" + VALIDATION_HOME_COLLECTION_URI +"/hamlet_wrongdoctype.xml");
    }

    @BeforeClass
    public static void startup() throws Exception {
        config = new Configuration();
        config.setProperty(XMLReaderObjectFactory.PROPERTY_VALIDATION_MODE, "auto");

        BrokerPool.configure(1, 5, config);

        //create the collections we need for these tests
View Full Code Here

    @BeforeClass
    public static void startDB() {
        DBBroker broker = null;
        try {
            Configuration config = new Configuration();
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();

            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();
View Full Code Here

            assertNotNull(root);
            broker.saveCollection(transaction, root);

            transact.commit(transaction);

            Configuration config = BrokerPool.getInstance().getConfiguration();
            savedConfig = (Boolean) config.getProperty(Indexer.PROPERTY_PRESERVE_WS_MIXED_CONTENT);
            config.setProperty(Indexer.PROPERTY_PRESERVE_WS_MIXED_CONTENT, Boolean.TRUE);
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
View Full Code Here

                assertNotNull(root);
                broker.removeCollection(transaction, root);
            }
            transact.commit(transaction);

            Configuration config = BrokerPool.getInstance().getConfiguration();
            config.setProperty(Indexer.PROPERTY_PRESERVE_WS_MIXED_CONTENT, savedConfig);
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
View Full Code Here

    @BeforeClass
    public static void startDB() {
        try {
            File confFile = ConfigurationHelper.lookup("conf.xml");
            Configuration config = new Configuration(confFile.getAbsolutePath());
            config.setProperty(Indexer.PROPERTY_SUPPRESS_WHITESPACE, "none");
            config.setProperty(Indexer.PRESERVE_WS_MIXED_CONTENT_ATTRIBUTE, Boolean.TRUE);
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();
            assertNotNull(pool);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

      setWatchDog(new XQueryWatchDog(this));
     
        loadDefaultNS();
       

        Configuration config = getBroker().getConfiguration();
        // Get map of built-in modules
        Map<String, Class<Module>> builtInModules = (Map)config.getProperty( PROPERTY_BUILT_IN_MODULES );

        if( builtInModules != null ) {

            // Iterate on all map entries
            for( Map.Entry<String, Class<Module>> entry : builtInModules.entrySet() ) {
View Full Code Here

        TransactionManager transact = null;
        Txn transaction = null;
        try {
            File confFile = ConfigurationHelper.lookup("conf.xml");
            System.out.printf("conf: " + confFile.getAbsolutePath());
            Configuration config = new Configuration(confFile.getAbsolutePath());
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();
          assertNotNull(pool);
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
View Full Code Here

TOP

Related Classes of org.exist.util.Configuration$IndexModuleConfig

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.