use of fr.lirmm.graphik.graal.store.rdbms.natural.NaturalRDBMSStore in project graal by graphik-team.
the class TestUtil method getAtomSet.
public static AtomSet[] getAtomSet() {
if (neo4jStore != null) {
neo4jStore.close();
}
try {
if (defaultRDBMSStore != null) {
defaultRDBMSStore.close();
}
if (plainTableRDBMSStore != null) {
plainTableRDBMSStore.close();
}
defaultRDBMSStore = new AdHocRdbmsStore(new HSQLDBDriver(DEFAULT_RDBMS_TEST, null));
plainTableRDBMSStore = new NaturalRDBMSStore(new HSQLDBDriver(PLAIN_TABLE_RDBMS_TEST, null));
defaultRDBMSStore.clear();
plainTableRDBMSStore.clear();
rm(NEO4J_TEST);
neo4jStore = new Neo4jStore(NEO4J_TEST);
if (sailStore != null) {
sailStore.close();
}
try {
sailStore = new RDF4jStore(new SailRepository(new MemoryStore()));
} catch (AtomSetException e) {
Assert.assertTrue("Error while creating SailStore", false);
}
return new AtomSet[] { new DefaultInMemoryGraphStore(), new LinkedListAtomSet(), defaultRDBMSStore, plainTableRDBMSStore, neo4jStore, sailStore };
} catch (SQLException e) {
throw new Error(e);
} catch (AtomSetException e) {
throw new Error(e);
}
}
use of fr.lirmm.graphik.graal.store.rdbms.natural.NaturalRDBMSStore in project graal by graphik-team.
the class TestUtil method getStores.
public static RdbmsStore[] getStores() {
if (defaultRdbms != null) {
try {
defaultRdbms.getDriver().getConnection().createStatement().executeQuery("DROP SCHEMA PUBLIC CASCADE");
} catch (SQLException e) {
throw new Error(e);
}
defaultRdbms.close();
}
if (plainTableRdbms != null) {
try {
plainTableRdbms.getDriver().getConnection().createStatement().executeQuery("DROP SCHEMA PUBLIC CASCADE");
} catch (SQLException e) {
throw new Error(e);
}
plainTableRdbms.close();
}
try {
defaultRdbms = new AdHocRdbmsStore(new HSQLDBDriver(DEFAULT_TEST, null));
plainTableRdbms = new NaturalRDBMSStore(new HSQLDBDriver(PLAIN_TABLE_TEST, null));
} catch (AtomSetException e) {
throw new Error(e);
} catch (SQLException e) {
throw new Error(e);
}
return new RdbmsStore[] { defaultRdbms, plainTableRdbms };
}
Aggregations