[master | DONE]: Add result belongs to configuration.

This commit is contained in:
Konstantinos Triantafyllou 2024-05-29 13:05:46 +03:00
parent be7322f833
commit cf83f5bd9d
2 changed files with 124 additions and 11 deletions

@ -1 +1 @@
Subproject commit 1ac4365e054f97190a851d2a5e4b64d66198f3e3
Subproject commit 65a60ddad12498a410a1779ad3c234f9fef24507

View File

@ -4,6 +4,8 @@ import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sideb
import {Role} from "../openaireLibrary/login/utils/helper.class";
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
import {LinksResolver} from "../search/links-resolver";
import {BelongsTo} from "../openaireLibrary/utils/entities/resultLandingInfo";
import {properties} from "../../environments/environment";
export class Irish {
public static irishAdminToolsPortalType = "country";
@ -56,28 +58,139 @@ export class Irish {
/** OA Indicator */
Irish.initializeOAIndicators();
/* Landing belongs to*/
BelongsTo.result = {
fields: [
{path: ['countries'], value: 'Ireland'},
{path: ['organizations', 'country'], value: 'Ireland'},
{path: ['fundedByProjects', 'funderJurisdiction'], value: 'IE'}
],
message: 'This ((result)) is not specific to Ireland. For more details, please visit ' +
'<a href="https://' + (properties.environment !== 'production' ? 'beta.' : '') + 'explore.openaire.eu/search/result?((type_id))=((id))" target="_blank">OpenAIRE Explore.</a>'
}
}
public static initializeOAIndicators(): void {
StakeholderConfiguration.openAccess.set('country', {
numerator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"ie_monitor\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0},
denominator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"ie_monitor\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0}
numerator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"ie_monitor\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
},
denominator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"ie_monitor\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
}
});
StakeholderConfiguration.openAccess.set('organization', {
numerator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.organization.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0},
denominator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.organization.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0}
numerator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.organization.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
},
denominator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.organization.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
}
});
StakeholderConfiguration.openAccess.set('funder', {
numerator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.project.funder.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0},
denominator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.project.funder.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0}
numerator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.project.funder.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
},
denominator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.project.funder.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
}
});
StakeholderConfiguration.openAccess.set('researcher', {
numerator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_orcid.orcid\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {"statsProfile": "openaire_stats"}, "filters": {}, "filtersApplied": 0},
denominator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_orcid.orcid\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {"statsProfile": "openaire_stats"}, "filters": {}, "filtersApplied": 0}
numerator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_orcid.orcid\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {"statsProfile": "openaire_stats"},
"filters": {},
"filtersApplied": 0
},
denominator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.result_orcid.orcid\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {"statsProfile": "openaire_stats"},
"filters": {},
"filtersApplied": 0
}
});
StakeholderConfiguration.openAccess.set('datasource', {
numerator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.datasource.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0},
denominator: {"type": null, "format": "NUMBER", "source": "stats-tool", "url": "raw?json=", "jsonPath": ["data", "0", "0", "0"], "chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.datasource.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}", "parameters": {}, "filters": {}, "filtersApplied": 0}
numerator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.datasource.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]},{\"field\":\"publication.indi_result_oa_with_license.oa_with_license\",\"type\":\"=\",\"values\":[\"1\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
},
denominator: {
"type": null,
"format": "NUMBER",
"source": "stats-tool",
"url": "raw?json=",
"jsonPath": ["data", "0", "0", "0"],
"chartObject": "{\"verbose\":false,\"series\":[{\"query\":{\"parameters\":[],\"select\":[{\"field\":\"publication\",\"aggregate\":\"count\"}],\"filters\":[{\"groupFilters\":[{\"field\":\"publication.datasource.id\",\"type\":\"=\",\"values\":[\"((__index_id__))\"]},{\"field\":\"publication.result_refereed.refereed\",\"type\":\"=\",\"values\":[\"peerReviewed\"]}],\"op\":\"AND\"}],\"entity\":\"publication\",\"profile\":\"((__profile__))\",\"limit\":\"30\"}}]}",
"parameters": {},
"filters": {},
"filtersApplied": 0
}
});
}
}