1. Landing pages: before a request for the main content (e.g. publicationInfo) is executed, make this content null.

2. Landing pages: 'Available on' and 'Funded by' (Decapitalize first letter of second word).
3. Landing pages: Add 'Related identifiers' label for identifiers information.
4. Landing pages: 'OPEN', 'OPEN SOURCE', 'EMBARGO', 'RESTRICTED', 'Closed' accessmodes are acceptable for 'Available on' section. Otherwise show 'UNKNOWN ACCESSMODE'. 
5. Publication & Dataset & Software landing pages: remove url from title - use separate variable for best accessmode, add country information.
6. Software landing: Add 'programmingLanguage' information.
7. SearchResult & TabResult: Add country information for Publication & Dataset & Software type of results, add programmingLanguage for Software type. 
8. TabResult: Show language and types information.  
9. Bug fix in 'dateofacceptance' parsing for relates/similar research results (landing pages).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52606 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-06-28 14:52:45 +00:00
parent f648847e1a
commit 2220677d99
28 changed files with 335 additions and 109 deletions

View File

@ -157,6 +157,8 @@ export class DataProviderComponent {
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.dataProviderInfo = null;
this.showTabs = false ; this.showTabs = false ;
if(this.datasourceId==null || this.datasourceId==''){ if(this.datasourceId==null || this.datasourceId==''){
this.showLoading = false; this.showLoading = false;

View File

@ -11,11 +11,13 @@
<div *ngIf="datasetInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="datasetInfo != null" uk-grid class="uk-grid-large">
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record></schema2jsonld> <schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record></schema2jsonld>
<showTitle [title]="datasetInfo.title"></showTitle> <showTitle [titleName]="datasetInfo.title"></showTitle>
<span *ngIf="datasetInfo.types.length > 0"class="uk-label custom-label label-dataset " title="Type">{{datasetInfo.types.join(", ")}}</span> <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.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>
<span *ngIf="datasetInfo.title && datasetInfo.title.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.title.accessMode " title="Access Mode">{{datasetInfo.title.accessMode}}</span> <!-- <span *ngIf="datasetInfo.title && datasetInfo.title.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.title.accessMode " title="Access Mode">{{datasetInfo.title.accessMode}}</span> -->
<span *ngIf="datasetInfo.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.accessMode " title="Access Mode">{{datasetInfo.accessMode}}</span>
<span *ngIf="datasetInfo.underCurationMessage" class="uk-label custom-label label-underCuration " > <span *ngIf="datasetInfo.underCurationMessage" class="uk-label custom-label label-underCuration " >
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
title="{{buildCurationTooltip()}}"> title="{{buildCurationTooltip()}}">

View File

@ -115,19 +115,27 @@ export class DatasetComponent {
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.datasetInfo = null;
this.infoSub = this._datasetService.getDatasetInfo(id, this. properties).subscribe( this.infoSub = this._datasetService.getDatasetInfo(id, this. properties).subscribe(
data => { data => {
this.datasetInfo = data; this.datasetInfo = data;
/*
if(this.datasetInfo.title.name != undefined && this.datasetInfo.title.name!= ''){ if(this.datasetInfo.title.name != undefined && this.datasetInfo.title.name!= ''){
this.updateTitle(this.datasetInfo.title.name); this.updateTitle(this.datasetInfo.title.name);
this.updateDescription("Dataset, search, repositories, open access,"+this.datasetInfo.title.name); this.updateDescription("Dataset, search, repositories, open access,"+this.datasetInfo.title.name);
} }
*/
if(this.datasetInfo.title){
this.updateTitle(this.datasetInfo.title);
this.updateDescription("Dataset, search, repositories, open access,"+this.datasetInfo.title);
}
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, this.datasetInfo.title.name, this.piwikSiteId).subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, this.datasetInfo.title/*.name*/, this.piwikSiteId).subscribe();
} }
this.result = [] this.result = []
this.result = {id: id, type :"dataset", source : "openaire", title: this.datasetInfo.title,url: '', result: '', accessRights: this.datasetInfo.title.accessMode, embargoEndDate: ''}; this.result = {id: id, type :"dataset", source : "openaire", title: this.datasetInfo.title,url: '', result: '', accessRights: /*this.datasetInfo.title.accessMode*/ this.datasetInfo.accessMode, embargoEndDate: ''};
let relatedResearchResultsNum = 0; let relatedResearchResultsNum = 0;
if(this.datasetInfo.relatedResearchResults != undefined) { if(this.datasetInfo.relatedResearchResults != undefined) {

View File

@ -43,6 +43,7 @@ export class DatasetService {
res[0], res[0],
res[1]['creator'], res[1]['creator'],
res[1]['language'], res[1]['language'],
res[1]['country'],
res[2] res[2]
]).map(res => this.parseDatasetInfo(res)); ]).map(res => this.parseDatasetInfo(res));
} }
@ -56,7 +57,7 @@ export class DatasetService {
parseDatasetInfo (data: any):any { parseDatasetInfo (data: any):any {
this.datasetInfo = new DatasetInfo(); this.datasetInfo = new DatasetInfo();
this.datasetInfo.record = data[12]; this.datasetInfo.record = data[13];
if(data[0] != null) { if(data[0] != null) {
var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
this.datasetInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; this.datasetInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
@ -69,7 +70,7 @@ export class DatasetService {
} }
this.datasetInfo.embargoEndDate = data[0].embargoenddate; this.datasetInfo.embargoEndDate = data[0].embargoenddate;
} }
this.datasetInfo.title = {"name": "", "url": "", "accessMode": ""}; /*this.datasetInfo.title = {"name": "", "url": "", "accessMode": ""};
if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) { if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.datasetInfo.title.accessMode = data[0]['bestaccessright'].classid; this.datasetInfo.title.accessMode = data[0]['bestaccessright'].classid;
} }
@ -79,6 +80,16 @@ export class DatasetService {
} else { } else {
this.datasetInfo.title['name'] = data[1].content; this.datasetInfo.title['name'] = data[1].content;
} }
}*/
if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.datasetInfo.accessMode = data[0]['bestaccessright'].classid;
}
if(data[1] != null) {
if(Array.isArray(data[1])) {
this.datasetInfo.title = data[1][0].content;
} else {
this.datasetInfo.title = data[1].content;
}
} }
if(data[2] != null) { if(data[2] != null) {
@ -136,7 +147,7 @@ export class DatasetService {
} }
if(instance.hasOwnProperty("hostedby")) { if(instance.hasOwnProperty("hostedby")) {
counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.datasetInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.datasetInfo.title); counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.datasetInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.datasetInfo.title*/, this.datasetInfo.accessMode);
} }
} }
} }
@ -156,7 +167,7 @@ export class DatasetService {
this.datasetInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( this.datasetInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
this.datasetInfo.hostedBy_collectedFrom, this.datasetInfo.publisher, this.datasetInfo.hostedBy_collectedFrom, this.datasetInfo.publisher,
null, this.datasetInfo.identifiers, this.datasetInfo.title); null, this.datasetInfo.identifiers/*, this.datasetInfo.title*/);
if(data[8] != null) { if(data[8] != null) {
this.datasetInfo.contexts = this.parsingFunctions.parseContexts(data[8]); this.datasetInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
@ -195,6 +206,9 @@ export class DatasetService {
if(data[11] != null) { if(data[11] != null) {
this.datasetInfo.languages = this.parsingFunctions.parseLanguages(data[11]); this.datasetInfo.languages = this.parsingFunctions.parseLanguages(data[11]);
} }
if(data[12] != null) {
this.datasetInfo.countries = this.parsingFunctions.parseCountries(data[12]);
}
if(this.datasetInfo.relatedResearchResults) { if(this.datasetInfo.relatedResearchResults) {
let self = this; let self = this;

View File

@ -4,17 +4,19 @@ import {Component, Input, ElementRef} from '@angular/core';
selector: 'availableOn', selector: 'availableOn',
template: ` template: `
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt class="title">Available On</dt> <dt class="title">Available on</dt>
<dd class="line" *ngFor="let available of availableOn.slice(0, showNum) let i=index" > <dd class="line" *ngFor="let available of availableOn.slice(0, showNum) let i=index" >
<div> <div>
<div class="{{available['bestAccessMode']}}"> <!--div class="{{available['bestAccessMode']}}"-->
<div [class]="available['bestAccessMode'] ? available['bestAccessMode'] : 'UNKNOWN ACCESSMODE'">
<span *ngIf="available.downloadUrl.length > 1" <span *ngIf="available.downloadUrl.length > 1"
class="custom-external custom-icon"> class="custom-external custom-icon">
{{available.downloadName}} {{available.downloadName}}
<span *ngFor="let url of available.downloadUrl; let i=index;"> <span *ngFor="let url of available.downloadUrl; let i=index;">
<a href="{{url}}" target="_blank" <a href="{{url}}" target="_blank"
[attr.uk-tooltip]="available.accessMode[i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="available.accessMode[i]"> attr.uk-tooltip="pos:right; delay:10"
[title]="available.accessMode[i] ? available.accessMode[i] : 'UNKNOWN ACCESSMODE'">
[{{(i+1) | number}}] [{{(i+1) | number}}]
</a> </a>
</span> </span>
@ -23,8 +25,9 @@ import {Component, Input, ElementRef} from '@angular/core';
*ngIf="available['downloadUrl'].length == 1" *ngIf="available['downloadUrl'].length == 1"
href="{{available['downloadUrl']}}" href="{{available['downloadUrl']}}"
target="_blank" target="_blank"
[attr.uk-tooltip]="available['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="available['bestAccessMode']"> attr.uk-tooltip="pos:right; delay:10"
[title]="available.bestAccessMode ? available.bestAccessMode : 'UNKNOWN ACCESSMODE'">
{{available.downloadName}} {{available.downloadName}}
</a> </a>
<span *ngIf="available.collectedName" class="uk-text-bold">via</span> <span *ngIf="available.collectedName" class="uk-text-bold">via</span>

View File

@ -4,7 +4,7 @@ import {Component, Input, ElementRef} from '@angular/core';
selector: 'fundedBy', selector: 'fundedBy',
template: ` template: `
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt class="title">Funded By</dt> <dt class="title">Funded by</dt>
<dd class="line" <dd class="line"
*ngFor="let item of fundedByProjects.slice(0, showNum) let i=index"> *ngFor="let item of fundedByProjects.slice(0, showNum) let i=index">
<div><!-- *ngIf="i<5 || showAll"--> <div><!-- *ngIf="i<5 || showAll"-->

View File

@ -142,7 +142,7 @@ export class ParsingFunctions {
// publication & dataset landing : for downloadFrom // publication & dataset landing : for downloadFrom
addPublisherToHostedBy_collectedFrom( hostedBy_collectedFrom: {"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}[], addPublisherToHostedBy_collectedFrom( hostedBy_collectedFrom: {"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}[],
publisher: string, journal:{"journal": string, "issn": string, "lissn": string}, publisher: string, journal:{"journal": string, "issn": string, "lissn": string},
identifiers: Map<string, string[]>, title: { "name": string, "url": string, "accessMode": string}) { identifiers: Map<string, string[]>/*, title: { "name": string, "url": string, "accessMode": string}*/) {
if( publisher && identifiers != null && identifiers.has('doi')) { if( publisher && identifiers != null && identifiers.has('doi')) {
if( hostedBy_collectedFrom == null) { if( hostedBy_collectedFrom == null) {
hostedBy_collectedFrom = new Array<{"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}>(); hostedBy_collectedFrom = new Array<{"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}>();
@ -162,10 +162,11 @@ export class ParsingFunctions {
available.accessMode = new Array<string>(); available.accessMode = new Array<string>();
available.downloadUrl.push(url); available.downloadUrl.push(url);
/*
if(title != undefined && title['url'] == "") { if(title != undefined && title['url'] == "") {
title['url'] = url; title['url'] = url;
} }
*/
hostedBy_collectedFrom.push(available); hostedBy_collectedFrom.push(available);
} }
return hostedBy_collectedFrom; return hostedBy_collectedFrom;
@ -238,8 +239,8 @@ export class ParsingFunctions {
"collectedName": string, "collectedId": string, "collectedName": string, "collectedId": string,
"accessMode": string[], "bestAccessMode": string, "accessMode": string[], "bestAccessMode": string,
"type": string, "year":string }[], "type": string, "year":string }[],
instance: any, data: any, url: string, counter: number, instance: any, data: any, url: string, counter: number/*,
title: { "name": string, "url": string, "accessMode": string}): number { title: { "name": string, "url": string, "accessMode": string}*/, accessMode: string): number {
let available: {"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}; let available: {"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string};
available = {"downloadName": "", "downloadUrl": null, "collectedName": "", "collectedId": "", "accessMode": null, "bestAccessMode": null, "type": "", "year": ""}; available = {"downloadName": "", "downloadUrl": null, "collectedName": "", "collectedId": "", "accessMode": null, "bestAccessMode": null, "type": "", "year": ""};
@ -290,21 +291,25 @@ export class ParsingFunctions {
if(this.changeBestAccessMode(available.bestAccessMode, instance['accessright'])) { if(this.changeBestAccessMode(available.bestAccessMode, instance['accessright'])) {
available.bestAccessMode = instance['accessright'].classid; available.bestAccessMode = instance['accessright'].classid;
/*
if(title != undefined) { if(title != undefined) {
if(this.changeBestAccessMode(title['accessMode'], instance['accessright'])) { if(this.changeBestAccessMode(title['accessMode'], instance['accessright'])) {
title['accessMode'] = instance['accessright'].classid; title['accessMode'] = instance['accessright'].classid;
title['url'] = url; title['url'] = url;
} }
} }
*/
if(this.changeBestAccessMode(accessMode, instance['accessright'])) {
accessMode = instance['accessright'].classid;
} }
}
/*
if(title != undefined) { if(title != undefined) {
if(!title['url']) { if(!title['url']) {
title['url'] = url; title['url'] = url;
} }
} }
*/
} else if(url) { } else if(url) {
available['accessMode'].push(""); available['accessMode'].push("");
} }
@ -324,9 +329,13 @@ export class ParsingFunctions {
switch (currentAccessMode) { switch (currentAccessMode) {
case null: case null:
if(accessMode != "UNKNOWN") {
return true; return true;
}
return false;
case "CLOSED": case "CLOSED":
if( accessMode == "OPEN" || if( accessMode == "OPEN" ||
accessMode == "OPEN SOURCE" ||
accessMode == "EMBARGO" || accessMode == "EMBARGO" ||
accessMode == "RESTRICTED") { accessMode == "RESTRICTED") {
return true; return true;
@ -334,11 +343,18 @@ export class ParsingFunctions {
return false; return false;
case "RESTRICTED": case "RESTRICTED":
if( accessMode == "OPEN" || if( accessMode == "OPEN" ||
accessMode == "OPEN SOURCE" ||
accessMode == "EMBARGO") { accessMode == "EMBARGO") {
return true; return true;
} }
return false; return false;
case "EMBARGO": case "EMBARGO":
if( accessMode == "OPEN" ||
accessMode == "OPEN SOURCE") {
return true;
}
return false;
case "OPEN SOURCE":
if( accessMode == "OPEN") { if( accessMode == "OPEN") {
return true; return true;
} }
@ -394,8 +410,10 @@ export class ParsingFunctions {
researchResult['id'] = relation['to'].content; researchResult['id'] = relation['to'].content;
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content; let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
researchResult['name'] = titleName; researchResult['name'] = titleName;
if(relation.hasOwnProperty("dateofacceptance")) {
var date:string = ((Array.isArray(relation.dateofacceptance))?(relation.dateofacceptance[0]):(relation.dateofacceptance))+""; // transform to string in case it is an integer var date:string = ((Array.isArray(relation.dateofacceptance))?(relation.dateofacceptance[0]):(relation.dateofacceptance))+""; // transform to string in case it is an integer
researchResult['date'] = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; researchResult['date'] = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
}
//researchResult['date'] = relation.dateofacceptance.substring(0,4);; //researchResult['date'] = relation.dateofacceptance.substring(0,4);;
researchResult['percentage'] = Math.round(relation[percentageName]*100); researchResult['percentage'] = Math.round(relation[percentageName]*100);
return researchResult; return researchResult;
@ -548,4 +566,38 @@ export class ParsingFunctions {
} }
return languages; return languages;
} }
parseCountries(_countries: any) {
var countries = new Array<string>();
if(!Array.isArray(_countries)) {
if(_countries.classname != "Undetermined" && _countries.classname) {
countries.push(_countries.classname);
}
} else {
for(let i=0; i<countries.length; i++) {
if(_countries[i].classname != "Undetermined" && _countries[i].classname) {
countries.push(_countries[i].classname);
}
}
}
return countries;
}
parseProgrammingLanguages(_pLanguages) {
var pLanguages = new Array<string>();
if(!Array.isArray(_pLanguages)) {
if(_pLanguages.classname != "Undetermined" && _pLanguages.classname) {
pLanguages.push(_pLanguages.classname);
}
} else {
for(let i=0; i<_pLanguages.length; i++) {
if(_pLanguages[i].classname != "Undetermined" && _pLanguages[i].classname) {
pLanguages.push(_pLanguages[i].classname);
}
}
}
return pLanguages;
}
} }

View File

@ -4,6 +4,8 @@ import {Component, Input, ElementRef} from '@angular/core';
selector: 'showIdentifiers', selector: 'showIdentifiers',
template: ` template: `
<span *ngIf="countIdentifiers() > 0" class="uk-text-bold">Related identifiers:</span>
<span *ngIf="showAll && countIdentifiers() > pageSize"> <span *ngIf="showAll && countIdentifiers() > pageSize">
<a (click)="showAll = !showAll;">View less identifiers</a> <a (click)="showAll = !showAll;">View less identifiers</a>
</span> </span>

View File

@ -5,12 +5,9 @@ import {ActivatedRoute} from '@angular/router';
selector: 'showTitle', selector: 'showTitle',
template: ` template: `
<h2 *ngIf="title != undefined"> <h2 *ngIf="title != undefined">
<!--span [class]="'entityTitleIcon '+iconClass"></span-->
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''" <span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
class="custom-external"> class="custom-external">
<!--span class=" custom-icon {{title['accessMode']}}"
uk-tooltip="pos:bottom-right"
[title]="title['accessMode']"-->
<a *ngIf="title['name'] != undefined && title['name'] != ''" <a *ngIf="title['name'] != undefined && title['name'] != ''"
href="{{title['url']}}" target="_blank" href="{{title['url']}}" target="_blank"
[innerHTML]="title['name']"> [innerHTML]="title['name']">
@ -19,7 +16,6 @@ import {ActivatedRoute} from '@angular/router';
href="{{title['url']}}" target="_blank"> href="{{title['url']}}" target="_blank">
[no title available] [no title available]
</a> </a>
<!--/span-->
</span> </span>
<span *ngIf="(title['name'] != undefined && title['name'] != '') && <span *ngIf="(title['name'] != undefined && title['name'] != '') &&
(title['url'] == undefined || title['url'] == null || title['url'] == '')" (title['url'] == undefined || title['url'] == null || title['url'] == '')"
@ -31,15 +27,18 @@ import {ActivatedRoute} from '@angular/router';
[no title available] [no title available]
</span> </span>
</h2> </h2>
<!--[class]="title['accessMode']" <h2 *ngIf="titleName">
uk-tooltip="pos:bottom-right" <span [innerHTML]="titleName"></span>
[title]="title['accessMode']" </h2>
[innerHTML]="title['name']" --> <h2 *ngIf="!titleName && !title">
<span>[no title available]</span>
</h2>
` `
}) })
export class ShowTitleComponent { export class ShowTitleComponent {
@Input() titleName: string;
@Input() title: { [key: string]: string }; @Input() title: { [key: string]: string };
@Input() iconClass:string; @Input() iconClass:string;
@ -51,10 +50,6 @@ export class ShowTitleComponent {
this.sub = this.route.queryParams.subscribe( this.sub = this.route.queryParams.subscribe(
params => { params => {
console.info("onInit showTitle"); console.info("onInit showTitle");
if(this.title['accessMode'] == undefined) {
this.title['accessMode'] = "";
}
} }
); );
} }

View File

@ -49,7 +49,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
</a> </a>
<p *ngIf="item['id'] == '' && item['name'] != ''">{{item['name']}}</p> <p *ngIf="item['id'] == '' && item['name'] != ''">{{item['name']}}</p>
<span *ngIf="item['date'] != ''"> <span *ngIf="item['date']">
({{item['date']}}) ({{item['date']}})
</span> </span>
</td> </td>

View File

@ -43,7 +43,7 @@
<li (click)="activeTab='Projects'; projectsClicked=true;"> <li (click)="activeTab='Projects'; projectsClicked=true;">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Projetcs Projects
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResultsNoFilters | number}} {{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span> </span>

View File

@ -184,6 +184,8 @@ export class OrganizationComponent {
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.organizationInfo = null;
this.infoSub = this._organizationService.getOrganizationInfo(this.organizationId, this.properties).subscribe( this.infoSub = this._organizationService.getOrganizationInfo(this.organizationId, this.properties).subscribe(
data => { data => {
if(data == null) { if(data == null) {

View File

@ -273,8 +273,8 @@ actionsAfterLoadId(){
this.warningMessage = ''; this.warningMessage = '';
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
var funder = "EC";
var grantId ="654142"; this.projectInfo = null;
this.infoSub = this._projectService.getProjectInfo(id, this.properties).subscribe( this.infoSub = this._projectService.getProjectInfo(id, this.properties).subscribe(
data => { data => {
@ -294,6 +294,8 @@ actionsAfterLoadId(){
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.projectInfo = null;
this._projectService.getProjectInfoByGrantId(grantId,funder,this.properties).subscribe( this._projectService.getProjectInfoByGrantId(grantId,funder,this.properties).subscribe(
data =>{ data =>{

View File

@ -10,10 +10,12 @@
<div *ngIf="publicationInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="publicationInfo != null" uk-grid class="uk-grid-large">
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="publicationInfo.record" [data]=publicationInfo.record></schema2jsonld> <schema2jsonld *ngIf="publicationInfo.record" [data]=publicationInfo.record></schema2jsonld>
<showTitle [title]="publicationInfo.title"></showTitle> <showTitle [titleName]="publicationInfo.title"></showTitle>
<span *ngIf="publicationInfo.types.length > 0"class="uk-label custom-label label-blue label-publication" title="Type">{{publicationInfo.types.join(", ")}}</span> <span *ngIf="publicationInfo.types && publicationInfo.types.length > 0"class="uk-label custom-label label-blue label-publication" title="Type">{{publicationInfo.types.join(", ")}}</span>
<span *ngIf="publicationInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{publicationInfo.languages.join(", ")}}</span> <span *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{publicationInfo.languages.join(", ")}}</span>
<span *ngIf="publicationInfo.title && publicationInfo.title.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.title.accessMode "><!--span [class]="publicationInfo.title.accessMode" -->{{publicationInfo.title.accessMode}}<!--/span--></span> <span *ngIf="publicationInfo.countries && publicationInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{publicationInfo.countries.join(", ")}}</span>
<!-- <span *ngIf="publicationInfo.title && publicationInfo.title.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.title.accessMode ">{{publicationInfo.title.accessMode}}</span> -->
<span *ngIf="publicationInfo.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.accessMode " title="Access Mode">{{publicationInfo.accessMode}}</span>
<span *ngIf="publicationInfo.underCurationMessage" class="uk-label custom-label label-underCuration" > <span *ngIf="publicationInfo.underCurationMessage" class="uk-label custom-label label-underCuration" >
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"

View File

@ -128,18 +128,24 @@ export class PublicationComponent {
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.publicationInfo = null;
this.infoSub = this._publicationService.getPublicationInfo(this.articleId, this.properties).subscribe( this.infoSub = this._publicationService.getPublicationInfo(this.articleId, this.properties).subscribe(
data => { data => {
this.publicationInfo = data; this.publicationInfo = data;
// this.result = [] // this.result = []
// this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestaccessright, embargoEndDate: ''}; // this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestaccessright, embargoEndDate: ''};
if(this.publicationInfo.title.name != undefined && this.publicationInfo.title.name!= ''){ /*if(this.publicationInfo.title.name != undefined && this.publicationInfo.title.name!= ''){
this.updateTitle(this.publicationInfo.title.name); this.updateTitle(this.publicationInfo.title.name);
this.updateDescription("Dataset, search, repositories, open access,"+this.publicationInfo.title.name); this.updateDescription("Dataset, search, repositories, open access,"+this.publicationInfo.title.name);
}*/
if(this.publicationInfo.title){
this.updateTitle(this.publicationInfo.title);
this.updateDescription("Dataset, search, repositories, open access,"+this.publicationInfo.title);
} }
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, this.publicationInfo.title.name, this.piwikSiteId).subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, this.publicationInfo.title/*.name*/, this.piwikSiteId).subscribe();
} }
let bioentitiesNum = 0; let bioentitiesNum = 0;
@ -158,7 +164,7 @@ export class PublicationComponent {
} }
this.relatedResearchResultsNum = relatedResearchResultsNum; this.relatedResearchResultsNum = relatedResearchResultsNum;
this.result = {id: this.articleId, type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.title.accessMode, embargoEndDate: ''}; this.result = {id: this.articleId, type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: /*this.publicationInfo.title.accessMode*/this.publicationInfo.accessMode, embargoEndDate: ''};
// this.result.push(result_); // this.result.push(result_);
if(this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) { if(this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) {

View File

@ -44,7 +44,8 @@ export class PublicationService {
res[1]['oaf:result']['context'], res[1]['oaf:result']['context'],
res[0], res[0],
res[1]['oaf:result']['creator'], res[1]['oaf:result']['creator'],
res[2] res[2],
res[1]['oaf:result']['country'],
]) ])
.map(res => this.parsePublicationInfo(res)); .map(res => this.parsePublicationInfo(res));
} }
@ -72,6 +73,7 @@ export class PublicationService {
this.publicationInfo.embargoEndDate = data[0].embargoenddate; this.publicationInfo.embargoEndDate = data[0].embargoenddate;
} }
/*
this.publicationInfo.title = {"name": "", "url": "", "accessMode": ""}; this.publicationInfo.title = {"name": "", "url": "", "accessMode": ""};
if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) { if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.publicationInfo.title.accessMode = data[0]['bestaccessright'].classid; this.publicationInfo.title.accessMode = data[0]['bestaccessright'].classid;
@ -84,6 +86,17 @@ export class PublicationService {
this.publicationInfo.title['name'] = data[1].content; this.publicationInfo.title['name'] = data[1].content;
} }
} }
*/
if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.publicationInfo.accessMode = data[0]['bestaccessright'].classid;
}
if(data[1] != null) {
if(Array.isArray(data[1])) {
this.publicationInfo.title = data[1][0].content;
} else {
this.publicationInfo.title = data[1].content;
}
}
if(data[2] != null) { if(data[2] != null) {
let relation; let relation;
@ -145,7 +158,7 @@ export class PublicationService {
/**********************************************************/ /**********************************************************/
if(instance.hasOwnProperty("hostedby")) { if(instance.hasOwnProperty("hostedby")) {
counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.publicationInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.publicationInfo.title); counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.publicationInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.publicationInfo.title*/, this.publicationInfo.accessMode);
} }
/**********************************************************/ /**********************************************************/
} }
@ -177,6 +190,9 @@ export class PublicationService {
if(data[6] != null) { if(data[6] != null) {
this.publicationInfo.languages = this.parsingFunctions.parseLanguages(data[6]); this.publicationInfo.languages = this.parsingFunctions.parseLanguages(data[6]);
} }
if(data[15] != null) {
this.publicationInfo.countries = this.parsingFunctions.parseCountries(data[15]);
}
if(data[7] != null) { if(data[7] != null) {
let subjectResults: [string[], Map<string, string[]>, Map<string, string[]>] = this.parsingFunctions.parseAllSubjects(data[7]); let subjectResults: [string[], Map<string, string[]>, Map<string, string[]>] = this.parsingFunctions.parseAllSubjects(data[7]);
@ -195,8 +211,8 @@ export class PublicationService {
this.publicationInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( this.publicationInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
this.publicationInfo.hostedBy_collectedFrom, this.publicationInfo.publisher, this.publicationInfo.hostedBy_collectedFrom, this.publicationInfo.publisher,
this.publicationInfo.journal, this.publicationInfo.identifiers, this.publicationInfo.journal, this.publicationInfo.identifiers/*,
this.publicationInfo.title); this.publicationInfo.title*/);
if(data[10] != null) { if(data[10] != null) {
this.publicationInfo.references = this.parseReferences(data[10]); this.publicationInfo.references = this.parseReferences(data[10]);

View File

@ -11,10 +11,13 @@
<div *ngIf="softwareInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="softwareInfo != null" uk-grid class="uk-grid-large">
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="softwareInfo.record" [data]=softwareInfo.record></schema2jsonld> <schema2jsonld *ngIf="softwareInfo.record" [data]=softwareInfo.record></schema2jsonld>
<showTitle [title]="softwareInfo.title"></showTitle> <showTitle [titleName]="softwareInfo.title"></showTitle>
<span *ngIf="softwareInfo.types.length > 0"class="uk-label custom-label label-software " title="Type">{{softwareInfo.types.join(", ")}}</span> <span *ngIf="softwareInfo.types && softwareInfo.types.length > 0"class="uk-label custom-label label-software " title="Type">{{softwareInfo.types.join(", ")}}</span>
<span *ngIf="softwareInfo.programmingLanguages && softwareInfo.programmingLanguages.length > 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{softwareInfo.programmingLanguages.join(", ")}}</span>
<span *ngIf="softwareInfo.languages && softwareInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{softwareInfo.languages.join(", ")}}</span> <span *ngIf="softwareInfo.languages && softwareInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{softwareInfo.languages.join(", ")}}</span>
<span *ngIf="softwareInfo.title && softwareInfo.title.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.title.accessMode " title="Access Mode">{{softwareInfo.title.accessMode}}</span> <span *ngIf="softwareInfo.countries && softwareInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{softwareInfo.countries.join(", ")}}</span>
<!-- <span *ngIf="softwareInfo.title && softwareInfo.title.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.title.accessMode " title="Access Mode">{{softwareInfo.title.accessMode}}</span> -->
<span *ngIf="softwareInfo.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.accessMode " title="Access Mode">{{softwareInfo.accessMode}}</span>
<span *ngIf="softwareInfo.underCurationMessage" class="uk-label custom-label label-underCuration " > <span *ngIf="softwareInfo.underCurationMessage" class="uk-label custom-label label-underCuration " >
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
title="{{buildCurationTooltip()}}"> title="{{buildCurationTooltip()}}">

View File

@ -114,19 +114,25 @@ export class SoftwareComponent {
this.errorMessage="" this.errorMessage=""
this.showLoading = true; this.showLoading = true;
this.softwareInfo = null;
this.infoSub = this._softwareService.getSoftwareInfo(id, this.properties).subscribe( this.infoSub = this._softwareService.getSoftwareInfo(id, this.properties).subscribe(
data => { data => {
this.softwareInfo = data; this.softwareInfo = data;
if(this.softwareInfo.title.name != undefined && this.softwareInfo.title.name!= ''){ /*if(this.softwareInfo.title.name != undefined && this.softwareInfo.title.name!= ''){
this.updateTitle(this.softwareInfo.title.name); this.updateTitle(this.softwareInfo.title.name);
this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title.name); this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title.name);
}*/
if(this.softwareInfo.title){
this.updateTitle(this.softwareInfo.title);
this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title);
} }
if( this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if( this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, this.softwareInfo.title.name, this.piwikSiteId).subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, this.softwareInfo.title/*.name*/, this.piwikSiteId).subscribe();
} }
this.result = [] this.result = []
this.result = {id: id, type :"software", source : "openaire", title: this.softwareInfo.title,url: '', result: '', accessRights: this.softwareInfo.title.accessMode, embargoEndDate: ''}; this.result = {id: id, type :"software", source : "openaire", title: this.softwareInfo.title,url: '', result: '', accessRights: /*this.softwareInfo.title.accessMode*/this.softwareInfo.accessMode, embargoEndDate: ''};
let relatedResearchResultsNum = 0; let relatedResearchResultsNum = 0;
if(this.softwareInfo.relatedResearchResults != undefined) { if(this.softwareInfo.relatedResearchResults != undefined) {

View File

@ -43,6 +43,8 @@ export class SoftwareService {
res[0], res[0],
res[1]['creator'], res[1]['creator'],
res[1]['language'], res[1]['language'],
res[1]['country'],
res[1]['programmingLanguage'],
res[2] res[2]
]).map(res => this.parseSoftwareInfo(res)); ]).map(res => this.parseSoftwareInfo(res));
} }
@ -56,7 +58,7 @@ export class SoftwareService {
parseSoftwareInfo (data: any):any { parseSoftwareInfo (data: any):any {
this.softwareInfo = new SoftwareInfo(); this.softwareInfo = new SoftwareInfo();
this.softwareInfo.record = data[12]; this.softwareInfo.record = data[14];
if(data[0] != null) { if(data[0] != null) {
var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
this.softwareInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; this.softwareInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
@ -69,6 +71,7 @@ export class SoftwareService {
} }
this.softwareInfo.embargoEndDate = data[0].embargoenddate; this.softwareInfo.embargoEndDate = data[0].embargoenddate;
} }
/*
this.softwareInfo.title = {"name": "", "url": "", "accessMode": ""}; this.softwareInfo.title = {"name": "", "url": "", "accessMode": ""};
if(data[0]['bestaccessright'] && data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) { if(data[0]['bestaccessright'] && data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.softwareInfo.title.accessMode = data[0]['bestaccessright'].classid; this.softwareInfo.title.accessMode = data[0]['bestaccessright'].classid;
@ -80,6 +83,17 @@ export class SoftwareService {
this.softwareInfo.title['name'] = data[1].content; this.softwareInfo.title['name'] = data[1].content;
} }
} }
*/
if(data[0]['bestaccessright'] && data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.softwareInfo.accessMode = data[0]['bestaccessright'].classid;
}
if(data[1] != null) {
if(Array.isArray(data[1])) {
this.softwareInfo.title = data[1][0].content;
} else {
this.softwareInfo.title = data[1].content;
}
}
if(data[2] != null) { if(data[2] != null) {
let relation; let relation;
@ -136,7 +150,7 @@ export class SoftwareService {
} }
if(instance.hasOwnProperty("hostedby")) { if(instance.hasOwnProperty("hostedby")) {
counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.softwareInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.softwareInfo.title); counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.softwareInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.softwareInfo.title*/, this.softwareInfo.accessMode);
} }
} }
} }
@ -157,7 +171,7 @@ export class SoftwareService {
// null argument is for journal // null argument is for journal
this.softwareInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( this.softwareInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
this.softwareInfo.hostedBy_collectedFrom, this.softwareInfo.publisher, this.softwareInfo.hostedBy_collectedFrom, this.softwareInfo.publisher,
null, this.softwareInfo.identifiers, this.softwareInfo.title); null, this.softwareInfo.identifiers/*, this.softwareInfo.title*/);
if(data[8] != null) { if(data[8] != null) {
this.softwareInfo.contexts = this.parsingFunctions.parseContexts(data[8]); this.softwareInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
@ -196,6 +210,13 @@ export class SoftwareService {
if(data[11] != null) { if(data[11] != null) {
this.softwareInfo.languages = this.parsingFunctions.parseLanguages(data[11]); this.softwareInfo.languages = this.parsingFunctions.parseLanguages(data[11]);
} }
if(data[12] != null) {
this.softwareInfo.countries = this.parsingFunctions.parseCountries(data[12]);
}
if(data[13] != null) {
this.softwareInfo.programmingLanguages = this.parsingFunctions.parseProgrammingLanguages(data[13]);
}
if(this.softwareInfo.relatedResearchResults) { if(this.softwareInfo.relatedResearchResults) {
let self = this; let self = this;

View File

@ -15,7 +15,9 @@
</a> </a>
</h4> </h4>
<span *ngIf="result.types && result.types.length > 0" [class]="'uk-label custom-label label-blue label-'+result.entityType" title="Type">{{result.types.join(", ")}}</span> <span *ngIf="result.types && result.types.length > 0" [class]="'uk-label custom-label label-blue label-'+result.entityType" title="Type">{{result.types.join(", ")}}</span>
<span *ngIf="result.programmingLanguages && result.programmingLanguages.length > 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{result.programmingLanguages.join(", ")}}</span>
<span *ngIf="result.languages && result.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{result.languages.join(", ")}}</span> <span *ngIf="result.languages && result.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{result.languages.join(", ")}}</span>
<span *ngIf="result.countriesForResults && result.countriesForResults.length > 0" class="uk-label custom-label label-country " title="Country">{{result.countriesForResults.join(", ")}}</span>
<span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span> <span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span>
<!-- <span *ngIf="result['funders'] && result['funders'].length > 0" class="uk-label custom-label label-funder " title="Funder"><span *ngFor="let funder of result['funders'] let i=index"> <!-- <span *ngIf="result['funders'] && result['funders'].length > 0" class="uk-label custom-label label-funder " title="Funder"><span *ngFor="let funder of result['funders'] let i=index">
@ -72,7 +74,7 @@
<span *ngIf="result['projects'].length > 15">...</span> <span *ngIf="result['projects'].length > 15">...</span>
</div> </div>
<div *ngIf="result.description != undefined && result.description != ''"> <div *ngIf="result.description">
<div class="text-justify descriptionText"> <div class="text-justify descriptionText">
{{result.description}} {{result.description}}
</div> </div>

View File

@ -33,6 +33,10 @@
</span> </span>
</div> </div>
<span *ngIf="result.types && result.types.length > 0" [class]="'uk-label custom-label label-blue label-'+result.entityType" title="Type">{{result.types.join(", ")}}</span>
<span *ngIf="result.programmingLanguages && result.programmingLanguages.length > 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{result.programmingLanguages.join(", ")}}</span>
<span *ngIf="result.languages && result.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{result.languages.join(", ")}}</span>
<span *ngIf="result.countriesForResults && result.countriesForResults.length > 0" class="uk-label custom-label label-country " title="Country">{{result.countriesForResults.join(", ")}}</span>
<span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span> <span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span>
<span *ngIf="result['funderShortname']" class="uk-label custom-label label-funder " title="Funder">{{result['funderShortname']}}</span> <span *ngIf="result['funderShortname']" class="uk-label custom-label label-funder " title="Funder">{{result['funderShortname']}}</span>
<span *ngIf="result.openAccessMandate != undefined && result.openAccessMandate " class="uk-label custom-label label-openaccessmandate " title="Open Access mandate">Open Access mandate</span> <span *ngIf="result.openAccessMandate != undefined && result.openAccessMandate " class="uk-label custom-label label-openaccessmandate " title="Open Access mandate">Open Access mandate</span>

View File

@ -133,20 +133,20 @@ export class SearchDatasetsService {
var result: SearchResult = new SearchResult(); var result: SearchResult = new SearchResult();
result.entityType = "dataset"; result.entityType = "dataset";
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
result.types = new Array<string>(); result.types = new Array<string>();
let types = new Set<string>(); let types = new Set<string>();
let counter = 0;
let instance;
let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1; let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1;
let instance;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance']; instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance'];
this.parsingFunctions.parseTypes(result.types, types, instance); this.parsingFunctions.parseTypes(result.types, types, instance);
} }
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
if(!Array.isArray(resData['language'])) { if(!Array.isArray(resData['language'])) {
if(resData['language'].classname != "Undetermined" && resData['language'].classname) { if(resData['language'].classname != "Undetermined" && resData['language'].classname) {
result.languages.push(resData['language'].classname); result.languages.push(resData['language'].classname);
@ -159,6 +159,22 @@ export class SearchDatasetsService {
} }
} }
} }
if(resData['country'] && resData['country'] != null) {
result.countriesForResults = new Array<string>();
if(!Array.isArray(resData['country'])) {
if(resData['country'].classname != "Undetermined" && resData['country'].classname) {
result.countriesForResults.push(resData['country'].classname);
}
} else {
for(let i=0; i<resData['country'].length; i++) {
if(resData['country'][i].classname != "Undetermined" && resData['country'][i].classname) {
result.countriesForResults.push(resData['country'][i].classname);
}
}
}
}
result['title'] = {"name": '', "accessMode": '', "sc39": ''}; result['title'] = {"name": '', "accessMode": '', "sc39": ''};
if(Array.isArray(resData['title'])) { if(Array.isArray(resData['title'])) {
@ -218,7 +234,7 @@ export class SearchDatasetsService {
} else { } else {
result.description = resData.description[0]; result.description = resData.description[0];
} }
if(result.description.length > this.sizeOfDescription) { if(result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription)+"..."; result.description = result.description.substring(0, this.sizeOfDescription)+"...";
} }

View File

@ -163,20 +163,21 @@ export class SearchPublicationsService {
var result: SearchResult = new SearchResult(); var result: SearchResult = new SearchResult();
result.entityType = "publication"; result.entityType = "publication";
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
result.types = new Array<string>(); result.types = new Array<string>();
let types = new Set<string>(); let types = new Set<string>();
let counter = 0;
let instance; let instance;
let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1; let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance']; instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance'];
this.parsingFunctions.parseTypes(result.types, types, instance); this.parsingFunctions.parseTypes(result.types, types, instance);
} }
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
if(!Array.isArray(resData['language'])) { if(!Array.isArray(resData['language'])) {
if(resData['language'].classname != "Undetermined" && resData['language'].classname) { if(resData['language'].classname != "Undetermined" && resData['language'].classname) {
result.languages.push(resData['language'].classname); result.languages.push(resData['language'].classname);
@ -189,6 +190,23 @@ export class SearchPublicationsService {
} }
} }
} }
if(resData['country'] && resData['country'] != null) {
result.countriesForResults = new Array<string>();
if(!Array.isArray(resData['country'])) {
if(resData['country'].classname != "Undetermined" && resData['country'].classname) {
result.countriesForResults.push(resData['country'].classname);
}
} else {
for(let i=0; i<resData['country'].length; i++) {
if(resData['country'][i].classname != "Undetermined" && resData['country'][i].classname) {
result.countriesForResults.push(resData['country'][i].classname);
}
}
}
}
result['title'] = {"name": '', "accessMode": '', "sc39": ''}; result['title'] = {"name": '', "accessMode": '', "sc39": ''};
if(Array.isArray(resData['title'])) { if(Array.isArray(resData['title'])) {
@ -254,7 +272,7 @@ export class SearchPublicationsService {
result.description = resData.description[0]; result.description = resData.description[0];
} }
if(result.description.length > this.sizeOfDescription) { if(result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} }

View File

@ -133,20 +133,37 @@ export class SearchSoftwareService {
var result: SearchResult = new SearchResult(); var result: SearchResult = new SearchResult();
result.entityType = "software"; result.entityType = "software";
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
result.types = new Array<string>(); result.types = new Array<string>();
let types = new Set<string>(); let types = new Set<string>();
let counter = 0;
let instance; let instance;
let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1; let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance']; instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance'];
this.parsingFunctions.parseTypes(result.types, types, instance); this.parsingFunctions.parseTypes(result.types, types, instance);
} }
if(resData['programmingLanguage'] && resData['programmingLanguage'] != null) {
result.programmingLanguages = new Array<string>();
if(!Array.isArray(resData['programmingLanguage'])) {
if(resData['programmingLanguage'].classname != "Undetermined" && resData['programmingLanguage'].classname) {
result.programmingLanguages.push(resData['programmingLanguage'].classname);
}
} else {
for(let i=0; i<resData['programmingLanguage'].length; i++) {
if(resData['programmingLanguage'][i].classname != "Undetermined" && resData['programmingLanguage'][i].classname) {
result.programmingLanguages.push(resData['programmingLanguage'][i].classname);
}
}
}
}
if(resData['language'] && resData['language'] != null) {
result.languages = new Array<string>();
if(!Array.isArray(resData['language'])) { if(!Array.isArray(resData['language'])) {
if(resData['language'].classname != "Undetermined" && resData['language'].classname) { if(resData['language'].classname != "Undetermined" && resData['language'].classname) {
result.languages.push(resData['language'].classname); result.languages.push(resData['language'].classname);
@ -159,6 +176,22 @@ export class SearchSoftwareService {
} }
} }
} }
if(resData['country'] && resData['country'] != null) {
result.countriesForResults = new Array<string>();
if(!Array.isArray(resData['country'])) {
if(resData['country'].classname != "Undetermined" && resData['country'].classname) {
result.countriesForResults.push(resData['country'].classname);
}
} else {
for(let i=0; i<resData['country'].length; i++) {
if(resData['country'][i].classname != "Undetermined" && resData['country'][i].classname) {
result.countriesForResults.push(resData['country'][i].classname);
}
}
}
}
result['title'] = {"name": '', "accessMode": '', "sc39": ''}; result['title'] = {"name": '', "accessMode": '', "sc39": ''};
if(Array.isArray(resData['title'])) { if(Array.isArray(resData['title'])) {
@ -218,7 +251,7 @@ export class SearchSoftwareService {
} else { } else {
result.description = resData.description[0]; result.description = resData.description[0];
} }
if(result.description.length > this.sizeOfDescription) { if(result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription)+"..."; result.description = result.description.substring(0, this.sizeOfDescription)+"...";
} }

View File

@ -1,6 +1,8 @@
export class DatasetInfo { export class DatasetInfo {
underCurationMessage: boolean; underCurationMessage: boolean;
title: { "name": string, "url": string, "accessMode": string}; //title: { "name": string, "url": string, "accessMode": string};
title: string;
accessMode: string;
authors: string[]; authors: string[];
date: string; date: string;
dateofacceptance: string; dateofacceptance: string;
@ -13,6 +15,7 @@ export class DatasetInfo {
identifiers: Map<string, string[]>; identifiers: Map<string, string[]>;
publisher: string; publisher: string;
languages: string[]; languages: string[];
countries: string[];
subjects: string[]; subjects: string[];
otherSubjects: Map<string, string[]>; otherSubjects: Map<string, string[]>;
classifiedSubjects: Map<string, string[]>; classifiedSubjects: Map<string, string[]>;

View File

@ -1,6 +1,8 @@
export class PublicationInfo { export class PublicationInfo {
underCurationMessage: boolean; underCurationMessage: boolean;
title: { "name": string, "url": string, "accessMode": string}; //title: { "name": string, "url": string, "accessMode": string};
title: string;
accessMode: string;
authors: string[]; authors: string[];
date: string; date: string;
dateofacceptance: string; dateofacceptance: string;
@ -15,6 +17,7 @@ export class PublicationInfo {
publisher: string; publisher: string;
journal: {"journal": string, "issn": string, "lissn": string, "volume": string, "start_page": string, "end_page": string}; journal: {"journal": string, "issn": string, "lissn": string, "volume": string, "start_page": string, "end_page": string};
languages: string[]; languages: string[];
countries: string[];
subjects: string[]; subjects: string[];
otherSubjects: Map<string, string[]>; otherSubjects: Map<string, string[]>;
classifiedSubjects: Map<string, string[]>; //<class of subject, subjects> classifiedSubjects: Map<string, string[]>; //<class of subject, subjects>

View File

@ -31,8 +31,14 @@ export class SearchResult {
countries: string[]; countries: string[];
subjects: string[]; subjects: string[];
entityType: string; //publications & datasets & software
countriesForResults: string[];
languages: string[]; languages: string[];
//software
programmingLanguages: string[];
entityType: string;
types: string[]; types: string[];
openAccessMandate: boolean; openAccessMandate: boolean;
constructor(){} constructor(){}

View File

@ -1,6 +1,8 @@
export class SoftwareInfo { export class SoftwareInfo {
underCurationMessage: boolean; underCurationMessage: boolean;
title: { "name": string, "url": string, "accessMode": string}; //title: { "name": string, "url": string, "accessMode": string};
title: string;
accessMode: string;
authors: string[]; authors: string[];
date: string; date: string;
dateofacceptance: string; dateofacceptance: string;
@ -13,6 +15,7 @@ export class SoftwareInfo {
identifiers: Map<string, string[]>; identifiers: Map<string, string[]>;
publisher: string; publisher: string;
languages: string[]; languages: string[];
countries: string[];
subjects: string[]; subjects: string[];
otherSubjects: Map<string, string[]>; otherSubjects: Map<string, string[]>;
classifiedSubjects: Map<string, string[]>; classifiedSubjects: Map<string, string[]>;
@ -43,4 +46,6 @@ export class SoftwareInfo {
similarResearchResults: { "name": string, "id": string, "date": string, "percentage": number, "class": string}[]; // percentage is for similarity similarResearchResults: { "name": string, "id": string, "date": string, "percentage": number, "class": string}[]; // percentage is for similarity
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[]; contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
record; record;
//softwareType: string;
programmingLanguages: string[];
} }