[Library |Trunk]

add methods gor gettings total number of results linked with publications


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57551 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-11-08 13:44:00 +00:00
parent 68ebe44682
commit 91c596f37c
1 changed files with 5 additions and 0 deletions

View File

@ -370,6 +370,11 @@ export class SearchResearchResultsService {
}
return this.numOfResults(url, properties);
}
numOfSearchResultsLinkedToPub(resultType:string, properties:EnvProperties):any {
let url = properties.searchAPIURLLAst+"resources?query="+encodeURIComponent("( (oaftype exact result) and (resulttypeid exact "+resultType+") and (relresulttype=publication) )")+"&page=0&size=0&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => res['meta']['total']));
}
countTotalResults(resultType:string, properties:EnvProperties, refineParams:string=null):any {
let url = properties.searchAPIURLLAst+this.getEntityName(resultType, true)+"/count?format=json"+refineParams;