@Test public void checkSnpIdentifierIsValid() throws Exception { }
public String checkSnpIdentifierIsValid(String snp, String eRelease) { String error = null; try { RestResponseResult snpDataApiResult = ensemblRestcallHistoryService.getEnsemblRestCallByTypeAndParamAndVersion( "snp", snp, eRelease); if (snpDataApiResult == null) { snpDataApiResult = ensemblRestTemplateService.getRestCall(getEndpoint(), snp, ""); ensemblRestcallHistoryService.create(snpDataApiResult, "snp", snp, eRelease); } if ((snpDataApiResult.hasErorr())) { error = "SNP identifier ".concat(snpDataApiResult.getError()); } else { if (snpDataApiResult.getRestResult().getObject().has("error")) { error = "SNP identifier ".concat(snp).concat(" is not valid"); } } } catch (Exception e) { error = "SNP identifier impossible to retrieve"; getLog().error("The SNP impossible to retrieve: : ".concat(snp), e); } return error; }
SnpCheckingRestService { public String checkSnpIdentifierIsValid(String snp, String eRelease) { String error = null; try { RestResponseResult snpDataApiResult = ensemblRestcallHistoryService.getEnsemblRestCallByTypeAndParamAndVersion( "snp", snp, eRelease); if (snpDataApiResult == null) { snpDataApiResult = ensemblRestTemplateService.getRestCall(getEndpoint(), snp, ""); ensemblRestcallHistoryService.create(snpDataApiResult, "snp", snp, eRelease); } if ((snpDataApiResult.hasErorr())) { error = "SNP identifier ".concat(snpDataApiResult.getError()); } else { if (snpDataApiResult.getRestResult().getObject().has("error")) { error = "SNP identifier ".concat(snp).concat(" is not valid"); } } } catch (Exception e) { error = "SNP identifier impossible to retrieve"; getLog().error("The SNP impossible to retrieve: : ".concat(snp), e); } return error; } }
SnpCheckingRestService { public String checkSnpIdentifierIsValid(String snp, String eRelease) { String error = null; try { RestResponseResult snpDataApiResult = ensemblRestcallHistoryService.getEnsemblRestCallByTypeAndParamAndVersion( "snp", snp, eRelease); if (snpDataApiResult == null) { snpDataApiResult = ensemblRestTemplateService.getRestCall(getEndpoint(), snp, ""); ensemblRestcallHistoryService.create(snpDataApiResult, "snp", snp, eRelease); } if ((snpDataApiResult.hasErorr())) { error = "SNP identifier ".concat(snpDataApiResult.getError()); } else { if (snpDataApiResult.getRestResult().getObject().has("error")) { error = "SNP identifier ".concat(snp).concat(" is not valid"); } } } catch (Exception e) { error = "SNP identifier impossible to retrieve"; getLog().error("The SNP impossible to retrieve: : ".concat(snp), e); } return error; } @Autowired  SnpCheckingRestService(EnsemblRestTemplateService ensemblRestTemplateService,
                                  EnsemblRestcallHistoryService ensemblRestcallHistoryService); }
SnpCheckingRestService { public String checkSnpIdentifierIsValid(String snp, String eRelease) { String error = null; try { RestResponseResult snpDataApiResult = ensemblRestcallHistoryService.getEnsemblRestCallByTypeAndParamAndVersion( "snp", snp, eRelease); if (snpDataApiResult == null) { snpDataApiResult = ensemblRestTemplateService.getRestCall(getEndpoint(), snp, ""); ensemblRestcallHistoryService.create(snpDataApiResult, "snp", snp, eRelease); } if ((snpDataApiResult.hasErorr())) { error = "SNP identifier ".concat(snpDataApiResult.getError()); } else { if (snpDataApiResult.getRestResult().getObject().has("error")) { error = "SNP identifier ".concat(snp).concat(" is not valid"); } } } catch (Exception e) { error = "SNP identifier impossible to retrieve"; getLog().error("The SNP impossible to retrieve: : ".concat(snp), e); } return error; } @Autowired  SnpCheckingRestService(EnsemblRestTemplateService ensemblRestTemplateService,
                                  EnsemblRestcallHistoryService ensemblRestcallHistoryService); String checkSnpIdentifierIsValid(String snp, String eRelease); Set<String> getSnpLocations(String snp, String eRelease); String getEndpoint(); void setEndpoint(String endpoint); }
SnpCheckingRestService { public String checkSnpIdentifierIsValid(String snp, String eRelease) { String error = null; try { RestResponseResult snpDataApiResult = ensemblRestcallHistoryService.getEnsemblRestCallByTypeAndParamAndVersion( "snp", snp, eRelease); if (snpDataApiResult == null) { snpDataApiResult = ensemblRestTemplateService.getRestCall(getEndpoint(), snp, ""); ensemblRestcallHistoryService.create(snpDataApiResult, "snp", snp, eRelease); } if ((snpDataApiResult.hasErorr())) { error = "SNP identifier ".concat(snpDataApiResult.getError()); } else { if (snpDataApiResult.getRestResult().getObject().has("error")) { error = "SNP identifier ".concat(snp).concat(" is not valid"); } } } catch (Exception e) { error = "SNP identifier impossible to retrieve"; getLog().error("The SNP impossible to retrieve: : ".concat(snp), e); } return error; } @Autowired  SnpCheckingRestService(EnsemblRestTemplateService ensemblRestTemplateService,
                                  EnsemblRestcallHistoryService ensemblRestcallHistoryService); String checkSnpIdentifierIsValid(String snp, String eRelease); Set<String> getSnpLocations(String snp, String eRelease); String getEndpoint(); void setEndpoint(String endpoint);  }