diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html
index 65243f2b..79918ec3 100644
--- a/landingPages/dataProvider/dataProvider.component.html
+++ b/landingPages/dataProvider/dataProvider.component.html
@@ -26,8 +26,12 @@
{{dataProviderInfo.compatibility}}
-
-
+ - Number of results with funding information:
+ {{dataProviderInfo.aggregationStatus.fundedContent | number}}
+
+ - Number of collected full-texts:
+ {{dataProviderInfo.aggregationStatus.indexRecords | number}}
+
- OAI-PMH:
diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts
index b58594f9..ed3be2e9 100644
--- a/landingPages/dataProvider/dataProvider.component.ts
+++ b/landingPages/dataProvider/dataProvider.component.ts
@@ -165,6 +165,9 @@ export class DataProviderComponent {
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe(
data => {
this.dataProviderInfo = data;
+
+ this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
+
this.initTabs();
this.showTabs = true ;
this.updateTitle(this.dataProviderInfo.title.name);
@@ -189,6 +192,17 @@ export class DataProviderComponent {
}
}
+ private getDataProviderAggregationStatus(originalId: string) {
+ this.subInfo = this._dataproviderService.getDataproviderAggregationStatus(originalId, this.properties).subscribe(
+ data => {
+ this.dataProviderInfo.aggregationStatus = data;
+ },
+ err => {
+ console.log(err);
+ }
+ );
+ }
+
private updateDescription(description:string) {
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts
index 9f9146fe..a175cad7 100644
--- a/landingPages/dataProvider/dataProvider.service.ts
+++ b/landingPages/dataProvider/dataProvider.service.ts
@@ -1,5 +1,5 @@
import {Injectable} from '@angular/core';
-import {Http, Response} from '@angular/http';
+import {Http, Response,Headers, RequestOptions} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import {DataProviderInfo} from '../../utils/entities/dataProviderInfo';
import 'rxjs/add/observable/of';
@@ -33,6 +33,16 @@ export class DataProviderService {
}
+ getDataproviderAggregationStatus(original_id: string, properties:EnvProperties):any {
+ let headers = new Headers({'Content-Type': 'application/json', 'accept': 'application/json'});
+ let options = new RequestOptions({headers: headers});
+
+ return this.http.post("http://beta.services.openaire.eu:8080/openaire/ds/search/0/1?requestSortBy=id&order=ASCENDING", JSON.stringify({ "id": original_id }), options)
+ .map(res => res.json())
+ .map(res => res['datasourceInfo'])
+ .map(res => this.parseDataproviderAggregationStatus(res));
+ }
+
private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console
@@ -40,6 +50,16 @@ export class DataProviderService {
return Observable.throw(error || 'Server error');
}
+ parseDataproviderAggregationStatus(data: any): any {
+ var aggregationStatus: {"fundedContent": string, "indexRecords": string} = null;
+ if(data != null && data[0] != null) {
+ aggregationStatus = {"fundedContent": "-1", "indexRecords": "-1"};
+ aggregationStatus.fundedContent = data[0].fundedContent;
+ aggregationStatus.indexRecords = data[0].indexRecords;
+ }
+ return aggregationStatus;
+ }
+
parseDataProviderInfo (data: any):any {
this.dataProviderInfo = new DataProviderInfo();
@@ -54,6 +74,7 @@ export class DataProviderService {
}else if (originalId.indexOf("re3data_____::") != -1){
this.dataProviderInfo.r3DataURL = "http://service.re3data.org/repository/"+originalId.split("re3data_____::")[1];
}
+ this.dataProviderInfo.originalId = originalId;
}
}
diff --git a/utils/entities/dataProviderInfo.ts b/utils/entities/dataProviderInfo.ts
index 6cbb4f96..e1264190 100644
--- a/utils/entities/dataProviderInfo.ts
+++ b/utils/entities/dataProviderInfo.ts
@@ -7,7 +7,11 @@ export class DataProviderInfo {
oaiPmhURL: string;
openDoarURL: string;
r3DataURL: string;
+ originalId: string;
countries: string[];
+
+ aggregationStatus: {"fundedContent": string, "indexRecords": string}; //collected from datasource api
+
tabs: {"name": string, "content": string}[];
tabsInTypes = {
"publicationsTab": new Set(