Revision 44435
Added by Argiro Kokogiannaki over 7 years ago
searchDataproviders.service.ts | ||
---|---|---|
60 | 60 |
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields)]); |
61 | 61 |
} |
62 | 62 |
|
63 |
searchDataprovidersForDeposit (id: string,type:string, page: number, size: number):any { |
|
64 |
let link = OpenaireProperties.getSearchResourcesAPIURL(); |
|
65 |
var compatibilities = ""; |
|
66 |
if(type == "Datasets"){ |
|
67 |
compatibilities = " and (datasourcecompatibilityid = openaire2.0_data)" |
|
68 |
}else if(type == "Publications"){ |
|
69 |
compatibilities = " and (datasourcecompatibilityid <> UNKNOWN) and (datasourcecompatibilityid <> openaire2.0_data)" |
|
70 |
} |
|
71 |
let url = link+"?query=(((deletedbyinference = false) AND (oaftype exact datasource)) "+((compatibilities && compatibilities.length > 0)?" "+compatibilities+" ":"")+") and (relorganizationid exact "+id+")"; |
|
72 |
return this.http.get(url) |
|
73 |
.map(res => <any> res.json()) |
|
74 |
.map(res => [res['meta'].total, this.parseResults(res['results'])]); |
|
75 |
} |
|
76 |
|
|
63 | 77 |
searchDataprovidersForEntity (params: string, page: number, size: number):any { |
64 | 78 |
let link = OpenaireProperties.getSearchAPIURL(); |
65 | 79 |
let url = link+params+"/datasources"; |
Also available in: Unified diff
Use proper query for deposit results - pubs and data repo