/** wrapped this way so JUnit not a compile-time requirement. */ protected static void runTests( boolean internetTest ) throws Exception { Class<?> rdfparse = Class.forName( "jena.test.rdfparse" ); Constructor<?> constructor = rdfparse.getConstructor( new Class[] {boolean.class} ); Command c = (Command) constructor.newInstance( new Object[] { internetTest } ); c.execute(); // ARPTests.internet = internetTest; // TestRunner.main( new String[] { "-noloading", ARPTests.class.getName()}); } }
/** wrapped this way so JUnit not a compile-time requirement. */ protected static void runTests( boolean internetTest ) throws Exception { Class<?> rdfparse = Class.forName( "jena.test.rdfparse" ); Constructor<?> constructor = rdfparse.getConstructor( new Class[] {boolean.class} ); Command c = (Command) constructor.newInstance( new Object[] { internetTest } ); c.execute(); // ARPTests.internet = internetTest; // TestRunner.main( new String[] { "-noloading", ARPTests.class.getName()}); } }
/** * Execute the command <code>c</code> within a transaction. If it completes normally, * commit the transaction and return the result. Otherwise abort the transaction. */ @Override public Object executeInTransaction(Command c) { return calculate( () -> c.execute() ) ; }
/** * Execute the command <code>c</code> within a transaction. If it completes normally, * commit the transaction and return the result. Otherwise abort the transaction. */ @Override public Object executeInTransaction(Command c) { return calculate( () -> c.execute() ) ; }
@Override public Object executeInTransaction(Command c) { try { begin(); c.execute(); commit(); } catch (Throwable e) { throw new JenaException(e); } // TODO determine what object to return here, currently the // command is executed for side effects rather than a result. return null; }