Package com.hp.hpl.jena.db

Examples of com.hp.hpl.jena.db.DBConnection


    // load the the driver class
    Class.forName(M_DBDRIVER_CLASS);

    String dbUrl = "jdbc:mysql://" + hostName + "/" + dbName;
    // create a database connection
    IDBConnection conn = new DBConnection(dbUrl, userName, password, "MySQL");

    // create a model maker with the given connection parameters
    ModelMaker maker = ModelFactory.createModelRDBMaker(conn);

    ModelRDB model = (ModelRDB) maker.openModel(modelName);
View Full Code Here


    String jdbcPassword = "";
    String jdbcType = "Derby";

    // Create database connection
    LOGGER.debug("Creating RDB database with URL " + jdbcUrl);
    IDBConnection conn = new DBConnection(jdbcUrl, jdbcUser, jdbcPassword, jdbcType);
    ModelMaker maker = ModelFactory.createModelRDBMaker(conn);

    // create or open the default model
    Model model = maker.createDefaultModel();
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.db.DBConnection

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.