Skip to content

Commit

Permalink
Added more detail on how to get DataSource's
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Sep 4, 2015
1 parent 10818dc commit c0041fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions UPGRADE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit c0041fb

Please sign in to comment.