Add citation-based impact indicator filters

This commit is contained in:
Serafeim Chatzopoulos 2024-06-14 12:19:48 +03:00
parent a8a498929b
commit 18f140f89b
2 changed files with 31 additions and 12 deletions

View File

@ -67,18 +67,17 @@ public class ResearchProductsRequest {
// @ValidBestAccessRightLabel(message = "bestAccessRightLabel should be one of 'OPEN SOURCE', 'OPEN', 'EMBARGO', 'RESTRICTED', 'CLOSED', 'UNKNOWN'")
private String[] bestOpenAccessRightLabel;
// @Parameter(description = "Citation-based indicator that reflects the overall impact of a research product", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"c1", "c2", "c3", "c4", "c5"})))
// private String[] influenceIndicator;
//
// @Parameter(description = "Citation-based indicator that reflects current impact or attention of a research product", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"c1", "c2", "c3", "c4", "c5"})))
// private String[] popularityIndicator;
//
// @Parameter(description = "Citation-based indicator that reflects the initial momentum of a research product directly after its publication", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"c1", "c2", "c3", "c4", "c5"})))
// private String[] impulseIndicator;
//
// @Parameter(description = "The type of the research product", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"c1", "c2", "c3", "c4", "c5"})))
// private String[] citationCountIndicator;
//
@Parameter(description = "Citation-based indicator that reflects the overall impact of a research product; please choose a class among 'C1', 'C2', 'C3', 'C4', 'C5' for top 0.01%, top 0.1%, top 1%, top 10%, and average in terms of influence respectively", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"C1", "C2", "C3", "C4", "C5"})))
private String[] influenceClass;
@Parameter(description = "Citation-based indicator that reflects current impact or attention of a research product; please choose a class among 'C1', 'C2', 'C3', 'C4', 'C5' for top 0.01%, top 0.1%, top 1%, top 10%, and average in terms of popularity respectively", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"C1", "C2", "C3", "C4", "C5"})))
private String[] popularityClass;
@Parameter(description = "Citation-based indicator that reflects the initial momentum of a research product directly after its publication; please choose a class among 'C1', 'C2', 'C3', 'C4', 'C5' for top 0.01%, top 0.1%, top 1%, top 10%, and in terms of average impulse respectively", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"C1", "C2", "C3", "C4", "C5"})))
private String[] impulseClass;
@Parameter(description = "Citation-based indicator that reflects the overall impact of a research product by summing all its citations; please choose a class among 'C1', 'C2', 'C3', 'C4', 'C5' for top 0.01%, top 0.1%, top 1%, top 10%, and average in terms of citation count respectively", array = @ArraySchema(schema = @Schema(type = "string", allowableValues = {"C1", "C2", "C3", "C4", "C5"})))
private String[] citationCountClass;
// publication related filters
// @Parameter(description = "Retrieves publications classified with the respective Sustainable Development Goal number (for further information check <a href='https://sdgs.un.org/goals' target='_blank'>here</a>); the values for SDGs are numbers from 1 to 17 `[Only for publications]`", array = @ArraySchema(schema = @Schema(type = "integer")))

View File

@ -57,6 +57,10 @@ public interface ResearchProductsRequestMapper {
Map.entry("subjects", "resultsubject:(%s)"),
Map.entry("publisher", "resultpublisher:(%s)"),
Map.entry("publicationDate", "resultdateofacceptance:[%s TO %s]"),
Map.entry("influence", "influence_class:(%s)"),
Map.entry("popularity", "popularity_class:(%s)"),
Map.entry("impulse", "impulse_class:(%s)"),
Map.entry("citationCount", "citation_count_class:(%s)"),
// related entity fields
Map.entry("relOrganizationId", "relorganizationid:(%s)"),
@ -180,6 +184,22 @@ public interface ResearchProductsRequestMapper {
fqList.add(String.format(solrFieldMapping.get("publisher"), Utils.escapeAndJoin(src.getPublisher(), "OR", false)));
}
if (!Utils.isNullOrEmpty(src.getInfluenceClass())) {
fqList.add(String.format(solrFieldMapping.get("influence"), Utils.escapeAndJoin(src.getInfluenceClass(), "OR", false)));
}
if (!Utils.isNullOrEmpty(src.getPopularityClass())) {
fqList.add(String.format(solrFieldMapping.get("popularity"), Utils.escapeAndJoin(src.getPopularityClass(), "OR", false)));
}
if (!Utils.isNullOrEmpty(src.getImpulseClass())) {
fqList.add(String.format(solrFieldMapping.get("impulse"), Utils.escapeAndJoin(src.getImpulseClass(), "OR", false)));
}
if (!Utils.isNullOrEmpty(src.getCitationCountClass())) {
fqList.add(String.format(solrFieldMapping.get("citationCount"), Utils.escapeAndJoin(src.getCitationCountClass(), "OR", false)));
}
// related entity fields
if (!Utils.isNullOrEmpty(src.getRelCommunityId())) {