@Override protected void initializeInternal() throws SailException { try { _store.open(); _valueFactory = new CumulusRDFValueFactory(_store.getDictionary()); } catch (final CumulusStoreException exception) { LOGGER.error(MessageCatalog._00025_CUMULUS_SYSTEM_INTERNAL_FAILURE, exception); throw new SailException(exception); } }
@Override protected void initializeInternal() throws SailException { try { _store.open(); _valueFactory = new CumulusRDFValueFactory(_store.getDictionary()); } catch (final CumulusStoreException exception) { LOGGER.error(MessageCatalog._00025_CUMULUS_SYSTEM_INTERNAL_FAILURE, exception); throw new SailException(exception); } }
/** * Creates and opens the quad store. * @throws Exception If the quad store could not be opened. */ @BeforeClass public static void setUp() throws Exception { _quadStore = newQuadStore(); _quadStore.open(); }
@BeforeClass public static void setUp() throws Exception { _quadStore = newQuadStore(); _quadStore.open(); }
/** * Setup fixture for the whole test case. * * @throws Exception never, otherwise the tests fail. */ @BeforeClass public static void beforeAllTests() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); }
@BeforeClass public static void setUp() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); }
/** * Setup fixture for the whole test case. * * @throws Exception never, otherwise the tests fail. */ @BeforeClass public static void beforeAllTests() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); }
store.open();
store.open();
@BeforeClass public static void beforeAllTests() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); _counter_factory = _tripleStore.getCounterFactory(); }
@BeforeClass public static void beforeAllTests() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); map = new PersistentMap<String, String>(String.class, String.class, "MAP_" + randomString(), false, null); map.initialise(_tripleStore.getDataAccessLayerFactory()); }
@BeforeClass public static void beforeAllTests() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); CLASS_UNDER_TEST = new PersistentSet<String>(String.class, "SET_" + randomString()); CLASS_UNDER_TEST.initialise(_tripleStore.getDataAccessLayerFactory()); }
/** * Test if the triple store works with large iterators. * * @throws Exception If something bad happens... */ @Test public void testLargeTripleOperations() throws Exception { _tripleStore = newTripleStore(); _tripleStore.open(); try { Random random = new Random(452662401L); List<Statement> statements = randomStatements(random, (int) (1000 * 3.1415)); InputStream statementStream = statementIteratorToRdfStream(statements.iterator(), RDFFormat.NTRIPLES); _tripleStore.bulkLoad(statementStream, RDFFormat.NTRIPLES); assertEquals("Store contains different amount of triples than inserted!", statements.size(), numOfRes(_tripleStore.query(SELECT_ALL_TRIPLES_PATTERN))); _tripleStore.removeData(_tripleStore.query(SELECT_ALL_QUADS_PATTERN)); assertEquals( "Store should be empty after deleting everything!", 0, numOfRes(_tripleStore.query(SELECT_ALL_QUADS_PATTERN))); } finally { _tripleStore.close(); } } }
/** * Test if the quad store works with large iterators. * * @throws Exception If something bad happens... */ @Test public void testLargeQuadOperations() throws Exception { _quadStore = newQuadStore(); _quadStore.open(); try { Random random = new Random(4986723946726L); List<Statement> statements = randomStatements(random, (int) (1000 * 3.1415)); InputStream statementStream = statementIteratorToRdfStream(statements.iterator(), RDFFormat.NQUADS); _quadStore.bulkLoad(statementStream, RDFFormat.NQUADS); assertEquals( "Store contains different amount of quads than inserted!", statements.size(), numOfRes(_quadStore.query(SELECT_ALL_QUADS_PATTERN))); _quadStore.removeData(_quadStore.query(SELECT_ALL_QUADS_PATTERN)); assertEquals( "Store should be empty after deleting everything!", 0, numOfRes(_quadStore.query(SELECT_ALL_QUADS_PATTERN))); } finally { _quadStore.close(); } }
/** * Setup fixture for this test case. * * @throws Exception never, otherwise the test fails. */ @BeforeClass public static void setUp() throws Exception { _repository = new SailRepository(new MemoryStore()); _repository.initialize(); _tripleStore = newTripleStore(); _tripleStore.enableRangeIndexesSupport(); _tripleStore.open(); assertTrue("Ranges have not been enabled for this triple store!", _tripleStore.isRangeIndexesSupportEnabled()); _tripleStore.bulkLoad(DATA, RDFFormat.NTRIPLES); _repositoryConnection = _repository.getConnection(); _repositoryConnection.add(new File(DATA), "http://nb-base-uri-not-actually-used", RDFFormat.NTRIPLES); }