49505152535455565758
while ( iter.hasNext() ) { Quad quad = iter.next(); System.out.println(quad); } } finally { dataset.end(); } } }
4849505152535455565758
dataset.commit(); } catch ( Exception e ) { e.printStackTrace(System.err); dataset.abort(); } finally { dataset.end(); } RiotWriter.writeNQuads(System.out, dataset.asDatasetGraph()); } }
5455565758596061626364
dataset.commit(); } catch ( Exception e ) { e.printStackTrace(System.err); if ( dataset.isInTransaction() ) dataset.abort(); } finally { dataset.end(); } assertEquals ( 1, dataset.getDefaultModel().size() ); } }
6970717273747576777879
dataset.commit(); } catch ( Exception e ) { e.printStackTrace(System.err); if ( dataset.isInTransaction() ) dataset.abort(); } finally { dataset.end(); } assertEquals ( 1, dataset.getDefaultModel().size() ); } @Test public void test_04() {
90919293949596979899100
dataset.commit(); } catch ( Exception e ) { e.printStackTrace(System.err); if ( dataset.isInTransaction() ) dataset.abort(); } finally { dataset.end(); } assertEquals ( 1, dataset.getDefaultModel().size() ); } @Test public void test_06() {
36373839404142434445
try { Model model = dataset.getDefaultModel(); model.add ( ResourceFactory.createResource(), RDFS.label, value, "en-gb" ); dataset.commit(); } finally { dataset.end(); } } }
4142434445464748495051
@Test public void transaction_01() { Dataset ds = create() ; ds.begin(ReadWrite.READ) ; assertTrue(ds.isInTransaction()) ; ds.end() ; assertFalse(ds.isInTransaction()) ; } @Test public void transaction_02() {
7071727374757677787980
Dataset ds = create() ; ds.begin(ReadWrite.WRITE) ; assertTrue(ds.isInTransaction()) ; ds.commit() ; assertFalse(ds.isInTransaction()) ; ds.end() ; assertFalse(ds.isInTransaction()) ; } @Test public void transaction_05() {
8182838485868788899091
Dataset ds = create() ; ds.begin(ReadWrite.WRITE) ; assertTrue(ds.isInTransaction()) ; ds.abort() ; assertFalse(ds.isInTransaction()) ; ds.end() ; assertFalse(ds.isInTransaction()) ; } @Test public void transaction_06() {
205206207208209210211212213214215
ds.begin(mode1) ; try { ds.begin(mode2) ; fail("Expected transaction exception - begin-begin ("+mode1+", "+mode2+")") ; } catch (JenaTransactionException ex) { ds.end() ; } } private void testCommitCommit(ReadWrite mode) { Dataset ds = create() ;