Package org.apache.marmotta.kiwi.config

Examples of org.apache.marmotta.kiwi.config.KiWiConfiguration


                        +"- in a kiwi-config file (-c), and/or\n"
                        +"- as commandline parameters (-d, -U, -P, -D)");
                System.exit(3);
            }

            KiWiConfiguration kiwi = new KiWiConfiguration("kiwiLoader", dbCon, dbUser, dbPasswd, dialect);

            // set the baseUri
            if (cmd.hasOption('b')) {
                baseUri = cmd.getOptionValue('b', baseUri);
            }
View Full Code Here


        assertTrue(con.hasStatement(vf.createURI("http://localhost:8080/LMF/resource/anna_schmidt"), RDF.TYPE, FOAF.Person, true));
    }

    private KiWiConfiguration getKiWiConfig() {
        final Properties p = loaderProps;
        KiWiConfiguration config = new KiWiConfiguration("loader-test",
                p.getProperty("database.url"), p.getProperty("database.user"),
                p.getProperty("database.password"), new H2Dialect());

        return config;
    }
View Full Code Here

    private void createKiWiConfig(String database, KiWiDialect dialect, List<KiWiConfiguration> configs) {
        if (forDialects != null && !forDialects.contains(dialect.getClass())) {
            return;
        }
        KiWiConfiguration c = createKiWiConfig(database, dialect);
        if (c!=null) configs.add(c);
    }
View Full Code Here

        KiWiConfiguration c = createKiWiConfig(database, dialect);
        if (c!=null) configs.add(c);
    }
   
    public static KiWiConfiguration createKiWiConfig(String database, KiWiDialect dialect) {
        final KiWiConfiguration config;
        if(!(dialect instanceof H2Dialect) && System.getProperty(database.toLowerCase()+".url") != null) {
            config = new KiWiConfiguration(
                    database,
                    System.getProperty(database.toLowerCase()+".url"),
                    System.getProperty(database.toLowerCase()+".user","kiwi"),
                    System.getProperty(database.toLowerCase()+".pass","kiwi"),
                    dialect);
        } else if (dialect instanceof H2Dialect) {
            config = new KiWiConfiguration(
                    "default-H2",
                    "jdbc:h2:mem:kiwitest;MVCC=true;DB_CLOSE_ON_EXIT=TRUE;DB_CLOSE_DELAY=-1",
                    "kiwi", "kiwi",
                    dialect);
        } else {
            return null;
        }
        config.setDefaultContext("http://localhost/context/default");
        config.setInferredContext("http://localhost/context/inferred");
        return config;
    }
View Full Code Here

                Assert.fail(ex.getMessage());
            }
        }

        public KiWiConfiguration buildBaseConfiguration() {
            return new KiWiConfiguration(
                    "default-H2",
                    "jdbc:h2:mem:kiwitest;MVCC=true;DB_CLOSE_ON_EXIT=TRUE;DB_CLOSE_DELAY=-1",
                    "kiwi", "kiwi",
                    new H2Dialect());
        }
View Full Code Here

                    "kiwi", "kiwi",
                    new H2Dialect());
        }

        private Repository createConfiguration(KiWiConfiguration base, int port) throws RepositoryException {
            KiWiConfiguration config;

            if(base != null) {
                config = base;
            } else {
                config = buildBaseConfiguration();
            }
            config.setDatacenterId(datacenterIds++);
            config.setClustered(true);
            config.setCachingBackend(type);
            config.setClusterPort(port);

            KiWiStore store = new KiWiStore(config);

            Repository repository = new SailRepository(store);
            repository.initialize();
View Full Code Here

    @BeforeClass
    public static void setup() throws RepositoryException {
        logger = LoggerFactory.getLogger(MySQLConcurrencyTest.class);

        KiWiConfiguration mysqlConfig = KiWiDatabaseRunner.createKiWiConfig("MySQL", new MySQLDialect());
        DBConnectionChecker.checkDatabaseAvailability(mysqlConfig);
       
        rnd = new Random();

        store = new KiWiStore(mysqlConfig);
View Full Code Here

    private Repository repository;


    public ProfileLoading(String jdbcUrl, String user, String password) throws RepositoryException {
        this(new KiWiConfiguration("profiling",jdbcUrl,user,password, new PostgreSQLDialect()));
    }
View Full Code Here

    @BeforeClass
    public static void setup() throws RepositoryException {
        logger = LoggerFactory.getLogger(H2ConcurrencyTest.class);

        KiWiConfiguration h2Config = KiWiDatabaseRunner.createKiWiConfig("H2", new H2Dialect());
        DBConnectionChecker.checkDatabaseAvailability(h2Config);
       
        rnd = new Random();

        store = new KiWiStore(h2Config);
View Full Code Here

    @BeforeClass
    public static void setup() {
        ClusterTestSupport s = new ClusterTestSupport(CachingBackends.INFINISPAN_HOTROD);

        KiWiConfiguration base = s.buildBaseConfiguration();
        base.setClusterAddress("127.0.0.1");
        s.setup(base);
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.kiwi.config.KiWiConfiguration

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.