Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-5571 Autocomplete with ontologies not working for CMH #686

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading