Skip to content

Commit

Permalink
ontology filters are converted to default COMPOSITE in v2 statistics …
Browse files Browse the repository at this point in the history
…for #91
  • Loading branch information
giraygi committed Nov 15, 2024
1 parent 055c2d1 commit a8bd1ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public HttpEntity<V2Statistics> getStatistics(
@Parameter(description = "Use License option to filter based on license.label, license.logo and license.url variables. " +
"Use Composite Option to filter based on the objects (i.e. collection, subject) within the classifications variable. " +
"Use Linear option to filter based on String and Collection<String> based variables.")
@RequestParam(value = "option", required = false, defaultValue = "LINEAR") FilterOption filterOption,
@RequestParam(value = "option", required = false, defaultValue = "COMPOSITE") FilterOption filterOption,
@RequestParam(value = "lang", defaultValue = "en") String lang) throws ResourceNotFoundException, IOException{

ontologyIds = ontologyRepository.filterOntologyIDs(schemas,classifications,ontologyIds,exclusive,filterOption,lang);
Expand All @@ -75,7 +75,7 @@ HttpEntity<MultiKeyMap> getStatisticsBySchema(
for (String key : keys) {
Set<String> values = ontologyRepository.getSchemaValues(Collections.singleton(key),lang);
for (String value : values) {
summaries.put(key,value, getStatistics(Collections.singleton(key),Collections.singleton(value), Collections.emptySet(),false,FilterOption.LINEAR,lang));
summaries.put(key,value, getStatistics(Collections.singleton(key),Collections.singleton(value), Collections.emptySet(),false,FilterOption.COMPOSITE,lang));
}
}

Expand Down

0 comments on commit a8bd1ea

Please sign in to comment.