From c0041fb07fb5022a9f5b7da04f82680ea4aeb7c4 Mon Sep 17 00:00:00 2001 From: Egon Willighagen Date: Mon, 4 May 2015 15:05:14 +0200 Subject: [PATCH] Added more detail on how to get DataSource's --- UPGRADE_NOTES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UPGRADE_NOTES.md b/UPGRADE_NOTES.md index adf683073..f6b3f5dab 100644 --- a/UPGRADE_NOTES.md +++ b/UPGRADE_NOTES.md @@ -19,3 +19,17 @@ Replace with DataSource ds = DataSource.getExistingBySystemCode("Ck"); + +Similarly, and more important: + + DataSource ds = DataSource.getByFullName("PubChem-compound"); + +with + + DataSource ds = DataSource.getExistingByFullName("PubChem-compound"); + +The latter two new methods throw an IllegalArgumentException if the DataSource does not exist. +Use one of the following two methods to check first: + + DataSource.systemCodeExists("Ck"); + DataSource.fullNameExists("PubChem-compound");