Examples of SDBConnection


Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

    if (sdbdb2h == null) {
      JDBC.loadDriverDB2() ;
     
      String url = JDBC.makeURL("db2", "sweb-sdb-4:50000", "TEST2H") ;
     
      SDBConnection sdb = new SDBConnection(url, "user", "password") ;
     
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.DB2) ;
      sdbdb2h = new StoreTriplesNodesHashDB2(sdb, desc);
      sdbdb2h.getTableFormatter().create();
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

    if (sdbdb2i == null) {
      JDBC.loadDriverDB2() ;
     
      String url = JDBC.makeURL("db2", "sweb-sdb-4:50000", "TEST2I") ;
     
      SDBConnection sdb = new SDBConnection(url, "user", "password") ;
     
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.DB2) ;
      sdbdb2i = new StoreTriplesNodesIndexDB2(sdb, desc);
      sdbdb2i.getTableFormatter().create();
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

  }
 
  public static Store getIndexSAP() {
    if (sdbsapi == null) {
      JDBC.loadDriverSAP();
      SDBConnection sdb = SDBFactory.createConnection(
        "jdbc:sap://localhost/test2-index", "user", "password");
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.SAP) ;
      sdbsapi = new StoreTriplesNodesIndexSAP(sdb, desc);
      sdbsapi.getTableFormatter().create() ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

  }
 
  public static Store getHashSAP() {
    if (sdbsaph == null) {
      JDBC.loadDriverSAP();
      SDBConnection sdb = SDBFactory.createConnection(
        "jdbc:sap://localhost/test2-hash", "user", "password");
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.SAP) ;
      sdbsaph = new StoreTriplesNodesHashSAP(sdb, desc);
      sdbsaph.getTableFormatter().create();
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

     * @param desc              Store description object
     * @return  Store
     */
    public static Store connectStore(Connection sqlConnection, StoreDesc desc)
    {
        SDBConnection sdb = SDBConnectionFactory.create(sqlConnection) ;
        return StoreFactory.create(desc, sdb) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

  private void createSemanticDatabase() throws IOException
  {
      File zipFile;
        ZipEntry entry;
        ZipInputStream zipInputStream = null;     
        SDBConnection sdbConnection;
        StoreDesc sdbStoreDesc;
        Store sdbStore;

        // create hsql-in-memory-database
        JDBC.loadDriverHSQL();
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

     * @param desc              Store description object
     * @return  Store
     */
    public static Store connectStore(Connection sqlConnection, StoreDesc desc)
    {
        SDBConnection sdb = SDBConnectionFactory.create(sqlConnection) ;
        return StoreFactory.create(desc, sdb) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

            StoreDesc desc = StoreDesc.read(configFile);
            Connection conn = SDBFactory.createSqlConnection(configFile);      
           
            // Keep jdbc connection open to simulate pooled connection
            try {
                SDBConnection sdbConn = SDBConnectionFactory.create(conn);         
                Model model = FileManager.get().loadModel("D.ttl");
               
                for (int i=0; i <= 150; i++)
                {
                    Store store = null;
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

        java.sql.Connection conn = SDBFactory.createSqlConnection("sdb.ttl") ;
       
       
        boolean explicitTransactions = false ;
        {
            SDBConnection sConn1 = SDBConnectionFactory.create(conn) ;
            Store store1 = StoreFactory.create(desc, sConn1) ;
           
            if ( explicitTransactions )
                store1.getConnection().getTransactionHandler().begin() ;
           
            Graph graph1 = SDBFactory.connectDefaultGraph(store1) ;
            graph1.getBulkUpdateHandler().removeAll() ;
            SSE.write(graph1) ; System.out.println();
            graph1.add(t1) ;
            SSE.write(graph1) ; System.out.println();
           
            // Look for temporary tables.
            TableUtils.hasTable(sConn1.getSqlConnection(), "#NNodeTriples", new String[0]) ;

            if ( explicitTransactions )
                store1.getConnection().getTransactionHandler().commit() ;
           
            //store1.close() ;
           
        }      
       
        // Mythically return conn to the pool.
        // Get from pool
        // i.e. same connection.  Make a store around it
       
        {
            SDBConnection sConn2 = SDBConnectionFactory.create(conn) ;
            Store store2 = StoreFactory.create(desc, sConn2) ;

            if ( explicitTransactions )
                store2.getConnection().getTransactionHandler().begin() ;
           
View Full Code Here

Examples of com.hp.hpl.jena.sdb.sql.SDBConnection

        Log.setLog4j() ;
       
        String hsql = "jdbc:hsqldb:mem:aname" ;
        //String hsql = "jdbc:hsqldb:file:tmp/db" ;

        SDBConnection sdb = SDBFactory.createConnection(hsql, "sa", "");
        StoreConfig conf = new StoreConfig(sdb) ;
       
        Model m = FileManager.get().loadModel("Data/data2.ttl") ;
        conf.setModel(m) ;
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.