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

V2 api numeric inconsistencies #716

Merged
merged 26 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f62016c
Added fields HAS_DIRECT_PARENTS, HAS_DIRECT_CHILDREN, HAS_HIERARCHICA…
henrietteharmse Aug 5, 2024
e85b44f
Imported field is now boolean and uses defined fields.
henrietteharmse Aug 5, 2024
c7fb630
isDefiningOntology uses defined fields.
henrietteharmse Aug 5, 2024
ddacd9e
Fixed spelling of IS_DEFINING_ONTOLOGY and used it in LinkerPass2.
henrietteharmse Aug 5, 2024
e4a691a
hasDirectChildren field is now boolean and uses defined fields.
henrietteharmse Aug 5, 2024
d48ce18
Merge remote-tracking branch 'origin/dev' into v2-api-inconsistencies
henrietteharmse Aug 5, 2024
4c8ac4d
Changed hasDirectParent to hasDirectParents to match with hasDirectCh…
henrietteharmse Aug 6, 2024
8d84434
Missed HierarchyFlagsAnnotator in previous commit.
henrietteharmse Aug 6, 2024
a747fe3
Changed hasHierarchicalParent to hasHierarchicalParents. hasHierarchi…
henrietteharmse Aug 6, 2024
eefda1a
Renamed enpoint /ontologies/{onto}/classes/{class}/instances to /onto…
henrietteharmse Aug 6, 2024
b51dec0
Ordered DefinedFields and made isPreferredRoots boolean.
henrietteharmse Aug 6, 2024
5f2b46b
HAS_LOCAL_DEFINITION uses DefinedFields
henrietteharmse Aug 6, 2024
fd5e02a
HAS_INDIVIDUAL is now boolean and uses DefinedFields
henrietteharmse Aug 6, 2024
0e72a92
Unit test output updated
henrietteharmse Aug 7, 2024
0c9022f
API test output updated and API testing documentation error corrected.
henrietteharmse Aug 7, 2024
a1d820f
hasHierarchicalChildren needs to test against boolean on frontend.
henrietteharmse Aug 7, 2024
4c7b5f8
Fixed hasDirectParent issue.
henrietteharmse Aug 8, 2024
3d80923
Merge v2-api-inconsistencies
henrietteharmse Aug 8, 2024
4fd061b
Changed numDirectDescendants to numDescendants. NumDescendants and Nu…
henrietteharmse Aug 8, 2024
30bf4fe
numAppearsIn is now integer instead of string.
henrietteharmse Aug 8, 2024
386d6f3
Missed hasHierarchicalParents.
henrietteharmse Aug 8, 2024
5741625
Improved logging of JSON2RDF to printout ontologyId when writing of o…
henrietteharmse Aug 9, 2024
b5dfa14
Missed SynonymAnnotator in prev commit.
henrietteharmse Aug 9, 2024
80ae2f3
Catch all exceptions, not only IOExceptions.
henrietteharmse Aug 9, 2024
cb90669
More error handling workaround for gsso failing.
henrietteharmse Aug 9, 2024
e464a12
hasChildren value is determined based on children, not parents!
henrietteharmse Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ differences, this file will end with these lines:
the old `testcases_expected_output_api` and replace with new expected output:

rm -rf testcases_expected_output_api
cp -r testcases_output testcases_expected_output_api
cp -r testcases_output_api testcases_expected_output_api

11. Add the latest expected outputs to Git:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

import org.springframework.web.bind.annotation.RestController;
import uk.ac.ebi.spot.ols.repository.Validation;
import uk.ac.ebi.spot.ols.repository.neo4j.OlsNeo4jClient;
import uk.ac.ebi.spot.ols.repository.solr.OlsSolrClient;
import uk.ac.ebi.spot.ols.repository.transforms.LocalizationTransform;
import uk.ac.ebi.spot.ols.repository.transforms.RemoveLiteralDatatypesTransform;
Expand Down Expand Up @@ -92,8 +91,10 @@ public void search(
String[] fields = {"label_s", "synonym_s", "short_form_s", "obo_id_s", "iri_s", "annotations_trimmed"};
solrQuery.setQuery(
"((" +
createUnionQuery(query.toLowerCase(), SolrFieldMapper.mapFieldsList(List.of(fields)).toArray(new String[0]), true)
+ ") AND (isDefiningOntology:\"true\"^100 OR isDefiningOntology:false^0))"
createUnionQuery(query.toLowerCase(), SolrFieldMapper.mapFieldsList(List.of(fields))
.toArray(new String[0]), true)
+ ") AND ("+ IS_DEFINING_ONTOLOGY.getText() + ":\"true\"^100 OR " +
IS_DEFINING_ONTOLOGY.getText() + ":false^0))"
);

} else {
Expand All @@ -106,13 +107,14 @@ public void search(
solrQuery.set("qf", String.join(" ", SolrFieldMapper.mapFieldsList(List.of(fields))));

solrQuery.set("bq",
"isDefiningOntology:\"true\"^100 " +
IS_DEFINING_ONTOLOGY.getText() + ":\"true\"^100 " +
"lowercase_label:\"" + query.toLowerCase() + "\"^5 " +
"lowercase_synonym:\"" + query.toLowerCase() + "\"^3");
}
} else {
if (exact) {
String[] fields = SolrFieldMapper.mapFieldsList(queryFields.stream().map(queryField -> queryField + "_s").collect(Collectors.toList())).toArray(new String[0]);
String[] fields = SolrFieldMapper.mapFieldsList(queryFields.stream().map(queryField -> queryField + "_s")
.collect(Collectors.toList())).toArray(new String[0]);
solrQuery.setQuery(createUnionQuery(query.toLowerCase(), fields, true));
} else {

Expand Down Expand Up @@ -140,7 +142,7 @@ public void search(
}

if (isLocal) {
solrQuery.addFilterQuery("imported:false");
solrQuery.addFilterQuery(IMPORTED.getText() + ":false");
}

if (isLeaf) {
Expand Down Expand Up @@ -207,7 +209,7 @@ public void search(
"ontologyIri",
"ontologyPreferredPrefix",
"type",
"isDefiningOntology",
IS_DEFINING_ONTOLOGY.getText(),
IS_OBSOLETE.getText());
/*
* Fix: End
Expand Down Expand Up @@ -259,8 +261,9 @@ public void search(
if (fieldList.contains("description")) outDoc.put("description", JsonHelper.getStrings(json, "definition"));
if (fieldList.contains("short_form")) outDoc.put("short_form", JsonHelper.getString(json, "shortForm"));
if (fieldList.contains("obo_id")) outDoc.put("obo_id", JsonHelper.getString(json, "curie"));
if (fieldList.contains("is_defining_ontology")) outDoc.put("is_defining_ontology",
JsonHelper.getString(json, "isDefiningOntology") != null && JsonHelper.getString(json, "isDefiningOntology").equals("true"));
if (fieldList.contains(IS_DEFINING_ONTOLOGY.getOls3Text())) outDoc.put(IS_DEFINING_ONTOLOGY.getOls3Text(),
JsonHelper.getString(json, IS_DEFINING_ONTOLOGY.getText()) != null &&
JsonHelper.getString(json, IS_DEFINING_ONTOLOGY.getText()).equals("true"));
if (fieldList.contains("type")) {
outDoc.put("type", JsonHelper.getType(json, "type"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import uk.ac.ebi.spot.ols.repository.Validation;
import uk.ac.ebi.spot.ols.repository.neo4j.OlsNeo4jClient;
import uk.ac.ebi.spot.ols.repository.solr.OlsSolrClient;
import uk.ac.ebi.spot.ols.repository.transforms.LocalizationTransform;
import uk.ac.ebi.spot.ols.repository.transforms.RemoveLiteralDatatypesTransform;
Expand Down Expand Up @@ -72,7 +71,9 @@ public void select(
solrQuery.setQuery(query);
solrQuery.set("defType", "edismax");
solrQuery.set("qf", "label whitespace_edge_label synonym whitespace_edge_synonym shortForm whitespace_edge_shortForm curie iri");
solrQuery.set("bq", "type:ontology^10.0 isDefiningOntology:true^100.0 str_label:\"" + queryLc + "\"^1000 edge_label:\"" + queryLc + "\"^500 str_synonym:\"" + queryLc + "\" edge_synonym:\"" + queryLc + "\"^100");
solrQuery.set("bq", "type:ontology^10.0 " +
IS_DEFINING_ONTOLOGY.getText() +":true^100.0 str_label:\"" + queryLc + "\"^1000 edge_label:\"" +
queryLc + "\"^500 str_synonym:\"" + queryLc + "\" edge_synonym:\"" + queryLc + "\"^100");
solrQuery.set("wt", "json");

solrQuery.setFields("_json", "id");
Expand All @@ -94,7 +95,7 @@ public void select(
}

if (isLocal) {
solrQuery.addFilterQuery("isDefiningOntology:true");
solrQuery.addFilterQuery(IS_DEFINING_ONTOLOGY.getText() + ":true");
}

if (childrenOf != null) {
Expand Down Expand Up @@ -163,8 +164,9 @@ public void select(
if (fieldList.contains("description")) outDoc.put("description", JsonHelper.getStrings(json, "definition"));
if (fieldList.contains("short_form")) outDoc.put("short_form", JsonHelper.getString(json, "shortForm"));
if (fieldList.contains("obo_id")) outDoc.put("obo_id", JsonHelper.getString(json, "curie"));
if (fieldList.contains("is_defining_ontology")) outDoc.put("is_defining_ontology",
JsonHelper.getString(json, "isDefiningOntology") != null && JsonHelper.getString(json, "isDefiningOntology").equals("true"));
if (fieldList.contains(IS_DEFINING_ONTOLOGY.getOls3Text())) outDoc.put(IS_DEFINING_ONTOLOGY.getOls3Text(),
JsonHelper.getString(json, IS_DEFINING_ONTOLOGY.getText()) != null &&
JsonHelper.getString(json, IS_DEFINING_ONTOLOGY.getText()).equals("true"));
if (fieldList.contains("type")) {
outDoc.put("type", JsonHelper.getType(json, "type"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ public HttpEntity<V2Entity> getIndividual(
}


// The instances of classes are individuals. So, the /instances endpoint is part of the Class controller.
//
@RequestMapping(path = "/ontologies/{onto}/classes/{class}/instances", produces = {MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.GET)
public HttpEntity<V2PagedResponse<V2Entity>> getClassInstances(
@RequestMapping(path = "/ontologies/{onto}/classes/{class}/individuals", produces = {MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.GET)
public HttpEntity<V2PagedResponse<V2Entity>> getClassIndividuals(
@PageableDefault(size = 20, page = 0) Pageable pageable,
@PathVariable("onto") String ontologyId,
@PathVariable("class") String classIri,
Expand All @@ -115,7 +113,7 @@ public HttpEntity<V2PagedResponse<V2Entity>> getClassInstances(

return new ResponseEntity<>(
new V2PagedResponse<>(
individualRepository.getInstancesOfClass(ontologyId, classIri, pageable, lang)
individualRepository.getIndividualsOfClass(ontologyId, classIri, pageable, lang)
),
HttpStatus.OK);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public static String getString(JsonObject json, String key) {
return objectToString(json.get(key));
}

public static boolean getBoolean(JsonObject json, String key) {
return json.getAsJsonPrimitive(key).getAsBoolean();
}

public static String objectToString(JsonElement value) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.stream.Collectors;
import static uk.ac.ebi.ols.shared.DefinedFields.*;

public class V1AncestorsJsTreeBuilder {

Expand Down Expand Up @@ -90,8 +91,8 @@ private void createJsTreeEntries(List<Map<String,Object>> jstree, JsonObject ent
boolean opened = (!selected);


boolean hasDirectChildren = Objects.equals(JsonHelper.getString(entity, "hasDirectChildren"), "true");
boolean hasHierarchicalChildren = Objects.equals(JsonHelper.getString(entity, "hasHierarchicalChildren"), "true");
boolean hasDirectChildren = Objects.equals(JsonHelper.getString(entity, HAS_DIRECT_CHILDREN.getText()), "true");
boolean hasHierarchicalChildren = Objects.equals(JsonHelper.getString(entity, HAS_DIRECT_CHILDREN.getText()), "true");

// only nodes that aren't already opened are marked as having children, (iff they actually have children!)
boolean children = (!opened) && (hasDirectChildren || hasHierarchicalChildren);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.nio.charset.StandardCharsets;
import java.util.*;
import static uk.ac.ebi.ols.shared.DefinedFields.*;

public class V1ChildrenJsTreeBuilder {

Expand Down Expand Up @@ -34,7 +35,7 @@ List<Map<String,Object>> buildJsTree() {
jstreeEntry.put("text", JsonHelper.getString(child.getAsJsonObject(), "label"));
jstreeEntry.put("state", Map.of("opened", false));
jstreeEntry.put("children",
JsonHelper.getString(child.getAsJsonObject(), "hasDirectChildren").equals("true")
JsonHelper.getString(child.getAsJsonObject(), HAS_DIRECT_CHILDREN.getText()).equals("true")
|| JsonHelper.getString(child.getAsJsonObject(), "hasHierarchicalChildren").equals("true")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import uk.ac.ebi.spot.ols.repository.solr.OlsFacetedResultsPage;
import uk.ac.ebi.spot.ols.repository.v1.mappers.V1IndividualMapper;
import uk.ac.ebi.spot.ols.repository.v1.mappers.V1TermMapper;
import static uk.ac.ebi.ols.shared.DefinedFields.*;

//@RepositoryRestResource(collectionResourceRel = "individuals", exported = false)
@Component
Expand Down Expand Up @@ -116,7 +117,7 @@ public OlsFacetedResultsPage<V1Individual> findAllByIsDefiningOntology(String la

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("individual"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

OlsFacetedResultsPage<JsonElement> entities = solrClient.searchSolrPaginated(query, pageable);

Expand Down Expand Up @@ -145,7 +146,7 @@ public OlsFacetedResultsPage<V1Individual> findAllByIriAndIsDefiningOntology(Str

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("individual"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("iri", List.of(iri), SearchType.WHOLE_FIELD);

OlsFacetedResultsPage<JsonElement> entities = solrClient.searchSolrPaginated(query, pageable);
Expand Down Expand Up @@ -176,7 +177,7 @@ public OlsFacetedResultsPage<V1Individual> findAllByShortFormAndIsDefiningOntolo

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("individual"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("shortForm", List.of(shortForm), SearchType.WHOLE_FIELD);

OlsFacetedResultsPage<JsonElement> entities = solrClient.searchSolrPaginated(query, pageable);
Expand Down Expand Up @@ -204,7 +205,7 @@ public OlsFacetedResultsPage<V1Individual> findAllByOboIdAndIsDefiningOntology(S

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("individual"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("oboId", List.of(oboId), SearchType.WHOLE_FIELD);

OlsFacetedResultsPage<JsonElement> entities = solrClient.searchSolrPaginated(query, pageable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public Page<V1Property> getRoots(String ontologyId, boolean obsolete, String lan
OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("property"), SearchType.WHOLE_FIELD);
query.addFilter("ontologyId", List.of(ontologyId), SearchType.WHOLE_FIELD);
query.addFilter("hasDirectParent", List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter("hasHierarchicalParent", List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter(HAS_DIRECT_PARENTS.getText(), List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter(HAS_HIERARCHICAL_PARENTS.getText(), List.of("false"), SearchType.WHOLE_FIELD);

if(!obsolete)
query.addFilter(IS_OBSOLETE.getText(), List.of("false"), SearchType.WHOLE_FIELD);
Expand All @@ -119,7 +119,7 @@ public Page<V1Property> findAllByIsDefiningOntology(String lang, Pageable pageab

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("property"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
.map(result -> V1PropertyMapper.mapProperty(result, lang));
Expand All @@ -141,7 +141,7 @@ public Page<V1Property> findAllByIriAndIsDefiningOntology(String iri, String lan
OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("property"), SearchType.WHOLE_FIELD);
query.addFilter("iri", List.of(iri), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
.map(result -> V1PropertyMapper.mapProperty(result, lang));
Expand All @@ -163,7 +163,7 @@ public Page<V1Property> findAllByShortFormAndIsDefiningOntology(String shortForm
OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("property"), SearchType.WHOLE_FIELD);
query.addFilter("shortForm", List.of(shortForm), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
.map(result -> V1PropertyMapper.mapProperty(result, lang));
Expand All @@ -186,7 +186,7 @@ public Page<V1Property> findAllByOboIdAndIsDefiningOntology(String oboId, String
OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("property"), SearchType.WHOLE_FIELD);
query.addFilter("oboId", List.of(oboId), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
.map(result -> V1PropertyMapper.mapProperty(result, lang));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public Page<V1Term> getRoots(String ontologyId, boolean obsolete, String lang, P
OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("class"), SearchType.WHOLE_FIELD);
query.addFilter("ontologyId", List.of(ontologyId), SearchType.WHOLE_FIELD);
query.addFilter("hasDirectParent", List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter("hasHierarchicalParent", List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter(HAS_DIRECT_PARENTS.getText(), List.of("false"), SearchType.WHOLE_FIELD);
query.addFilter(HAS_HIERARCHICAL_PARENTS.getText(), List.of("false"), SearchType.WHOLE_FIELD);

if (!obsolete)
query.addFilter(IS_OBSOLETE.getText(), List.of("false"), SearchType.WHOLE_FIELD);
Expand Down Expand Up @@ -215,7 +215,7 @@ public Page<V1Term> findAllByIsDefiningOntology(String lang, Pageable pageable)

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("class"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
.map(result -> V1TermMapper.mapTerm(result, lang));
Expand All @@ -236,7 +236,7 @@ public Page<V1Term> findAllByIriAndIsDefiningOntology(String iri, String lang, P

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("class"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("iri", List.of(iri), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
Expand All @@ -257,7 +257,7 @@ public Page<V1Term> findAllByShortFormAndIsDefiningOntology(String shortForm, St

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("class"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("shortForm", List.of(shortForm), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
Expand All @@ -279,7 +279,7 @@ public Page<V1Term> findAllByOboIdAndIsDefiningOntology(String oboId, String lan

OlsSolrQuery query = new OlsSolrQuery();
query.addFilter("type", List.of("class"), SearchType.WHOLE_FIELD);
query.addFilter("isDefiningOntology", List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter(IS_DEFINING_ONTOLOGY.getText(), List.of("true"), SearchType.WHOLE_FIELD);
query.addFilter("curie", List.of(oboId), SearchType.WHOLE_FIELD);

return solrClient.searchSolrPaginated(query, pageable)
Expand Down
Loading
Loading