use of org.eclipse.rdf4j.sail.memory.MemoryStore 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 org.eclipse.rdf4j.sail.memory.MemoryStore in project nextprot-api by calipho-sib.
the class PhenotypicTTLIntegrationTest method init.
@Before
public void init() throws Exception {
String prefixes = this.mockMvc.perform(get("/common-prefixes.ttl")).andReturn().getResponse().getContentAsString();
// Prepare repository
String ttlContent = this.mockMvc.perform(get("/entry/NX_Q15858.ttl")).andReturn().getResponse().getContentAsString();
// Daniel: Missing terminologies and other things I guess...
String ttl = prefixes + ttlContent;
// System.out.println(ttl);
testRepo = new SailRepository(new MemoryStore());
testRepo.initialize();
InputStream stream = new ByteArrayInputStream((ttl).getBytes());
testRepo.getConnection().add(stream, "", RDFFormat.TURTLE, new Resource[] {});
}
Aggregations