use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class sdbprint method processModulesAndArgs.
@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) {
if (arg.equalsIgnoreCase("query")) {
printQuery = true;
} else if (arg.equalsIgnoreCase("Op")) {
printOp = true;
} else if (arg.equalsIgnoreCase("SqlNode")) {
printSqlNode = true;
} else if (arg.equalsIgnoreCase("sql")) {
printSQL = true;
} else if (arg.equalsIgnoreCase("plan")) {
printPlan = true;
} else
throw new CmdException("Not a recognized print form: " + arg + " : Choices are: query, prefix, op, sqlNode, sql");
}
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getIndexDB2.
public static Store getIndexDB2() {
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();
}
sdbdb2i.getTableFormatter().truncate();
return sdbdb2i;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getIndexOracle.
public static Store getIndexOracle() {
if (sdboi == null) {
JDBC.loadDriverOracle();
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();
return sdboi;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getHashDerby.
public static Store getHashDerby() {
if (sdbdh == null) {
JDBC.loadDriverDerby();
String url = JDBC.makeURL("derby", "localhost", "DB/test2-hash");
SDBConnection sdb = new SDBConnection(url, null, null);
StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.Derby);
sdbdh = new StoreTriplesNodesHashDerby(sdb, desc);
sdbdh.getTableFormatter().create();
} else
sdbdh.getTableFormatter().truncate();
return sdbdh;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getIndexHSQL.
public static Store getIndexHSQL() {
if (sdbhsi == null) {
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
sdbhsi.getTableFormatter().truncate();
return sdbhsi;
}
Aggregations