Skip to content
Snippets Groups Projects
Commit 5df69b77 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

chemicals allow to search by synonym

parent b8dc95d6
No related branches found
No related tags found
1 merge request!156Resolve "search by chemical names"
......@@ -181,6 +181,8 @@ public class ChemicalService extends DbSearchService implements IChemicalService
List<MiriamData> chemicalId = new ArrayList<>();
chemicalId.add(id);
result = chemicalParser.getChemicals(searchCriteria.getDisease(), chemicalId);
} else {
result = chemicalParser.getChemicalsBySynonym(searchCriteria.getDisease(), name);
}
} catch (ChemicalSearchException e) {
logger.error("Problem with accesing database", e);
......@@ -188,8 +190,6 @@ public class ChemicalService extends DbSearchService implements IChemicalService
if (result.size() == 0) {
return null;
} else {
// return chemicalViewFactory.create(result.get(0),
// searchCriteria.getModel(), searchCriteria.getColorSet());
return result.get(0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment