Package com.hp.hpl.jena.sdb

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


        // 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

    static StoreDescAssembler storeAssem = new StoreDescAssembler() ;
   
    @Override
    public Dataset open(Assembler a, Resource root, Mode mode)
    {
        StoreDesc desc = openStore(a, root, mode) ;
        Dataset ds = SDBFactory.connectDataset(desc) ;
        AssemblerUtils.setContext(root, ds.getContext());
        return ds ;
    }
View Full Code Here

   
    /** Get the StoreDesc for this dataset */
    public StoreDesc openStore(Assembler a, Resource root, Mode mode)
    {
        Resource s = storeResource(root) ;
        StoreDesc desc = storeAssem.open(a, s, mode) ;
        return desc ;
    }
View Full Code Here

    @Override
    protected void processModulesAndArgs()
    {
        // Force the connection to be a null one.
        // Known to be called after arg module initialization.
        StoreDesc storeDesc = getModStore().getStoreDesc() ;
        storeDesc.connDesc.setJdbcURL(JDBC.jdbcNone) ;

        if ( storeDesc.getLayout() == null )
            storeDesc.setLayout(layoutDefault) ;
       
        printSQL = contains(argDeclPrintSQL) ;
        List<String> strList = getValues(argDeclPrint) ;
        for ( String arg : strList )
        {
View Full Code Here

     
      SDBConnection sdb = SDBFactory.createConnection(
                // "sdb_test", "jena", "swara"
        "jdbc:mysql://localhost/test2-index", "user", "password");
     
      StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.MySQL) ;
      sdbmsi = new StoreTriplesNodesIndexMySQL(sdb, desc);
     
      sdbmsi.getTableFormatter().create();
    }
    else
View Full Code Here

      JDBC.loadDriverMySQL();
     
      SDBConnection sdb = SDBFactory.createConnection(
        "jdbc:mysql://localhost/test2-hash", "user", "password");
   
      StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.MySQL) ;
      sdbmsh = new StoreTriplesNodesHashMySQL(sdb, desc);
     
      sdbmsh.getTableFormatter().create();
    }
    else
View Full Code Here

      JDBC.loadDriverHSQL();

      SDBConnection sdb = SDBFactory.createConnection(
          "jdbc:hsqldb:mem:aname", "sa", "");

      StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.HSQLDB) ;
      sdbhsi = new StoreTriplesNodesIndexHSQL(sdb, desc);

      sdbhsi.getTableFormatter().create();
    }
    else
View Full Code Here

      JDBC.loadDriverHSQL();

      SDBConnection sdb = SDBFactory.createConnection(
          "jdbc:hsqldb:mem:bname", "sa", "");

            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.HSQLDB) ;
      sdbhsh = new StoreTriplesNodesHashHSQL(sdb, desc);
      sdbhsh.getTableFormatter().create();
    }
    else
        sdbhsh.getTableFormatter().truncate();
View Full Code Here

  public static Store getIndexPgSQL() {
    if (sdbpgi == null) {
      JDBC.loadDriverPGSQL();
      SDBConnection sdb = SDBFactory.createConnection(
        "jdbc:postgresql://localhost/test2-index", "user", "password");
            StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.PostgreSQL) ;
      sdbpgi = new StoreTriplesNodesIndexPGSQL(sdb, desc);
      sdbpgi.getTableFormatter().create() ;
    }
    else
        sdbpgi.getTableFormatter().truncate();
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.