Package org.apache.marmotta.kiwi.persistence.h2

Examples of org.apache.marmotta.kiwi.persistence.h2.H2Dialect


                dbUser = conf.getString("database.user");
                dbPasswd = conf.getString("database.password");

                String dbType = conf.getString("database.type");
                if ("h2".equalsIgnoreCase(dbType)) {
                    dialect = new H2Dialect();
                } else if ("mysql".equalsIgnoreCase(dbType)) {
                    dialect = new MySQLDialect();
                } else if ("postgres".equalsIgnoreCase(dbType)) {
                    dialect = new PostgreSQLDialect();
                }
View Full Code Here


            return fallback;
        } else if (dbDialect == null) {
            log.info("No dialect provded, trying to guess based on dbUrl: {}", dbCon);
            // try guessing
            if (dbCon.startsWith("jdbc:h2:")) {
                return new H2Dialect();
            } else if (dbCon.startsWith("jdbc:mysql:")) {
                return new MySQLDialect();
            } else if (dbCon.startsWith("jdbc:postgresql:")) {
                return new PostgreSQLDialect();
            } else {
                throw new ParseException("could not guess dialect from url, use the -D option");
            }
        } else if ("h2".equalsIgnoreCase(dbDialect)) {
            return new H2Dialect();
        } else if ("mysql".equalsIgnoreCase(dbDialect)) {
            return new MySQLDialect();
        } else if ("postgresql".equalsIgnoreCase(dbDialect)) {
            return new PostgreSQLDialect();
        } else {
View Full Code Here

        this.jdbcPass = jdbcPass;
        this.jdbcUrl = jdbcUrl;
        this.jdbcUser = jdbcUser;

        if("H2".equals(database)) {
            this.dialect = new H2Dialect();
        } else if("MySQL".equals(database)) {
            this.dialect = new MySQLDialect();
        } else if("PostgreSQL".equals(database)) {
            this.dialect = new PostgreSQLDialect();
        }
View Full Code Here

        this.jdbcPass = jdbcPass;
        this.jdbcUrl = jdbcUrl;
        this.jdbcUser = jdbcUser;

        if("H2".equals(database)) {
            this.dialect = new H2Dialect();
        } else if("MySQL".equals(database)) {
            this.dialect = new MySQLDialect();
        } else if("PostgreSQL".equals(database)) {
            this.dialect = new PostgreSQLDialect();
        }
View Full Code Here

    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

        createRunners();
    }

    private void createRunners() throws InitializationError {
        List<KiWiConfiguration> configs = new ArrayList<>();
        createKiWiConfig("H2", new H2Dialect(), configs);
        createKiWiConfig("PostgreSQL", new PostgreSQLDialect(), configs);
        createKiWiConfig("MySQL", new MySQLDialect(), configs);

        for (KiWiConfiguration config : configs) {
            final DatabaseTestClassRunner runner = new DatabaseTestClassRunner(getTestClass().getJavaClass(), config);
View Full Code Here

        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

    @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

            }

            String database = configurationService.getStringConfiguration("database.type");
            KiWiDialect dialect;
            if("h2".equalsIgnoreCase(database)) {
                dialect = new H2Dialect();
            } else if("mysql".equalsIgnoreCase(database)) {
                dialect = new MySQLDialect();
            } else if("postgres".equalsIgnoreCase(database)) {
                dialect = new PostgreSQLDialect();
            } else
View Full Code Here

        // jdbc:h2:mem;MVCC=true;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=10
        repositoryRDF = new SailRepository(
                new KiWiStore(
                        "kiwiTest",
                        "jdbc:h2:mem:facading;MVCC=true;DB_CLOSE_ON_EXIT=TRUE;DB_CLOSE_DELAY=10",
                        "", "", new H2Dialect(),
                        "http://example.com/ctx/default", "http://example.com/ctx/inferred"));
        repositoryRDF.initialize();
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.kiwi.persistence.h2.H2Dialect

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.