public static void main(String[] args) throws IOException, Exception { if (args.length < 4) { System.out.println("Batch uploader takes 4 parameters in order: server base url, file/folder to upload, xml/json, and batch size"); } else { String server = args[0]; String file = args[1]; IParser p = new JsonParser(); // args[2].equals("json") ? new JsonParser() : new XmlParser(); int size = Integer.parseInt(args[3]); size = 500; if (file.endsWith(".xml")) { throw new FHIRException("Unimplemented file type "+file); } else if (file.endsWith(".json")) { throw new FHIRException("Unimplemented file type "+file); } else if (file.endsWith(".zip")) { LoadZipFile(server, file, p, size, 0, -1); } else if (new File(file).isDirectory()) { LoadDirectory(server, file, p, size); } else throw new FHIRException("Unknown file type "+file); } }
public static void main(String[] args) throws IOException, Exception { if (args.length < 4) { System.out.println("Batch uploader takes 4 parameters in order: server base url, file/folder to upload, xml/json, and batch size"); } else { String server = args[0]; String file = args[1]; IParser p = new JsonParser(); // args[2].equals("json") ? new JsonParser() : new XmlParser(); int size = Integer.parseInt(args[3]); size = 500; if (file.endsWith(".xml")) { throw new FHIRException("Unimplemented file type "+file); } else if (file.endsWith(".json")) { throw new FHIRException("Unimplemented file type "+file); } else if (file.endsWith(".zip")) { LoadZipFile(server, file, p, size, 0, -1); } else if (new File(file).isDirectory()) { LoadDirectory(server, file, p, size); } else throw new FHIRException("Unknown file type "+file); } }