* @return hashmap of identifiers.org data, keyed by MIRIAM id
*/
@SuppressWarnings("unchecked")
-private HashMap<String, UrlLink> readIdentifiers(String idFileName)
+ private HashMap<String, UrlLink> readIdentifiers(String idFileName)
{
// identifiers.org data
HashMap<String, UrlLink> idData = new HashMap<>();
String errorMessage = null;
try
{
- // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER
-
+ // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER
+
FileReader reader = new FileReader(idFileName);
String key = "";
- Map<String, Object> obj = (Map<String, Object>) JSONUtils.parse(reader);
+ Map<String, Object> obj = (Map<String, Object>) JSONUtils
+ .parse(reader);
if (obj.containsKey(ID_ORG_KEY))
{
key = ID_ORG_KEY;
}
else
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"Unexpected key returned from identifiers jalview service");
return idData;
}
} catch (IOException | ParseException e)
{
// unnecessary e.printStackTrace();
- // Note how in JavaScript we can grab the first bytes from any file reader.
+ // Note how in JavaScript we can grab the first bytes from any file
+ // reader.
// Typical report here is "NetworkError" because the file does not exist.
- // "https://." is coming from System.getProperty("user.home"), but this could
+ // "https://." is coming from System.getProperty("user.home"), but this
+ // could
// be set by the page developer to anything, of course.
errorMessage = e.toString();
idData.clear();
// BH 2018 -- added more valuable report
if (errorMessage != null)
{
- System.err.println("IdentifiersUrlProvider: cannot read " + idFileName + ": " + errorMessage);
+ jalview.bin.Console.errPrintln("IdentifiersUrlProvider: cannot read "
+ + idFileName + ": " + errorMessage);
}
return idData;
}