Package com.hp.hpl.jena.sdb

Examples of com.hp.hpl.jena.sdb.StoreDesc


     
      String url = JDBC.makeURL("oracle:thin", "localhost:1521", "XE") ;
     
      SDBConnection sdb = new SDBConnection(url, "test2-index", "test2-index") ;
     
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.Oracle) ;
      sdboi = new StoreTriplesNodesIndexOracle(sdb, desc);
      sdboi.getTableFormatter().create();
    }
    else
        sdboi.getTableFormatter().truncate();
View Full Code Here


     
      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();
    }
    else
        sdbdb2h.getTableFormatter().truncate();
View Full Code Here

     
      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();
    }
   
    sdbdb2i.getTableFormatter().truncate();
View Full Code Here

    {
        // Connection
        Connection conn = SDBFactory.createSqlConnection(dir+"connection.ttl") ;
       
        // Store
        StoreDesc desc = StoreDesc.read(dir+"dataset2.ttl") ;
        Store store = SDBFactory.connectStore(conn, desc) ;
       
    }
View Full Code Here

    public static void setUpClass()
    {
        JDBC.loadDriverHSQL() ;
        //SDB.init() ;
        sdb = SDBFactory.createConnection(hsql, "sa", "");
        StoreDesc desc = new StoreDesc("Layout2", "HSQLDB", null) ;
        Store store = SDBFactory.connectStore(sdb, desc) ;
        store.getTableFormatter().format() ;
        // Make a store and format it.
    }
View Full Code Here

        // Setup - make the JDBC connection and read the store description once.
        Connection jdbc = makeConnection(jdbcURL) ;
        //StoreDesc storeDesc = StoreDesc.read("sdb-store.ttl") ;
       
        // Make a store description without any connection information.
        StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash,
                                            DatabaseType.Derby) ;
       
        // Make some calls to the store, using the same JDBC connection and store description.
        System.out.println("Subjects: ") ;
        query("SELECT DISTINCT ?s { ?s ?p ?o }", storeDesc, jdbc) ;
View Full Code Here

    static public void main(String...argv)
    {
        String queryString = "SELECT * { ?s ?p ?o }" ;
        Query query = QueryFactory.create(queryString) ;
       
        StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.Derby) ;
       
        JDBC.loadDriverDerby() ;    // Multiple choices for Derby - load the embedded driver
        String jdbcURL = "jdbc:derby:DB/SDB2";
       
        // Passing null for user and password causes them to be extracted
View Full Code Here

        // Setup - make the JDBC connection and read the store description once.
        Connection jdbc = makeConnection(jdbcURL) ;
        //StoreDesc storeDesc = StoreDesc.read("sdb-store.ttl") ;
       
        // Make a store description without any connection information.
        StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash,
                                            DatabaseType.Derby) ;
       
        // Make some calls to the store, using the same JDBC connection and store description.
        System.out.println("Subjects: ") ;
        query("SELECT DISTINCT ?s { ?s ?p ?o }", storeDesc, jdbc) ;
View Full Code Here

    public static void main(String ... argv) throws SQLException
    {
        Triple t1 = SSE.parseTriple("(:x1 :p :z)") ;
        Triple t2 = SSE.parseTriple("(:x2 :p :z)") ;

        StoreDesc desc = StoreDesc.read("sdb.ttl") ;
        java.sql.Connection conn = SDBFactory.createSqlConnection("sdb.ttl") ;
       
       
        boolean explicitTransactions = false ;
        {
View Full Code Here

            //store.getLoader().setUseThreading(true);
            //store.getLoader().setChunkSize(128);
            //@TODO cache the StoreDesc ?, Store (theyre lightweight, maybe not much advantage)
            String layout = theConfig.containsKey(LAYOUT_TYPE) ? theConfig.get(LAYOUT_TYPE).toString() : LayoutType.LayoutTripleNodesIndex.getName();
            String databaseType = theConfig.containsKey(DATABASE_TYPE) ? theConfig.get(DATABASE_TYPE).toString() : DatabaseType.MySQL.getName();
            StoreDesc desc = new StoreDesc(layout, databaseType);
            store = SDBFactory.connectStore(conn, desc);
        }
        return store;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sdb.StoreDesc

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.