Skip to content

Commit

Permalink
Merge pull request #686 from opencb/TASK-5571
Browse files Browse the repository at this point in the history
TASK-5571 Autocomplete with ontologies not working for CMH
  • Loading branch information
jtarraga authored Feb 5, 2024
2 parents 01d147a + ed83935 commit 988e4a7
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.bson.Document;
import org.bson.conversions.Bson;
import org.opencb.biodata.models.core.OntologyTerm;
import org.opencb.cellbase.core.ParamConstants;
import org.opencb.cellbase.core.api.OntologyQuery;
import org.opencb.cellbase.core.api.query.ProjectionQueryOptions;
import org.opencb.cellbase.core.exception.CellBaseException;
Expand Down Expand Up @@ -114,9 +115,15 @@ public Bson parseQuery(OntologyQuery query) {
try {
for (Map.Entry<String, Object> entry : query.toObjectMap().entrySet()) {
String dotNotationName = entry.getKey();
if (!"dataRelease".equals(dotNotationName)) {
Object value = entry.getValue();
createAndOrQuery(value, dotNotationName, QueryParam.Type.STRING, andBsonList);
switch (dotNotationName) {
case ParamConstants.DATA_RELEASE_PARAM:
case ParamConstants.API_KEY_PARAM:
// Nothing to do
break;
default: {
Object value = entry.getValue();
createAndOrQuery(value, dotNotationName, QueryParam.Type.STRING, andBsonList);
}
}
}
} catch (IllegalAccessException e) {
Expand Down

0 comments on commit 988e4a7

Please sign in to comment.