use of org.molgenis.beacon.controller.model.exceptions.UnknownBeaconException in project molgenis by molgenis.
the class BeaconQueryServiceImpl method searchBeaconForQueryString.
private boolean searchBeaconForQueryString(String referenceName, Long start, String referenceBases, String alternateBases, String beaconId) {
boolean exists = false;
Beacon beacon = dataService.findOneById(BeaconMetadata.BEACON, beaconId, Beacon.class);
if (beacon != null) {
for (BeaconDataset beaconDataset : beacon.getDataSets()) {
exists = queryBeaconDataset(beaconDataset, referenceName, start, referenceBases, alternateBases);
}
} else {
throw new UnknownBeaconException(beaconId, BeaconAlleleRequest.create(referenceName, start, referenceBases, alternateBases));
}
return exists;
}
Aggregations