MCPcopy Create free account
hub / github.com/Fedict/dcattools / main

Method main

tools/src/main/java/be/gov/data/tools/HvDReporter.java:129–153  ·  view source on GitHub ↗

Main program @param args

(String[] args)

Source from the content-addressed store, hash-verified

127 * @param args
128 */
129 public static void main(String[] args) {
130 LOG.info("-- START --");
131 if (args.length < 2) {
132 LOG.error("No input or output file");
133 System.exit(-1);
134 }
135
136 DcatReader reader = null;
137 try {
138 reader = new DcatReader(Paths.get(args[0]));
139 } catch (IOException ioe) {
140 LOG.error("Could not read {}: {} ", args[0], ioe.getMessage());
141 System.exit(-2);
142 }
143
144 ICSVWriter writer = null;
145 try {
146 writer = new CSVWriterBuilder(Files.newBufferedWriter(Paths.get(args[1])))
147 .withSeparator(';').withQuoteChar('"').build();
148 createReport(reader, writer);
149 } catch (IOException ioe) {
150 LOG.error("Could not write to {} : {}", args[1], ioe.getMessage());
151 System.exit(-3);
152 }
153 }
154}

Callers

nothing calls this directly

Calls 2

createReportMethod · 0.95
exitMethod · 0.80

Tested by

no test coverage detected