[Library | Trunk]: Add dmps on project

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60614 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-10 13:24:19 +00:00
parent cca8a3c7f3
commit a9c25698dd
5 changed files with 880 additions and 752 deletions

View File

@ -1,23 +1,23 @@
<ng-template #share_research_results_box
let-dynamic_content="dynamic_content">
<ul class="uk-list uk-margin-remove-bottom">
<!-- class="uk-margin-top"-->
<!-- class="uk-margin-top"-->
<li>
<!-- <a class="clickable"-->
<!-- uk-toggle="target: #dynamic_content_id; animation:uk-animation-fade"><span-->
<!-- class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"-->
<!-- xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline-->
<!-- fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline-->
<!-- fill="none" stroke="#000" stroke-width="1.01"-->
<!-- points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML)</a>-->
<!-- hidden class="uk-margin-small-top"-->
<!-- <a class="clickable"-->
<!-- uk-toggle="target: #dynamic_content_id; animation:uk-animation-fade"><span-->
<!-- class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"-->
<!-- xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline-->
<!-- fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline-->
<!-- fill="none" stroke="#000" stroke-width="1.01"-->
<!-- points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML)</a>-->
<!-- hidden class="uk-margin-small-top"-->
<div id="dynamic_content_id">
<pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code
id="clipboard">{{dynamic_content}}</code></pre>
id="clipboard">{{dynamic_content}}</code></pre>
<div class="uk-grid uk-margin-small-top">
<a
class="clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1"
data-clipboard-target="#clipboard" title="Copy to clipboard">
class="clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1"
data-clipboard-target="#clipboard" title="Copy to clipboard">
<button class="uk-button uk-button-small uk-button-secondary uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1">
<rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect>
@ -39,17 +39,17 @@
<ng-template #download_research_results_box
let-type="type" let-fileName_type="fileName_type" let-csvParams="csvParams">
<ul class="uk-list uk-margin-remove-bottom">
<!-- class="uk-margin-top"-->
<!-- class="uk-margin-top"-->
<li>
<a class="clickable"
(click)="downloadHtmlFile(type, 'funder-'+fileName_type+'-report')">
<!-- target="_blank"-->
<!-- href="/project-report?projectId={{projectId}}&size={{fetch.searchUtils.totalResults}}&type={{type}}">-->
<!-- <span class="uk-icon">-->
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1">-->
<!-- <polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline>-->
<!-- <polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16"></polyline></svg>-->
<!-- </span>-->
<!-- target="_blank"-->
<!-- href="/project-report?projectId={{projectId}}&size={{fetch.searchUtils.totalResults}}&type={{type}}">-->
<!-- <span class="uk-icon">-->
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1">-->
<!-- <polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline>-->
<!-- <polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16"></polyline></svg>-->
<!-- </span>-->
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1">
<polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline>
@ -86,11 +86,12 @@
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
class="loading-gif uk-align-center"></span></div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
<div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
<div
class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo
[URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
type="project"></schema2jsonld>
@ -103,20 +104,25 @@
</landing-header>
<!-- Labels -->
<div class="uk-margin-top uk-margin-bottom">
<span *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets"
class="uk-label custom-label label-open" title="Open Access mandate for Publications and Research Data">
<span
*ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets"
class="uk-label custom-label label-open"
title="Open Access mandate for Publications and Research Data">
<span class="uk-visible@m">Open Access mandate for Publications and Research Data</span>
<span class="uk-hidden@m">Open Access mandate for ...</span>
</span>{{" "}}
<span *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && (projectInfo.openAccessMandateDatasets == undefined || !projectInfo.openAccessMandateDatasets)"
class="uk-label custom-label label-open" title="Open Access mandate for Publications">
<span
*ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && (projectInfo.openAccessMandateDatasets == undefined || !projectInfo.openAccessMandateDatasets)"
class="uk-label custom-label label-open" title="Open Access mandate for Publications">
Open Access mandate for Publications
</span>{{" "}}
<span *ngIf="projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets && (projectInfo.openAccessMandatePublications == undefined || !projectInfo.openAccessMandatePublications)"
class="uk-label custom-label label-open" title="Open Access mandate for Research Data">
<span
*ngIf="projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets && (projectInfo.openAccessMandatePublications == undefined || !projectInfo.openAccessMandatePublications)"
class="uk-label custom-label label-open" title="Open Access mandate for Research Data">
Open Access mandate for Research Data
</span>{{" "}}
<span *ngIf="projectInfo.funding && projectInfo.funding.funderName" class="uk-label custom-label label-funder" title="Funder">
<span *ngIf="projectInfo.funding && projectInfo.funding.funderName"
class="uk-label custom-label label-funder" title="Funder">
{{projectInfo.funding.funderName}}
</span>{{" "}}
<span *ngIf="projectInfo.specialClause39"
@ -172,7 +178,8 @@
<div class="uk-text-muted">Start Date</div>
<div>{{projectInfo.startDate | date: 'dd MMM yyyy'}}</div>
</span>
<span *ngIf="projectInfo.endDate" [class]="'uk-width-1-2 ' + (projectInfo.startDate ? 'uk-text-right' : '')">
<span *ngIf="projectInfo.endDate"
[class]="'uk-width-1-2 ' + (projectInfo.startDate ? 'uk-text-right' : '')">
<div class="uk-text-muted">End Date</div>
<div>{{projectInfo.endDate | date: 'dd MMM yyyy'}}</div>
</span>
@ -191,15 +198,17 @@
|| (projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets)">
<div>Open Access mandate</div>
<div>
<span *ngIf="projectInfo.openAccessMandatePublications != undefined && !projectInfo.openAccessMandatePublications"
class="uk-margin-right">
<span
*ngIf="projectInfo.openAccessMandatePublications != undefined && !projectInfo.openAccessMandatePublications"
class="uk-margin-right">
<span class="uk-text-muted">Publications: </span>
<!-- <span *ngIf="projectInfo.openAccessMandatePublications">Yes</span>-->
<!-- <span *ngIf="projectInfo.openAccessMandatePublications">Yes</span>-->
<span>No</span>
</span>
<span *ngIf="projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets">
<span
*ngIf="projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets">
<span class="uk-text-muted">Research Data: </span>
<!-- <span *ngIf="projectInfo.openAccessMandateDatasets">Yes</span>-->
<!-- <span *ngIf="projectInfo.openAccessMandateDatasets">Yes</span>-->
<span>No</span>
</span>
</div>
@ -210,27 +219,29 @@
<div class="uk-width-1-3@m uk-width-1-1@s uk-padding-remove">
<ul class="user-actions uk-list uk-card uk-card-default uk-padding">
<!-- NEW-->
<li><addThis></addThis></li>
<li>
<addThis></addThis>
</li>
<li *ngIf="isRouteAvailable('participate/direct-claim')">
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openLinkProjectModal()">
<span class="uk-icon-button portal-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="link"><path
fill="none" stroke="#000" stroke-width="1.1"
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path
fill="none" stroke="#000" stroke-width="1.1"
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path
fill="none" stroke="#000" stroke-width="1.1"
d="M7.925,11.875 L11.925,7.975"></path>
fill="none" stroke="#000" stroke-width="1.1"
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path
fill="none" stroke="#000" stroke-width="1.1"
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path
fill="none" stroke="#000" stroke-width="1.1"
d="M7.925,11.875 L11.925,7.975"></path>
</svg>
</span>
<span class="uk-margin-small-left">Link this project to...</span>
</a>
<modal-alert #linkProjectModal
[classTitle]="'landing-modal-header'" [classBody]="'uk-padding-remove landing-modal'">
<!-- <div class="uk-modal-title landing-modal-header">-->
<!-- <button class="uk-modal-close-default uk-float-right" (click)='linkProjectModal.cancel()' uk-close></button>-->
<!-- <h4 class="modal-title" id="myModalLabel">{{linkProjectModal.alertTitle}}</h4>-->
<!-- </div>-->
<!-- <div class="uk-modal-title landing-modal-header">-->
<!-- <button class="uk-modal-close-default uk-float-right" (click)='linkProjectModal.cancel()' uk-close></button>-->
<!-- <h4 class="modal-title" id="myModalLabel">{{linkProjectModal.alertTitle}}</h4>-->
<!-- </div>-->
<div class="uk-padding uk-padding-remove-vertical uk-margin-medium uk-text-center ">
<div>
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId, 'project','result'])"
@ -241,7 +252,7 @@
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
width="12" x="3.5" y="2.5"></rect><polyline
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
</button>
<div class="uk-margin-small-top">Research outcomes</div>
</a>
@ -250,8 +261,8 @@
</modal-alert>
</li>
<li *ngIf="isRouteAvailable('participate/deposit/learn-how')">
<a class="uk-link-text uk-text-bold uk-text-uppercase"
routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how">
<a class="uk-link-text uk-text-bold uk-text-uppercase"
routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how">
<span class="uk-icon uk-icon-button uk-button-secondary">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1">
<polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline>
@ -259,13 +270,14 @@
<line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line>
</svg>
</span>
<span class="uk-margin-small-left"><u>Deposit your research</u></span>
<span class="uk-margin-small-left"><u>Deposit your research</u></span>
</a>
</li>
<li>
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openShareResultsModal()">
<span class="uk-icon uk-icon-button uk-button-primary">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code"
ratio="1">
<polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline>
<polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16"></polyline>
</svg>
@ -274,7 +286,7 @@
</a>
<modal-alert #shareResultsModal
[classTitle]="'landing-modal-header'" [classBody]="'uk-padding-remove landing-modal'">
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-padding-small uk-padding-remove-vertical">
<mat-form-field class="matSelectionFormField uk-width-1-1">
<mat-label>Select content type to share</mat-label>
@ -282,7 +294,7 @@
[disableOptionCentering]="true"
panelClass="entitiesSelectionPanel"
class="matSelection">
<!-- <mat-option value="">Select content type</mat-option>-->
<!-- <mat-option value="">Select content type</mat-option>-->
<mat-option value="result">All research outcomes</mat-option>
<mat-option value="publication">Publications</mat-option>
<mat-option value="dataset">Research data</mat-option>
@ -302,7 +314,8 @@
<li>
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openDownloadReportModal()">
<span class="uk-icon uk-icon-button uk-button-primary">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download"
ratio="1">
<polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline>
<rect x="3" y="17" width="13" height="1"></rect>
<line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line>
@ -312,21 +325,21 @@
</a>
<modal-alert #downloadReportModal
[classTitle]="'landing-modal-header'" [classBody]="'uk-padding-remove landing-modal'">
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-padding-small uk-padding-remove-vertical">
<!-- *ngIf="projectInfo.funding &&-->
<!-- (fetchPublications.searchUtils.totalResults > 0 ||-->
<!-- fetchDatasets.searchUtils.totalResults > 0 ||-->
<!-- fetchSoftware.searchUtils.totalResults > 0 ||-->
<!-- fetchOrps.searchUtils.totalResults > 0)"-->
<!-- *ngIf="projectInfo.funding &&-->
<!-- (fetchPublications.searchUtils.totalResults > 0 ||-->
<!-- fetchDatasets.searchUtils.totalResults > 0 ||-->
<!-- fetchSoftware.searchUtils.totalResults > 0 ||-->
<!-- fetchOrps.searchUtils.totalResults > 0)"-->
<mat-form-field
class="matSelectionFormField uk-width-1-1">
class="matSelectionFormField uk-width-1-1">
<mat-label>Select content type report to download</mat-label>
<mat-select [(value)]="download_research_results_type"
[disableOptionCentering]="true"
panelClass="entitiesSelectionPanel"
class="matSelection">
<!-- <mat-option value="">Select content type</mat-option>-->
<!-- <mat-option value="">Select content type</mat-option>-->
<mat-option value="results"
[disabled]="!projectInfo.funding ||
(fetchPublications.searchUtils.totalResults == 0 &&
@ -398,55 +411,56 @@
</ul>
<!-- <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">-->
<!-- Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}-->
<!-- </div>-->
<!-- <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">-->
<!-- Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}-->
<!-- </div>-->
</div>
</div>
<div *ngIf="projectInfo != null">
<!-- *ngIf="numberOfTabs > 0; else loadingBlock"-->
<!-- *ngIf="numberOfTabs > 0; else loadingBlock"-->
<div class="main-tabs-div">
<ng-template #summary_tab>
<!-- <my-tab [tabTitle]="'Project Summary'" [tabId]="'summary'" [active]="true">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding uk-inline">
<!-- Description -->
<div *ngIf="!hasPrimaryInfo" class="uk-width-expand uk-padding">
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
No summary information available
</div>
</div>
<div *ngIf="hasPrimaryInfo" class="uk-margin-medium-bottom">
<div class="uk-text-muted">Description</div>
<div class="uk-text-justify uk-height-max-medium uk-overflow-auto">
<span>{{projectInfo.description.substring(0, showNumDescription)}}</span>
<span *ngIf="showNumDescription == thresholdDescription &&
projectInfo.description.length > thresholdDescription">...</span>
</div>
<div *ngIf="showNumDescription == thresholdDescription &&
projectInfo.description.length > thresholdDescription" class="uk-text-right">
<a (click)="showNumDescription = projectInfo.description.length;">
Read more
</a>
</div>
<div *ngIf="projectInfo.description && showNumDescription > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = thresholdDescription;">
Read less
</a>
</div>
<!-- <my-tab [tabTitle]="'Project Summary'" [tabId]="'summary'" [active]="true">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding uk-inline">
<!-- Description -->
<div *ngIf="!hasPrimaryInfo" class="uk-width-expand uk-padding">
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
No summary information available
</div>
</div>
<div *ngIf="hasSecondaryInfo" class="uk-padding uk-inline uk-width-1-3@m right-column">
<!-- Organizations -->
<div class="uk-text-muted">Partners</div>
<div class="uk-margin-medium-bottom">
<div class="uk-height-max-medium uk-overflow-auto">
<span *ngFor="let organization of projectInfo.organizations.slice(0, showNumOrganizations) let i=index"
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="organization.name">
<div *ngIf="hasPrimaryInfo" class="uk-margin-medium-bottom">
<div class="uk-text-muted">Description</div>
<div class="uk-text-justify uk-height-max-medium uk-overflow-auto">
<span>{{projectInfo.description.substring(0, showNumDescription)}}</span>
<span *ngIf="showNumDescription == thresholdDescription &&
projectInfo.description.length > thresholdDescription">...</span>
</div>
<div *ngIf="showNumDescription == thresholdDescription &&
projectInfo.description.length > thresholdDescription" class="uk-text-right">
<a (click)="showNumDescription = projectInfo.description.length;">
Read more
</a>
</div>
<div *ngIf="projectInfo.description && showNumDescription > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = thresholdDescription;">
Read less
</a>
</div>
</div>
</div>
<div *ngIf="hasSecondaryInfo" class="uk-padding uk-inline uk-width-1-3@m right-column">
<!-- Organizations -->
<div class="uk-text-muted">Partners</div>
<div class="uk-margin-medium-bottom">
<div class="uk-height-max-medium uk-overflow-auto">
<span
*ngFor="let organization of projectInfo.organizations.slice(0, showNumOrganizations) let i=index"
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="organization.name">
<a *ngIf="organization.id"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
[routerLink]="properties.searchLinkToOrganization.split('?')[0]">
@ -459,238 +473,270 @@
</span>
<span *ngIf="(i < projectInfo.organizations.length-1)">, </span>
</span>
<span *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"> ... </span>
</div>
<div *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"
class="uk-width-1-1 uk-text-right uk-margin-small-top">
<a (click)="showNumOrganizations = projectInfo.organizations.length;">
View all {{projectInfo.organizations.length | number}} organizations
</a>
</div>
<div *ngIf="showNumOrganizations > thresholdOrganizations"
class="uk-width-1-1 uk-text-right uk-margin-small-top">
<a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>
</div>
<span
*ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"> ... </span>
</div>
<div
*ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"
class="uk-width-1-1 uk-text-right uk-margin-small-top">
<a (click)="showNumOrganizations = projectInfo.organizations.length;">
View all {{projectInfo.organizations.length | number}} organizations
</a>
</div>
<div *ngIf="showNumOrganizations > thresholdOrganizations"
class="uk-width-1-1 uk-text-right uk-margin-small-top">
<a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>
</div>
</div>
<!--<div *ngIf="!hasPrimaryInfo && !hasSecondaryInfo"
class="uk-width-expand uk-padding">
</div>
<!--<div *ngIf="!hasPrimaryInfo && !hasSecondaryInfo"
class="uk-width-expand uk-padding">
&lt;!&ndash; <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">&ndash;&gt;
&lt;!&ndash; <span class="loading-gif uk-align-center" ></span>&ndash;&gt;
&lt;!&ndash; </div>&ndash;&gt;
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
No summary information available
</div>
</div>-->
</div>
<!-- </my-tab>-->
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
No summary information available
</div>
</div>-->
</div>
<!-- </my-tab>-->
</ng-template>
<ng-template #publications_tab>
<!-- <my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"-->
<!-- [tabId]="'publications'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchPublications" resultType="publication"
[params]="getParamsForSearchLink('publications')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test publications</div>-->
<!-- </div>-->
<!-- <my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"-->
<!-- [tabId]="'publications'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchPublications" resultType="publication"
[params]="getParamsForSearchLink('publications')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- </my-tab>-->
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test publications</div>-->
<!-- </div>-->
</div>
<!-- </my-tab>-->
</ng-template>
<ng-template #datasets_tab>
<!-- <my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"-->
<!-- [tabId]="'datasets'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchDatasets" resultType="dataset"
[params]="getParamsForSearchLink('datasets')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test research data</div>-->
<!-- </div>-->
<!-- <my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"-->
<!-- [tabId]="'datasets'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchDatasets" resultType="dataset"
[params]="getParamsForSearchLink('datasets')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- </my-tab>-->
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test research data</div>-->
<!-- </div>-->
</div>
<!-- </my-tab>-->
</ng-template>
<ng-template #software_tab>
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchSoftware" resultType="software"
[params]="getParamsForSearchLink('software')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test software</div>-->
<!-- </div>-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchSoftware" resultType="software"
[params]="getParamsForSearchLink('software')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test software</div>-->
<!-- </div>-->
</div>
</ng-template>
<ng-template #other_tab>
<!-- <my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"-->
<!-- [tabId]="'other'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchOrps" resultType="other"
[params]="getParamsForSearchLink('other')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test other research products</div>-->
<!-- </div>-->
<!-- <my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"-->
<!-- [tabId]="'other'">-->
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<search-tab [fetch]="fetchOrps" resultType="other"
[params]="getParamsForSearchLink('other')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
<!-- </my-tab>-->
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
<!-- <div>test other research products</div>-->
<!-- </div>-->
</div>
<!-- </my-tab>-->
</ng-template>
<ng-template #dmps_tab>
<div class="uk-padding">
<div class="uk-alert uk-alert-primary uk-margin-top">
<span *ngIf="fetchDmps.searchUtils.totalResults == 0">No Data Management Plans (DMPs) available. </span>
<span>Link existing DMPs with this project or start a new DMP in <a href="https://argos.openaire.eu/splash/" target="_blank">Argos</a>.</span>
</div>
<search-tab [fetch]="fetchDmps" customTitle="Data Management Plans"
[params]="getParamsForSearchLink('publications', 'Data Management Plan')"
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
[properties]="properties">
</search-tab>
</div>
</ng-template>
<ng-template #statistics_tab>
<!-- <my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0-->
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"-->
<!-- [tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'">-->
<div class="">
<div class="uk-width-expand uk-padding">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
<!-- <my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0-->
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"-->
<!-- [tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'">-->
<div class="">
<div class="uk-width-expand uk-padding">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
fetchSoftware.searchUtils.status, fetchOrps.searchUtils.status]"
[type]="'statistics'" tab_error_class=true></errorMessages>
[type]="'statistics'" tab_error_class=true></errorMessages>
<div
<div
*ngIf="statsClicked &&
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)"
class="uk-grid uk-child-width-1-1 uk-child-width-1-2@m">
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Produced research
outcomes per year</div>
<i-frame [url]=chartScientificResultsUrl></i-frame>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Produced
research
outcomes per year
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Access mode of research
outcomes</div>
<i-frame [url]=chartAccessModeUrl></i-frame>
<i-frame [url]=chartScientificResultsUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Access mode of
research
outcomes
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Research outcomes per datasource</div>
<i-frame [url]=chartDatasourcesUrl></i-frame>
<i-frame [url]=chartAccessModeUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Research
outcomes per datasource
</div>
<i-frame [url]=chartDatasourcesUrl></i-frame>
</div>
</div>
</div>
<!-- </my-tab>-->
</div>
<!-- </my-tab>-->
</ng-template>
<!-- [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''"-->
<!-- [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''"-->
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
<!-- [class]="(firstTab === 'summary')?'uk-active':''">-->
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
<!-- [class]="(firstTab === 'summary')?'uk-active':''">-->
<my-tab
tabTitle="Summary" [tabId]="'summary'"
class="uk-active">
tabTitle="Summary" [tabId]="'summary'"
class="uk-active">
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
<my-tab
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'">
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'">
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
<my-tab
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'" >
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'">
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
<my-tab
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'" >
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'">
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
<my-tab
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'" >
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'">
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
</my-tab>
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
<my-tab
[tabTitle]="'Dmps'" [tabNumber]="fetchDmps.searchUtils.totalResults"
[tabId]="'dmps'">
<ng-container *ngTemplateOutlet="dmps_tab;"></ng-container>
</my-tab>
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
>
>
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
</my-tab>
</my-tabs>
<!-- *ngIf="numberOfTabs > 2"-->
<!-- *ngIf="numberOfTabs > 2"-->
<my-small-tabs (selectedActiveTab)="onSelectActiveTab($event)">
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
<my-tab
tabTitle="Summary" [tabId]="'summary'"
class="uk-active">
tabTitle="Summary" [tabId]="'summary'"
class="uk-active">
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
<my-tab
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'">
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'">
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
<my-tab
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'" >
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'">
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
<my-tab
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'" >
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'">
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
</my-tab>
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
<my-tab
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'" >
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'">
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
</my-tab>
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
<my-tab
[tabTitle]="'Dmps'" [tabNumber]="fetchDmps.searchUtils.totalResults"
[tabId]="'dmps'">
<ng-container *ngTemplateOutlet="dmps_tab;"></ng-container>
</my-tab>
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
>
>
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
</my-tab>
</my-small-tabs>
</div>
<!-- <ng-template #loadingBlock>-->
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
<!-- <span class="loading-gif uk-align-center" ></span>-->
<!-- </div>-->
<!-- </ng-template>-->
<!-- <ng-template #loadingBlock>-->
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
<!-- <span class="loading-gif uk-align-center" ></span>-->
<!-- </div>-->
<!-- </ng-template>-->
<div class="uk-margin-small-top uk-flex">
<!-- Last Index Info-->
<div class="uk-width-2-3@m uk-width-1-2">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a
href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>
@ -704,48 +750,52 @@
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
<!-- Statistics -->
<modal-alert *ngIf="projectInfo &&
<!-- Statistics -->
<modal-alert *ngIf="projectInfo &&
(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
<landing-header [properties]="properties" [title]="projectName"
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
[entityType]="'project'"
[startDate]="projectInfo.startDate"
[endDate]="projectInfo.endDate"
[status]="projectInfo.status">
</landing-header>
<div class="uk-margin-medium-top uk-margin-medium-right">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
<landing-header [properties]="properties" [title]="projectName"
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
[entityType]="'project'"
[startDate]="projectInfo.startDate"
[endDate]="projectInfo.endDate"
[status]="projectInfo.status">
</landing-header>
<div class="uk-margin-medium-top uk-margin-medium-right">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
fetchSoftware.searchUtils.status, fetchOrps.searchUtils.status]"
[type]="'statistics'" tab_error_class=true></errorMessages>
[type]="'statistics'" tab_error_class=true></errorMessages>
<div
*ngIf="statsClicked &&
<div
*ngIf="statsClicked &&
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Produced research
outcomes per year</div>
<i-frame [url]=chartScientificResultsUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Access mode of research
outcomes</div>
<i-frame [url]=chartAccessModeUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Research outcomes per datasource</div>
<i-frame [url]=chartDatasourcesUrl></i-frame>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Produced research
outcomes per year
</div>
<i-frame [url]=chartScientificResultsUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Access mode of research
outcomes
</div>
<i-frame [url]=chartAccessModeUrl></i-frame>
</div>
<div class="uk-padding uk-padding-remove-top">
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Research outcomes per
datasource
</div>
<i-frame [url]=chartDatasourcesUrl></i-frame>
</div>
</div>
</div>
</div>
</modal-alert>
</modal-alert>
</div>
</div>
</div>
<feedback *ngIf="projectInfo" [projectInfo]="projectInfo"
[properties]="properties" [entityType]="'project'" [title]="projectName" [fields]="feedbackFields"
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>

View File

@ -86,6 +86,7 @@ export class ProjectComponent {
private reloadDatasets: boolean = true;
private reloadSoftware: boolean = true;
private reloadOrps: boolean = true;
private reloadDmps: boolean = true;
// Variables for entity selections on the right column
public share_research_results_type: string = "results";
@ -96,6 +97,7 @@ export class ProjectComponent {
public fetchDatasets: FetchResearchResults;
public fetchSoftware: FetchResearchResults;
public fetchOrps: FetchResearchResults;
public fetchDmps: FetchResearchResults;
public searchNumber: number = 5;
public routerHelper: RouterHelper = new RouterHelper();
@ -159,7 +161,7 @@ export class ProjectComponent {
this.fetchDatasets = new FetchResearchResults(this._searchResearchResultsService);
this.fetchSoftware = new FetchResearchResults(this._searchResearchResultsService);
this.fetchOrps = new FetchResearchResults(this._searchResearchResultsService);
this.fetchDmps = new FetchResearchResults(this._searchResearchResultsService);
var title = "Project";
var description = "";
@ -251,6 +253,7 @@ export class ProjectComponent {
this.fetchDatasets.getNumForEntity("dataset", "project", this.projectId, this.properties);
this.fetchSoftware.getNumForEntity("software", "project", this.projectId, this.properties);
this.fetchOrps.getNumForEntity("other", "project", this.projectId, this.properties);
this.searchDmps(1, this.searchNumber);
}
}
@ -263,7 +266,8 @@ export class ProjectComponent {
this.fetchDatasets.clearSubscriptions();
this.fetchPublications.clearSubscriptions();
this.fetchSoftware.clearSubscriptions();
this.fetchPublications.clearSubscriptions();
this.fetchOrps.clearSubscriptions();
this.fetchDmps.clearSubscriptions();
}
private createClipboard() {
@ -285,6 +289,17 @@ export class ProjectComponent {
}
this.reloadPublications = false;
}
public searchDmps(page: number, size: number) {
if (this.reloadDmps &&
(this.fetchDmps.searchUtils.status == this.errorCodes.LOADING ||
(this.fetchDmps.searchUtils.status == this.errorCodes.DONE && this.fetchDmps.searchUtils.totalResults > 0)
)
) {
this.fetchDmps.getDmps("project", this.projectId, page, size, this.properties);
}
this.reloadDmps = false;
}
public searchDatasets(page: number, size: number) {
if (this.reloadDatasets &&
@ -659,6 +674,9 @@ export class ProjectComponent {
} else if (activeTabId == 'statistics') {
this.activeTab = 'statistics';
this.statsClicked = true;
} else if (activeTabId == 'dmps') {
this.activeTab = 'dmps';
this.searchDmps(1, this.searchNumber);
}
}
}
@ -747,9 +765,13 @@ export class ProjectComponent {
HelperFunctions.scroll();
}
public getParamsForSearchLink(type: string = "") {
public getParamsForSearchLink(type: string = null, subtype: string = null) {
if(type) {
return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf', 'sortBy'], ['relprojectid', this.projectId, type, 'false', 'resultdateofacceptance,descending']);
if(subtype) {
return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'instancetypename', 'qf', 'sortBy'], ['relprojectid', this.projectId, type, subtype, 'false', 'resultdateofacceptance,descending']);
} else {
return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf', 'sortBy'], ['relprojectid', this.projectId, type, 'false', 'resultdateofacceptance,descending']);
}
} else {
return this.routerHelper.createQueryParams(['f0', 'fv0'], ['relprojectid', this.projectId]);
}

View File

@ -11,440 +11,451 @@ import {properties} from "../../../environments/environment";
@Injectable()
export class SearchResearchResultsService {
private sizeOfDescription: number = 270;
public parsingFunctions: ParsingFunctions = new ParsingFunctions();
constructor(private http: HttpClient ) {
private sizeOfDescription: number = 270;
public parsingFunctions: ParsingFunctions = new ParsingFunctions();
constructor(private http: HttpClient) {
}
search(resultType: string, params: string, refineParams: string, page: number, size: number, sortBy: string, refineFields: string[], properties: EnvProperties): any {
let link = properties.searchAPIURLLAst + this.getEntityName(resultType, true);
let url = link + "?";
if (params != null && params != '') {
url += params;
}
search (resultType:string, params: string, refineParams:string, page: number, size: number, sortBy: string, refineFields:string[] , properties:EnvProperties):any {
let link = properties.searchAPIURLLAst+this.getEntityName(resultType,true);
let url = link+"?";
if(params!= null && params != '' ) {
url += params;
}
if(refineParams!= null && refineParams != '' ) {
url += refineParams;
}
if(sortBy) {
url += "&sortBy=" + sortBy;
}
url += "&page="+(page-1)+"&size="+size+"&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]));
}
searchById (resultType:string, id: string, properties:EnvProperties ):any {
let url = properties.searchAPIURLLAst+this.getEntityName(resultType,true) +"/"+id+"?format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => this.parseResults(resultType, res, properties)));
}
searchAggregators (resultType:string, id: string, params: string, refineParams:string, page: number, size: number, properties:EnvProperties ):any {
let link = properties.searchAPIURLLAst+this.getEntityName(resultType,true);
let url = link+"?"+"&format=json";
if(params!= null && params != '' ) {
url += params;
}
if(refineParams!= null && refineParams != '' ) {
url += refineParams;
}
url += "&page="+(page-1)+"&size="+size;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => this.parseRefineResults(id, res['refineResults'])));
}
searchByListOfDOI (resultType:string, DOIs: string[], refineParams:string, page: number, size: number, refineFields:string[], properties:EnvProperties ):any {
let link = properties.searchAPIURLLAst+ this.getEntityName(resultType,true);
let url = link+"?"+"&format=json&";
var doisParams = "";
for(var i =0 ;i < DOIs.length; i++){
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
}
if(doisParams.length > 0){
url +="&"+doisParams;
}
if(refineParams!= null && refineParams != '' ) {
url += refineParams;
}
url += "&page="+(page-1)+"&size="+size;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]));
}
advancedSearch (resultType:string, params: string, page: number, size: number, sortBy: string, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null ):any {
let url = properties.searchResourcesAPIURL;
var basicQuery = "(oaftype exact result) and (resulttypeid exact "+this.getEntityName(resultType,false) + ") ";
url += "?query=";
if(params!= null && params != '' ) {
url +=" ( "+basicQuery+ " ) " +" and (" + params + ")";
}else{
url +=" ( "+basicQuery+ " ) ";
}
if(refineParams!= null && refineParams != '' ) {
url += refineParams;
}
if(sortBy) {
let sortOptions = sortBy.split(",");
url += "sortBy "+sortOptions[0]+"/sort."+sortOptions[1]+" ";
}
if(refineQuery) {
url += "&" + refineQuery;
}
url += "&page="+(page-1)+"&size="+size;
url += "&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]));
}
advancedSearchResults (resultType:string, params: string, page: number, size: number, sortBy: string, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null ):any {
let url = properties.searchAPIURLLAst+"resources2/?format=json";
if(params!= null && params != '' ) {
url +="&query=(" + params + ")";
}
if(sortBy) {
let sortOptions = sortBy.split(",");
url += (params ? " " : "&query=(*) ")+"sortBy "+sortOptions[0]+"/sort."+sortOptions[1]+(params ? " " : " ");
}
if(refineParams!= null && refineParams != '' ) {
if (refineParams != null && refineParams != '') {
url += refineParams;
}
if(refineQuery) {
if (sortBy) {
url += "&sortBy=" + sortBy;
}
url += "&page=" + (page - 1) + "&size=" + size + "&format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
}
searchById(resultType: string, id: string, properties: EnvProperties): any {
let url = properties.searchAPIURLLAst + this.getEntityName(resultType, true) + "/" + id + "?format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => this.parseResults(resultType, res, properties)));
}
searchAggregators(resultType: string, id: string, params: string, refineParams: string, page: number, size: number, properties: EnvProperties): any {
let link = properties.searchAPIURLLAst + this.getEntityName(resultType, true);
let url = link + "?" + "&format=json";
if (params != null && params != '') {
url += params;
}
if (refineParams != null && refineParams != '') {
url += refineParams;
}
url += "&page=" + (page - 1) + "&size=" + size;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => this.parseRefineResults(id, res['refineResults'])));
}
searchByListOfDOI(resultType: string, DOIs: string[], refineParams: string, page: number, size: number, refineFields: string[], properties: EnvProperties): any {
let link = properties.searchAPIURLLAst + this.getEntityName(resultType, true);
let url = link + "?" + "&format=json&";
var doisParams = "";
for (var i = 0; i < DOIs.length; i++) {
doisParams += (doisParams.length > 0 ? "&" : "") + 'doi="' + DOIs[i] + '"';
}
if (doisParams.length > 0) {
url += "&" + doisParams;
}
if (refineParams != null && refineParams != '') {
url += refineParams;
}
url += "&page=" + (page - 1) + "&size=" + size;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
}
advancedSearch(resultType: string, params: string, page: number, size: number, sortBy: string, properties: EnvProperties, refineParams: string = null, refineFields: string[] = null, refineQuery: string = null): any {
let url = properties.searchResourcesAPIURL;
var basicQuery = "(oaftype exact result) and (resulttypeid exact " + this.getEntityName(resultType, false) + ") ";
url += "?query=";
if (params != null && params != '') {
url += " ( " + basicQuery + " ) " + " and (" + params + ")";
} else {
url += " ( " + basicQuery + " ) ";
}
if (refineParams != null && refineParams != '') {
url += refineParams;
}
if (sortBy) {
let sortOptions = sortBy.split(",");
url += "sortBy " + sortOptions[0] + "/sort." + sortOptions[1] + " ";
}
if (refineQuery) {
url += "&" + refineQuery;
}
url += "&page="+(page-1)+"&size="+size;
// url += "&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]));
url += "&page=" + (page - 1) + "&size=" + size;
url += "&format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
}
searchResultForEntity (resultType:string, params: string, page: number, size: number, properties:EnvProperties):any {
let link = properties.searchAPIURLLAst;
//let url = link+params+"/"+this.getEntityName(resultType,true)+ "?format=json";
//url += "&page="+(page-1)+"&size="+size;
//url += "&sortBy=resultdateofacceptance,descending";
//let url = link+"/resources2?format=json&query="+params+" sortBy resultdateofacceptance/sort.descending&type="+this.getEntityName(resultType,true);
let url = link+"/"+this.getEntityName(resultType,true);
url += "?format=json";
url += "&fq="+params;
url += "&sortBy=resultdateofacceptance,descending";
url += "&page="+(page-1)+"&size="+size;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
advancedSearchResults(resultType: string, params: string, page: number, size: number, sortBy: string, properties: EnvProperties, refineParams: string = null, refineFields: string[] = null, refineQuery: string = null): any {
let url = properties.searchAPIURLLAst + "resources2/?format=json";
if (params != null && params != '') {
url += "&query=(" + params + ")";
}
//???? why different from above?
searchForDataproviders(resultType:string, params: string, page: number, size: number, properties:EnvProperties):any {
let link = properties.searchAPIURLLAst;
let url = link+params;
url += "&sortBy=resultdateofacceptance,descending";
url += "&page="+(page-1)+"&size="+size + "&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
if (sortBy) {
let sortOptions = sortBy.split(",");
url += (params ? " " : "&query=(*) ") + "sortBy " + sortOptions[0] + "/sort." + sortOptions[1] + (params ? " " : " ");
}
searchForMyOrcidLinks (resultType:string, orcidQuery: string, typeQuery: string, page: number, size: number):any {
let url = properties.searchAPIURLLAst+"resources2/?format=json";
if(orcidQuery!= null && orcidQuery != '' ) {
url +="&query=(" + orcidQuery + ")";
if (refineParams != null && refineParams != '') {
url += refineParams;
}
url += typeQuery;
url += "&page="+(page-1)+"&size="+size;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
if (refineQuery) {
url += "&" + refineQuery;
}
url += "&page=" + (page - 1) + "&size=" + size;
// url += "&format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
}
searchResultForEntity(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any {
let link = properties.searchAPIURLLAst;
//let url = link+params+"/"+this.getEntityName(resultType,true)+ "?format=json";
//url += "&page="+(page-1)+"&size="+size;
//url += "&sortBy=resultdateofacceptance,descending";
//let url = link+"/resources2?format=json&query="+params+" sortBy resultdateofacceptance/sort.descending&type="+this.getEntityName(resultType,true);
let url = link + "/" + this.getEntityName(resultType, true);
url += "?format=json";
url += "&fq=" + params;
url += "&sortBy=resultdateofacceptance,descending";
url += "&page=" + (page - 1) + "&size=" + size;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
}
parseResults(resultType:string, data: any, properties: EnvProperties): SearchResult[] {
let results: SearchResult[] = [];
let length = Array.isArray(data) ? data.length : 1;
for(let i=0; i<length; i++) {
let resData = Array.isArray(data) ? data[i]['result']['metadata']['oaf:entity']['oaf:result'] : data['result']['metadata']['oaf:entity']['oaf:result'];
var result: SearchResult = new SearchResult();
if(resData['resulttype']) {
result.entityType = resData['resulttype']['classname'];
} else {
result.entityType = resultType;
}
result.types = new Array<string>();
let types = new Set<string>();
let instance;
let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1;
for(let i=0; i<length; i++) {
instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance'];
this.parsingFunctions.parseTypes(result.types, types, instance);
}
/////////////////////////// Athena Code ///////////////////////////
if(resData['pid']) {
if(!Array.isArray(resData['pid'])) {
if(resData['pid'].classid && resData['pid'].classid == 'doi'){
if(resData['pid'].content != '' && resData['pid'].content != null){
result.DOIs.push(resData['pid'].content.replace("https://doi.org/",""));
}
}
} else {
for(let i=0; i<resData['pid'].length; i++){
if(resData['pid'][i].classid == 'doi'){
if(resData['pid'][i].content != '' && resData['pid'][i].content != null){
result.DOIs.push(resData['pid'][i].content.replace("https://doi.org/",""));
}
}
}
}
result.identifiers = this.parsingFunctions.parseIdentifiers(resData['pid']);
}
/////////////////////////// Athena Code ///////////////////////////
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(resData['language'].classname != "Undetermined" && resData['language'].classname) {
result.languages.push(resData['language'].classname);
}
} else {
for(let i=0; i<resData['language'].length; i++) {
if(resData['language'][i].classname != "Undetermined" && resData['language'][i].classname) {
result.languages.push(resData['language'][i].classname);
}
}
}
}
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": ''};
if(Array.isArray(resData['title'])) {
for(let i=0; i<resData['title'].length; i++) {
if(resData['title'][i] && resData['title'][i].content) {
if(!result.title.name || resData['title'][i].classid == "main title") {
result['title'].name = String(resData['title'][i].content);
}
if(resData['title'][i].classid == "main title") {
break;
}
}
}
if(!result.title.name) {
result['title'].name = "";
}
// result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : "";
} else {
result['title'].name = (resData['title'] && resData['title'].content) ? String(resData['title'].content) : "";
}
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
let canId = ParsingFunctions.parseRelCanonicalId(Array.isArray(data) ? data[i] : data, "result");
if(canId){
result['id'] = canId;
}
result['relcanId'] = result['id'];
if(resData['bestaccessright'] && resData['bestaccessright'].hasOwnProperty("classname")) {
result['title'].accessMode = resData['bestaccessright'].classname;
}
if(resData['rels'].hasOwnProperty("rel")) {
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
for(let j=0; j<relLength; j++) {
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "isProducedBy") {
result['projects'] = this.parseProjects(result['projects'], relation);
}
}
}
}
if(resData.hasOwnProperty("creator") && resData['creator'] != null) {
if(result['authors'] == undefined) {
result['authors'] = new Array<{"fullName": string, "orcid": string, "orcid_pending": string}>();
}
let authors = resData['creator'];
let length = Array.isArray(authors) ? authors.length : 1;
for(let i=0; i<length; i++) {
let author = Array.isArray(authors) ? authors[i] : authors;
if(author) {
result['authors'][author.rank] = {"fullName": author.content, "orcid": author.orcid, "orcid_pending": author.orcid_pending};
}
}
result.authors = result.authors.filter(function (item) {
return (item != undefined && item.fullName != undefined);
});
}
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
if(!Array.isArray(resData.description)) {
result.description = (resData.description) ? String(resData.description) : "";
} else {
result.description = (resData.description[0]) ? String(resData.description[0]) : "";
}
if(result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "...";
}
if(resData.embargoenddate && resData.embargoenddate != '') {
result.embargoEndDate = Dates.getDate(resData.embargoenddate);
}
if(!Array.isArray(resData.publisher)) {
result.publisher = resData.publisher;
} else {
for(let i=0; i<resData.publisher.length; i++) {
if(result.publisher != undefined){
result.publisher += ', '+resData['publisher'][i];
} else {
result.publisher = resData['publisher'][i];
}
}
}
results.push(result);
}
return results;
//???? why different from above?
searchForDataproviders(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any {
let link = properties.searchAPIURLLAst;
let url = link + params;
url += "&sortBy=resultdateofacceptance,descending";
url += "&page=" + (page - 1) + "&size=" + size + "&format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
}
searchForMyOrcidLinks(resultType: string, orcidQuery: string, typeQuery: string, page: number, size: number): any {
let url = properties.searchAPIURLLAst + "resources2/?format=json";
if (orcidQuery != null && orcidQuery != '') {
url += "&query=(" + orcidQuery + ")";
}
parseProjects(projects: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string }[], relation: any ) : {
"id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string }[] {
if(projects == undefined) {
projects = new Array<
{ "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string
}>();
}
let countProjects = projects.length;
projects[countProjects] = {
"id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "",
"code": ""
};
if(relation.title != 'unidentified') {
projects[countProjects]['id'] = relation['to'].content;
projects[countProjects]['acronym'] = relation.acronym;
projects[countProjects]['title'] = relation.title;
projects[countProjects]['code'] = relation.code;
url += typeQuery;
url += "&page=" + (page - 1) + "&size=" + size;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
}
parseResults(resultType: string, data: any, properties: EnvProperties): SearchResult[] {
let results: SearchResult[] = [];
let length = Array.isArray(data) ? data.length : 1;
for (let i = 0; i < length; i++) {
let resData = Array.isArray(data) ? data[i]['result']['metadata']['oaf:entity']['oaf:result'] : data['result']['metadata']['oaf:entity']['oaf:result'];
var result: SearchResult = new SearchResult();
if (resData['resulttype']) {
result.entityType = resData['resulttype']['classname'];
} else {
projects[countProjects]['id'] = "";
projects[countProjects]['acronym'] = "";
projects[countProjects]['title'] = "";
projects[countProjects]['code'] = "";
result.entityType = resultType;
}
if(relation.hasOwnProperty("funding")) {
let fundingLength = Array.isArray(relation['funding']) ? relation['funding'].length : 1;
for(let z=0; z<fundingLength; z++) {
let fundingData = Array.isArray(relation['funding']) ? relation['funding'][z] : relation['funding'];
if(fundingData.hasOwnProperty("funder")) {
projects[countProjects]['funderShortname'] = fundingData['funder'].shortname;
projects[countProjects]['funderName'] = fundingData['funder'].name;
}
}
result.types = new Array<string>();
let types = new Set<string>();
let instance;
let length = Array.isArray(resData['children']['instance']) ? resData['children']['instance'].length : 1;
for (let i = 0; i < length; i++) {
instance = Array.isArray(resData['children']['instance']) ? resData['children']['instance'][i] : resData['children']['instance'];
this.parsingFunctions.parseTypes(result.types, types, instance);
}
return projects;
}
parseRefineResults(id: string, data: any): any {
var results:any = [];
if(data.hasOwnProperty("resulthostingdatasource")) {
let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
for(let i=0; i<length; i++) {
let datasource = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'][i] : data['resulthostingdatasource'];
let result: {"name": string, "id": string, "count": number} = {"name": "", "id": "", "count": 0};
result['name'] = datasource.name;
result['id'] = datasource.id.split("||")[0];
result['count'] = datasource.count;
if(result['id'] != id && result['name'] != "Unknown Repository") {
results.push(result);
}
/////////////////////////// Athena Code ///////////////////////////
if (resData['pid']) {
if (!Array.isArray(resData['pid'])) {
if (resData['pid'].classid && resData['pid'].classid == 'doi') {
if (resData['pid'].content != '' && resData['pid'].content != null) {
result.DOIs.push(resData['pid'].content.replace("https://doi.org/", ""));
}
}
} else {
for (let i = 0; i < resData['pid'].length; i++) {
if (resData['pid'][i].classid == 'doi') {
if (resData['pid'][i].content != '' && resData['pid'][i].content != null) {
result.DOIs.push(resData['pid'][i].content.replace("https://doi.org/", ""));
}
}
}
}
return results;
result.identifiers = this.parsingFunctions.parseIdentifiers(resData['pid']);
}
/////////////////////////// Athena Code ///////////////////////////
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 (resData['language'].classname != "Undetermined" && resData['language'].classname) {
result.languages.push(resData['language'].classname);
}
} else {
for (let i = 0; i < resData['language'].length; i++) {
if (resData['language'][i].classname != "Undetermined" && resData['language'][i].classname) {
result.languages.push(resData['language'][i].classname);
}
}
}
}
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": ''};
if (Array.isArray(resData['title'])) {
for (let i = 0; i < resData['title'].length; i++) {
if (resData['title'][i] && resData['title'][i].content) {
if (!result.title.name || resData['title'][i].classid == "main title") {
result['title'].name = String(resData['title'][i].content);
}
if (resData['title'][i].classid == "main title") {
break;
}
}
}
if (!result.title.name) {
result['title'].name = "";
}
// result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : "";
} else {
result['title'].name = (resData['title'] && resData['title'].content) ? String(resData['title'].content) : "";
}
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
let canId = ParsingFunctions.parseRelCanonicalId(Array.isArray(data) ? data[i] : data, "result");
if (canId) {
result['id'] = canId;
}
result['relcanId'] = result['id'];
if (resData['bestaccessright'] && resData['bestaccessright'].hasOwnProperty("classname")) {
result['title'].accessMode = resData['bestaccessright'].classname;
}
if (resData['rels'].hasOwnProperty("rel")) {
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
for (let j = 0; j < relLength; j++) {
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
if (relation.hasOwnProperty("to")) {
if (relation['to'].class == "isProducedBy") {
result['projects'] = this.parseProjects(result['projects'], relation);
}
}
}
}
if (resData.hasOwnProperty("creator") && resData['creator'] != null) {
if (result['authors'] == undefined) {
result['authors'] = new Array<{ "fullName": string, "orcid": string, "orcid_pending": string }>();
}
let authors = resData['creator'];
let length = Array.isArray(authors) ? authors.length : 1;
for (let i = 0; i < length; i++) {
let author = Array.isArray(authors) ? authors[i] : authors;
if (author) {
result['authors'][author.rank] = {
"fullName": author.content,
"orcid": author.orcid,
"orcid_pending": author.orcid_pending
};
}
}
result.authors = result.authors.filter(function (item) {
return (item != undefined && item.fullName != undefined);
});
}
var date: string = (resData.dateofacceptance) + ""; // transform to string in case it is an integer
result.year = (date && (date).indexOf('-') !== -1) ? date.split('-')[0] : date;
if (!Array.isArray(resData.description)) {
result.description = (resData.description) ? String(resData.description) : "";
} else {
result.description = (resData.description[0]) ? String(resData.description[0]) : "";
}
if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "...";
}
if (resData.embargoenddate && resData.embargoenddate != '') {
result.embargoEndDate = Dates.getDate(resData.embargoenddate);
}
if (!Array.isArray(resData.publisher)) {
result.publisher = resData.publisher;
} else {
for (let i = 0; i < resData.publisher.length; i++) {
if (result.publisher != undefined) {
result.publisher += ', ' + resData['publisher'][i];
} else {
result.publisher = resData['publisher'][i];
}
}
}
results.push(result);
}
private numOfResults(url: string, properties:EnvProperties): any {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.pipe(map(res => res['total']));
return results;
}
parseProjects(projects: {
"id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string
}[], relation: any): {
"id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string
}[] {
if (projects == undefined) {
projects = new Array<{
"id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"code": string
}>();
}
numOfEntityResults(resultType:string, id: string, entity: string, properties:EnvProperties):any {
var parameters: string = "";
parameters = this.getEntityName(entity, true) + "/"+id+"/"+this.getEntityName(resultType, true)+"/count";
let url = properties.searchAPIURLLAst+parameters+"?format=json";
return this.numOfResults(url , properties);
let countProjects = projects.length;
projects[countProjects] = {
"id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "",
"code": ""
};
if (relation.title != 'unidentified') {
projects[countProjects]['id'] = relation['to'].content;
projects[countProjects]['acronym'] = relation.acronym;
projects[countProjects]['title'] = relation.title;
projects[countProjects]['code'] = relation.code;
} else {
projects[countProjects]['id'] = "";
projects[countProjects]['acronym'] = "";
projects[countProjects]['title'] = "";
projects[countProjects]['code'] = "";
}
numOfResearchOutcomes( params: string, properties:EnvProperties, refineParams:string=null):any {
let url = properties.searchAPIURLLAst+"resources2/?format=json&size=0&type=results";
if(params.length > 0){
if (relation.hasOwnProperty("funding")) {
let fundingLength = Array.isArray(relation['funding']) ? relation['funding'].length : 1;
for (let z = 0; z < fundingLength; z++) {
let fundingData = Array.isArray(relation['funding']) ? relation['funding'][z] : relation['funding'];
if (fundingData.hasOwnProperty("funder")) {
projects[countProjects]['funderShortname'] = fundingData['funder'].shortname;
projects[countProjects]['funderName'] = fundingData['funder'].name;
}
}
}
return projects;
}
parseRefineResults(id: string, data: any): any {
var results: any = [];
if (data.hasOwnProperty("resulthostingdatasource")) {
let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
for (let i = 0; i < length; i++) {
let datasource = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'][i] : data['resulthostingdatasource'];
let result: { "name": string, "id": string, "count": number } = {"name": "", "id": "", "count": 0};
result['name'] = datasource.name;
result['id'] = datasource.id.split("||")[0];
result['count'] = datasource.count;
if (result['id'] != id && result['name'] != "Unknown Repository") {
results.push(result);
}
}
}
return results;
}
private numOfResults(url: string, properties: EnvProperties): any {
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['total']));
}
numOfEntityResults(resultType: string, id: string, entity: string, properties: EnvProperties): any {
var parameters: string = "";
parameters = this.getEntityName(entity, true) + "/" + id + "/" + this.getEntityName(resultType, true) + "/count";
let url = properties.searchAPIURLLAst + parameters + "?format=json";
return this.numOfResults(url, properties);
}
numOfResearchOutcomes(params: string, properties: EnvProperties, refineParams: string = null): any {
let url = properties.searchAPIURLLAst + "resources2/?format=json&size=0&type=results";
if (params.length > 0) {
// var DOIs:string[] = DOI.getDOIsFromString(params);
// var doisParams = "";
//
@ -458,59 +469,62 @@ export class SearchResearchResultsService {
// }
url += "&query=" + params;
}
if(refineParams!= null && refineParams != '' ) {
if (refineParams != null && refineParams != '') {
url += refineParams;
}
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['meta']['total']));
}
numOfSearchResults(resultType:string, params: string, properties:EnvProperties, refineParams:string=null):any {
let url = properties.searchAPIURLLAst+this.getEntityName(resultType, true)+"/count?format=json";
if(params.length > 0){
var DOIs:string[] = DOI.getDOIsFromString(params);
var doisParams = "";
for(var i =0 ;i < DOIs.length; i++){
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
}
if(doisParams.length > 0){
url += "&"+doisParams;
}else{
url += "&q=" + StringUtils.URIEncode(params);
}
}
if(refineParams!= null && refineParams != '' ) {
url += refineParams;
}
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;
return this.numOfResults(url, properties);
}
/*
private quote(word: any): string {
return '"'+word+'"';
}
*/
private getEntityName (entityType:string, plural:boolean){
if(entityType == "publication" ||entityType == "dataset" || entityType == "organization" || entityType == "datasource" || entityType == "project" ){
if(plural){
return entityType+ "s";
}else{
return entityType;
}
}else{
return entityType;
numOfSearchResults(resultType: string, params: string, properties: EnvProperties, refineParams: string = null): any {
let url = properties.searchAPIURLLAst + this.getEntityName(resultType, true) + "/count?format=json";
if (params.length > 0) {
var DOIs: string[] = DOI.getDOIsFromString(params);
var doisParams = "";
for (var i = 0; i < DOIs.length; i++) {
doisParams += (doisParams.length > 0 ? "&" : "") + 'doi="' + DOIs[i] + '"';
}
if (doisParams.length > 0) {
url += "&" + doisParams;
} else {
url += "&q=" + StringUtils.URIEncode(params);
}
}
if (refineParams != null && refineParams != '') {
url += refineParams;
}
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;
return this.numOfResults(url, properties);
}
/*
private quote(word: any): string {
return '"'+word+'"';
}
*/
private getEntityName(entityType: string, plural: boolean) {
if (entityType == "publication" || entityType == "dataset" || entityType == "organization" || entityType == "datasource" || entityType == "project") {
if (plural) {
return entityType + "s";
} else {
return entityType;
}
} else {
return entityType;
}
}
}

View File

@ -171,10 +171,52 @@ export class FetchResearchResults {
}
}
public getDmps(entity:string, id:string, page: number, size: number, properties:EnvProperties) {
this.searchUtils.status = this.errorCodes.LOADING;
let parameters = "";
if(entity == "project") {
parameters = '(relprojectid exact "'+id+'") and (instancetypename exact "Data Management Plan")';
} else if(entity == "organization") {
parameters = '(relorganizationid exact "'+id+'") and (instancetypename exact "Data Management Plan")';
}
if(parameters != "") {
this.subscriptions.push(this._searchResearchResultsService.searchResultForEntity('publication', parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
if (this.searchUtils.totalResults == 0) {
this.searchUtils.status = this.errorCodes.NONE;
}
},
err => {
/*console.log(err);
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = ErrorCodes.ERROR;
// }
//var errorCodes:ErrorCodes = new ErrorCodes();
//this.searchUtils.status = errorCodes.ERROR;
if(err.status == '404') {
this.searchUtils.status = this.errorCodes.NOT_FOUND;
} else if(err.status == '500') {
this.searchUtils.status = this.errorCodes.ERROR;
} else {
this.searchUtils.status = this.errorCodes.NOT_AVAILABLE;
}*/
this.handleError("Error getting dmps for " + entity + " with id: " + id, err);
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
}
));
}
}
public getResultsForEntity(resultType: string, entity:string, id:string, page: number, size: number, properties:EnvProperties){
this.searchUtils.status = this.errorCodes.LOADING;
var parameters = "";
let parameters = "";
if(entity == "project") {
//parameters = "projects/"+id;
parameters = '(relprojectid exact "'+id+'")';

View File

@ -5,12 +5,12 @@ import {ErrorCodes} from "../../properties/errorCodes";
@Component({
selector: 'search-tab',
template: `
<errorMessages [status]="[fetch.searchUtils.status]" [type]="getEntityName(resultType, true, true)"
<errorMessages *ngIf="resultType" [status]="[fetch.searchUtils.status]" [type]="getEntityName(resultType, true, true)"
tab_error_class=true></errorMessages>
<div *ngIf="fetch.searchUtils.status == errorCodes.DONE">
<div class="tab-header">
<span *ngIf="!customTitle"><span *ngIf="resultType != 'organization' && resultType != 'dataprovider' && resultType != 'project'">Recent</span>
<span *ngIf="!customTitle && resultType"><span *ngIf="resultType != 'organization' && resultType != 'dataprovider' && resultType != 'project'">Recent</span>
{{getEntityName(resultType, true, true)}}
</span>
<span *ngIf="customTitle">{{customTitle}}</span>