Skip to content

Commit

Permalink
lib: use ParamConstants to the parameters name (dataRelease and apiKe…
Browse files Browse the repository at this point in the history
…y) and remove System.out, #TASK-5571
  • Loading branch information
jtarraga committed Feb 2, 2024
1 parent 0218f40 commit ed83935
Showing 1 changed file with 3 additions and 4 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 @@ -64,8 +65,6 @@ public CellBaseIterator<OntologyTerm> iterator(OntologyQuery query) throws CellB
QueryOptions queryOptions = query.toQueryOptions();

MongoDBCollection mongoDBCollection = getCollectionByRelease(mongoDBCollectionByRelease, query.getDataRelease());
System.out.println("ontology mongodb adaptor: mongoDBCollection = " + mongoDBCollection.toString() + ", data release = "
+ query.getDataRelease());
MongoDBIterator<OntologyTerm> iterator = mongoDBCollection.iterator(null, bson, projection, CONVERTER, queryOptions);
return new CellBaseMongoDBIterator<>(iterator);
}
Expand Down Expand Up @@ -117,8 +116,8 @@ public Bson parseQuery(OntologyQuery query) {
for (Map.Entry<String, Object> entry : query.toObjectMap().entrySet()) {
String dotNotationName = entry.getKey();
switch (dotNotationName) {
case "dataRelease":
case "apiKey":
case ParamConstants.DATA_RELEASE_PARAM:
case ParamConstants.API_KEY_PARAM:
// Nothing to do
break;
default: {
Expand Down

0 comments on commit ed83935

Please sign in to comment.