1. dataProvider.component & statisticsTab.component: Use statisticsTab in dataprovider component for landing page.

2. dataProvider.component: variable 'statsClicked' set to false when statistics tab closes (avoid requests).
3. #3690: datasetInfo.ts, dataset.component, dataset.service: Parse 'subtitle' field and display it in dataset landing page.
4. #3484: publicationInfo.ts, publication.component, publication.service: Parse 'essn' and 'iss' fields of 'journal' and change the way journal information is displayed in publication landing page.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53512 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-10-17 15:19:22 +00:00
parent 4f8a366174
commit a381a25305
9 changed files with 92 additions and 73 deletions

View File

@ -193,7 +193,7 @@
<div class="uk-accordion-content">
<div *ngIf="activeTab=='Statistics' && statsClicked">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<!-- <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<div *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
<p class="uk-text-bold">Latest Research Result Timeline</p>
@ -218,8 +218,9 @@
<p class="uk-text-bold">Projects with most Research Data</p>
<i-frame [url]=dataProjectsUrl width="100%" height="350"></i-frame>
</div>
</div>
</div>
</div> -->
<statisticsTab [fetchPublications]="fetchPublications" [fetchDatasets]="fetchDatasets" [datasourceId]="datasourceId"></statisticsTab>
</div>
</div>
</li>

View File

@ -324,7 +324,7 @@ export class DataProviderComponent {
} else if(content=='metricsTab') {
this.metricsClicked = true;
} else if(content=='statisticsTab') {
this.statsClicked = true;
this.statsClicked = !this.statsClicked;
}
}

View File

@ -1,66 +1,66 @@
import {Component, Input} from '@angular/core';
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {FetchPublications} from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import {FetchDatasets} from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'statisticsTab',
template: `
<div *ngIf="show">
<errorMessages [status]="[searchPublicationsComponent.searchUtils.status, DatasetsComponent.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.DONE || searchDatasetsComponent.searchUtils.status == errorCodes.DONE">
<p class="uk-text-bold">Latest Documents Timeline</p>
<div *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
<p class="uk-text-bold">Latest Research Result Timeline</p>
<i-frame [url]=docsTimelineUrl width="100%" height="350"></i-frame>
<p class="uk-text-bold">Documents Types</p>
<p class="uk-text-bold">Research Result Types</p>
<i-frame [url]=docsTypesUrl width="100%" height="350"></i-frame>
</div>
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults > 0)">
<div>
<p class="uk-text-bold">Funders in content providers Publications</p>
<i-frame [url]=docsFunderUrl width="100%" height="350"></i-frame>
<p class="uk-text-bold">Projects with most Publications</p>
<i-frame [url]=pubsProjectsUrl width="100%" height="350"></i-frame>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0)">
<p class="uk-text-bold">Funders in Research Results of content provider</p>
<i-frame [url]=docsFunderUrl width="100%" height="350"></i-frame>
</div>
<div *ngIf="(searchDatasetsComponent.searchUtils.totalResults > 0)">
<div>
<p class="uk-text-bold">Projects with most Research Data</p>
<i-frame [url]=dataProjectsUrl width="100%" height="350"></i-frame>
</div>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 ">
<p class="uk-text-bold">Projects with most Publications</p>
<i-frame [url]=pubsProjectsUrl width="100%" height="350"></i-frame>
</div>
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)">
<div>
<p class="uk-text-bold">Projects with most Research Data</p>
<i-frame [url]=dataProjectsUrl width="100%" height="350"></i-frame>
</div>
</div>
</div>
</div>
`
})
export class StatisticsTabComponent {
@Input() datasourceId;
@Input() fetchPublications : FetchPublications;
@Input() fetchDatasets : FetchDatasets;
@Input() statistics;
@Input() id;
@Input() searchDatasetsComponent : SearchDatasetsComponent;
@Input() searchPublicationsComponent : SearchPublicationsComponent;
@Input() show : boolean = false;
private docsTimelineUrl: string;
private docsTypesUrl:string;
private docsFunderUrl:string;
private dataProjectsUrl:string ;
private pubsProjectsUrl:string;
public errorCodes:ErrorCodes = new ErrorCodes();
private docsTimelineUrl: string;
private docsTypesUrl:string;
private docsFunderUrl:string;
private dataProjectsUrl:string ;
private pubsProjectsUrl:string;
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {}
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
var properties = data.envSpecific;
this.docsTimelineUrl ='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.id+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Documents"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=100%&h=250';
this.docsTypesUrl = 'https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.id+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Documents"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.docsFunderUrl =' https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.id+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Documents"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.dataProjectsUrl ='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"'+this.id+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Datasets"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.pubsProjectsUrl ='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"'+this.id+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.docsTimelineUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": -30, "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=100%&h=250';
this.docsTypesUrl = properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.docsFunderUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.dataProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
this.pubsProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=100%&h=250';
});
}
ngOnDestroy() {}

View File

@ -12,6 +12,9 @@
<div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record [URL]="properties.baseLink+'/search/dataset?datasetId='+datasetId"></schema2jsonld>
<showTitle [titleName]="datasetInfo.title"></showTitle>
<p class="uk-text-large" *ngIf="datasetInfo.subtitle">
<span [innerHTML]="datasetInfo.subtitle"></span>
</p>
<span *ngIf="datasetInfo.types && datasetInfo.types.length > 0"class="uk-label custom-label label-dataset " title="Type">{{datasetInfo.types.join(", ")}}</span>
<span *ngIf="datasetInfo.languages && datasetInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{datasetInfo.languages.join(", ")}}</span>
<span *ngIf="datasetInfo.countries && datasetInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{datasetInfo.countries.join(", ")}}</span>

View File

@ -87,6 +87,9 @@ export class DatasetService {
if(data[1] != null) {
if(Array.isArray(data[1])) {
this.datasetInfo.title = data[1][0].content;
if(data[1][1].classid == "subtitle") {
this.datasetInfo.subtitle = data[1][1].content;
}
} else {
this.datasetInfo.title = data[1].content;
}

View File

@ -35,35 +35,44 @@
<li *ngIf="publicationInfo.publisher"><span class="uk-text-bold">Publisher:</span> {{publicationInfo.publisher}}</li>
<li *ngIf="publicationInfo.journal &&
(publicationInfo.journal['journal'] || publicationInfo.journal['issn'] || publicationInfo.journal['lissn']
|| publicationInfo.journal['volume'] || publicationInfo.journal['start_page'] || publicationInfo.journal['end_page'])">
|| publicationInfo.journal['volume'] || publicationInfo.journal['eissn'] || publicationInfo.journal['issue'])">
<span class="uk-text-bold">Journal:</span>
<span *ngIf="publicationInfo.journal['journal']">{{publicationInfo.journal['journal']}}</span>
<span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['lissn'] || publicationInfo.journal['volume']
|| publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">(</span
><span *ngIf="publicationInfo.journal['issn']">issn: {{publicationInfo.journal['issn']}}<span *ngIf="publicationInfo.journal['lissn'] || publicationInfo.journal['volume'] || publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">, </span
></span
><span *ngIf="publicationInfo.journal['lissn']">lissn: {{publicationInfo.journal['lissn']}}<span *ngIf="publicationInfo.journal['volume'] || publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">, </span
></span
><span *ngIf="publicationInfo.journal['volume']"
>vol:
<span *ngIf="publicationInfo.journal['journal']">{{publicationInfo.journal['journal']}}</span
><span *ngIf="publicationInfo.journal['journal'] && (publicationInfo.journal['volume'] || publicationInfo.journal['issue'])">,</span>
<span *ngIf="publicationInfo.journal['volume']"
>volume
<span *ngIf="publicationInfo.journal['volume'] > 0">{{publicationInfo.journal['volume'] | number}}</span
><span *ngIf="!(publicationInfo.journal['volume'] > 0)">{{publicationInfo.journal['volume']}}</span
><span *ngIf="publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">, </span
><span *ngIf="publicationInfo.journal['issue'] || publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">,</span>
</span>
<span *ngIf="publicationInfo.journal['issue']"
>issue
<span *ngIf="publicationInfo.journal['issue'] > 0">{{publicationInfo.journal['issue'] | number}}</span
><span *ngIf="!(publicationInfo.journal['issue'] > 0)">{{publicationInfo.journal['issue']}}</span
><span *ngIf="publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">,</span>
</span>
<span *ngIf="(publicationInfo.journal['volume'] || publicationInfo.journal['issue']) &&
(publicationInfo.journal['start_page'] && publicationInfo.journal['end_page'])">pages</span>
<span *ngIf="(publicationInfo.journal['volume'] || publicationInfo.journal['issue']) &&
((publicationInfo.journal['start_page'] && !publicationInfo.journal['end_page']) ||
(!publicationInfo.journal['start_page'] && publicationInfo.journal['end_page']))">page</span>
<span *ngIf="publicationInfo.journal['start_page']"
><span *ngIf="publicationInfo.journal['start_page'] > 0">{{publicationInfo.journal['start_page'] | number}}</span
><span *ngIf="!(publicationInfo.journal['start_page'] > 0)">{{publicationInfo.journal['start_page']}}</span
></span
><span *ngIf="publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']"
>pp:
<span *ngIf="publicationInfo.journal['start_page']"
><span *ngIf="publicationInfo.journal['start_page'] > 0">{{publicationInfo.journal['start_page'] | number}}</span
><span *ngIf="!(publicationInfo.journal['start_page'] > 0)">{{publicationInfo.journal['start_page']}}</span
></span
><span *ngIf="publicationInfo.journal['start_page'] && publicationInfo.journal['end_page']">-</span
><span *ngIf="publicationInfo.journal['end_page']"
><span *ngIf="publicationInfo.journal['end_page'] > 0">{{publicationInfo.journal['end_page'] | number}}</span
><span *ngIf="!(publicationInfo.journal['end_page'] > 0)">{{publicationInfo.journal['end_page']}}</span
></span
><span *ngIf="publicationInfo.journal['start_page'] && publicationInfo.journal['end_page']">-</span
><span *ngIf="publicationInfo.journal['end_page']"
><span *ngIf="publicationInfo.journal['end_page'] > 0">{{publicationInfo.journal['end_page'] | number}}</span
><span *ngIf="!(publicationInfo.journal['end_page'] > 0)">{{publicationInfo.journal['end_page']}}</span
></span>
<span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">(</span
><span *ngIf="publicationInfo.journal['issn']">issn: {{publicationInfo.journal['issn']}}<span *ngIf="publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">, </span
></span
><span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['lissn'] || publicationInfo.journal['volume']
|| publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">)</span>
><span *ngIf="publicationInfo.journal['eissn']">eissn: {{publicationInfo.journal['eissn']}}<span *ngIf="publicationInfo.journal['lissn']">, </span
></span
><span *ngIf="publicationInfo.journal['lissn']">lissn: {{publicationInfo.journal['lissn']}}
></span
><span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">)</span>
</li>
<li *ngIf="publicationInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{publicationInfo.embargoEndDate}}</li>
@ -415,7 +424,7 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -177,11 +177,13 @@ export class PublicationService {
}
if(data[5] != null) {
this.publicationInfo.journal = {"journal": "", "issn": "", "lissn": "", "volume": "", "start_page": "", "end_page": ""}
this.publicationInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
this.publicationInfo.journal['journal'] = data[5].content;
this.publicationInfo.journal['issn'] = data[5].issn;
this.publicationInfo.journal['lissn'] = data[5].lissn;
this.publicationInfo.journal['eissn'] = data[5].eissn;
this.publicationInfo.journal['issue'] = data[5].iss;
this.publicationInfo.journal['volume'] = data[5].vol;
this.publicationInfo.journal['start_page'] = data[5].sp;
this.publicationInfo.journal['end_page'] = data[5].ep;

View File

@ -2,6 +2,7 @@ export class DatasetInfo {
underCurationMessage: boolean;
//title: { "name": string, "url": string, "accessMode": string};
title: string;
subtitle: string;
accessMode: string;
authors: string[];
date: string;

View File

@ -15,7 +15,7 @@ export class PublicationInfo {
identifiers: Map<string, string[]>; //key is the classname
publisher: string;
journal: {"journal": string, "issn": string, "lissn": string, "volume": string, "start_page": string, "end_page": string};
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string, "issue": string, "volume": string, "start_page": string, "end_page": string};
languages: string[];
countries: string[];
subjects: string[];