File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,10 @@ You may use the following parameters when calling the program:
2929
3030Example call:
3131```
32- java -jar XXX.jar -osm 5cc58071facf70001a872bef -measurements
33- -timerange 2019-05-01T00:00:00.000Z 2019-05-15T00:00:00.000Z -path /rdf.out
32+ java -jar XXX.jar -osm 5cc58071facf70001a872bef
33+ -measurements
34+ -timerange 2019-05-01T00:00:00.000Z 2019-05-15T00:00:00.000Z
35+ -path file.out
3436```
3537
3638### Tests
Original file line number Diff line number Diff line change 11import org .apache .commons .cli .CommandLine ;
2+ import org .apache .commons .cli .MissingOptionException ;
23import org .apache .commons .cli .ParseException ;
34
45import osm .util .OpenSenseMapHandler ;
910public class Main {
1011 public static void main (String [] args ) throws ParseException , IOException {
1112
12- CommandLine config = new Config ().parseArgs (args );
13+ try {
14+ CommandLine config = new Config ().parseArgs (args );
1315
14- if (config .hasOption ("osm" )) {
15- new OpenSenseMapHandler ().handleConfig (config );
16+ if (config .hasOption ("osm" )) {
17+ new OpenSenseMapHandler ().handleConfig (config );
18+ } else {
19+ System .out .println ("No data source specified." );
20+ System .out .println ("Please refer to the README." );
21+ }
22+ } catch (MissingOptionException e ) {
23+ System .out .println ("You are missing the following options: " + e .getMissingOptions ());
24+ System .out .println ("Please refer to the README." );
1625 }
1726 }
1827}
You can’t perform that action at this time.
0 commit comments