public void cmdError(String msg, boolean exit) { System.err.println(msg) ; if ( exit ) throw new TerminationException(5) ; } }
public static void main (String... argv) { try { main2(argv) ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } catch (CmdException ex) { System.err.println(ex.getMessage()) ; if ( ex.getCause() != null ) ex.getCause().printStackTrace(System.err) ; } }
public void cmdError(String msg, boolean exit) { System.err.println(msg) ; if ( exit ) throw new TerminationException(5) ; } }
public static void main (String... argv) { try { main2(argv) ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } catch (CmdException ex) { System.err.println(ex.getMessage()) ; if ( ex.getCause() != null ) ex.getCause().printStackTrace(System.err) ; } }
@Override protected void exec() { try { runFuseki(cmdLineConfig, jettyServerConfig) ; } catch (FusekiException ex) { throw new TerminationException(1) ; } }
catch (TerminationException ex) { System.exit(ex.getCode()) ; } catch (IllegalArgumentException ex)
@Override protected void exec() { try { runFuseki(cmdLineConfig, jettyServerConfig) ; } catch (FusekiException ex) { throw new TerminationException(1) ; } }
catch (TerminationException ex) { System.exit(ex.getCode()) ; } catch (IllegalArgumentException ex)
final public void printHelp() { usage() ; throw new TerminationException(0) ; }
public static void main (String... argv) { try { new rdflangtest(argv).mainRun() ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } }
final public void printHelp() { usage() ; throw new TerminationException(0) ; }
public static void main (String... argv) { try { new qtest(argv).mainRun() ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } }
private void execGet(StoreConfig conf, String tag) { Model m = conf.getModel(tag) ; if ( m == null ) { System.out.println("No configuration model") ; throw new TerminationException(1) ; } m.write(System.out, format) ; }
public static void main (String... argv) { try { new qtest(argv).mainRun() ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } }
@Override public void processArgs(CmdArgModule cmdLine) { // Either a dataset or a store. if (! cmdLine.contains(argDeclSDBdesc)) { System.err.println("No store description"); throw new TerminationException(1); } filename = cmdLine.getValue(argDeclSDBdesc) ; }
public static void main (String... argv) { try { new rdflangtest(argv).mainRun() ; } catch (TerminationException ex) { System.exit(ex.getCode()) ; } }
private void execReset(StoreConfig conf, String name) { if ( ! confirm("Confirm reset") ) throw new TerminationException(0) ; conf.reset() ; }
private void execRemove(StoreConfig conf, String name) { if ( ! confirm("Confirm the removal of '"+name+"'") ) throw new TerminationException(0) ; conf.removeModel(name) ; }
/** Choose the dataset. * <li> use the data as described on the command line * <li> else use FROM/FROM NAMED if present (pass null to ARQ) * <li> else provided an empty dataset and hope the query has VALUES/BIND */ protected Dataset getDataset(Query query) { try { Dataset ds = modDataset.getDataset(); if ( ds == null ) ds = dealWithNoDataset(query); return ds; } catch (RiotNotFoundException ex) { System.err.println("Failed to load data: " + ex.getMessage()); throw new TerminationException(1); } catch (RiotException ex) { System.err.println("Failed to load data"); throw new TerminationException(1); } }
/** Choose the dataset. * <li> use the data as described on the command line * <li> else use FROM/FROM NAMED if present (pass null to ARQ) * <li> else provided an empty dataset and hope the query has VALUES/BIND */ protected Dataset getDataset(Query query) { try { Dataset ds = modDataset.getDataset(); if ( ds == null ) ds = dealWithNoDataset(query); return ds; } catch (RiotNotFoundException ex) { System.err.println("Failed to load data: " + ex.getMessage()); throw new TerminationException(1); } catch (RiotException ex) { System.err.println("Failed to load data"); throw new TerminationException(1); } }