- String identifiersorgUrl = "http://identifiers.org/rest/collections/";
- String outfile = "identifiers.json";
- int BUFFER_SIZE = 4096;
-
- URL url = new URL(identifiersorgUrl);
- InputStream is = new BufferedInputStream(url.openStream());
- FileOutputStream os = new FileOutputStream(outfile);
- byte[] buffer = new byte[BUFFER_SIZE];
- int bytesRead = -1;
- while ((bytesRead = is.read(buffer)) != -1)
- {
- os.write(buffer, 0, bytesRead);
- }
- os.close();
- is.close();
-
- return new File(outfile);
- }
-
- private HashMap<String, HashMap<String, String>> readIdentifiers(
- FileReader reader)
- {
- JSONParser parser = new JSONParser();
- HashMap<String, HashMap<String, String>> idData = new HashMap<String, HashMap<String, String>>();
+ // identifiers.org data
+ HashMap<String, UrlLink> idData = new HashMap<>();