| 260 | | public boolean idExist(final String authority, final String species, |
| 261 | | final String domain, final String id) throws IDMapperException { |
| 262 | | String range = domain; // bug: client now complains that domain==range! |
| 263 | | Set<String> ids = new HashSet(1); |
| 264 | | ids.add(id); |
| 265 | | |
| 266 | | SynergizerClient.TranslateResult res; |
| 267 | | try { |
| 268 | | res = client.translate(authority, species, domain, range, ids); |
| 269 | | } catch (IOException e) { |
| 270 | | throw new IDMapperException(e); |
| 271 | | } catch (JSONException e) { |
| 272 | | throw new IDMapperException(e); |
| 273 | | } |
| 274 | | |
| 275 | | return res.foundSourceIDsWithFoundTargetIDs().contains(id) |
| 276 | | || res.foundSourceIDsWithUnfoundTargetIDs().contains(id); |
| 277 | | } |