Lazy Routing added everywhere except for when a landing page has links to same type of landing page ( Publication/Dataset landing: related research results Tab, similar research results Tab | Dataprovider landing: related data providers Tab - datasources Tab still with lazy routing because results come from search page )

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46094 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-03-02 14:35:22 +00:00
parent bce2dfa03b
commit 613f602e98
37 changed files with 321 additions and 212 deletions

View File

@ -1,6 +1,7 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import {IFrameModule} from '../../utils/iframe.module'; import {IFrameModule} from '../../utils/iframe.module';
// import { ResultLandingModule } from '../resultLanding.module'; // import { ResultLandingModule } from '../resultLanding.module';
@ -30,7 +31,7 @@ import { DataProviderRoutingModule } from './dataProvider-routing.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule, RouterModule,
DataProviderRoutingModule, DataProviderRoutingModule,
SearchResultsModule, IFrameModule, MetricsModule, LandingModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule SearchResultsModule, IFrameModule, MetricsModule, LandingModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule

View File

@ -135,9 +135,9 @@ export class DataProviderService {
countriesSet = new Set<string>(); countriesSet = new Set<string>();
} }
this.dataProviderInfo.organizations[counter] = {"name": "", "url": ""}; this.dataProviderInfo.organizations[counter] = {"name": "", "id": ""};
this.dataProviderInfo.organizations[counter]['name'] = mydata.legalname; this.dataProviderInfo.organizations[counter]['name'] = mydata.legalname;
this.dataProviderInfo.organizations[counter]['url'] = OpenaireProperties.getsearchLinkToOrganization()+mydata['to'].content; this.dataProviderInfo.organizations[counter]['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/mydata['to'].content;
if(mydata.country != '' && mydata['country'].classname != '') { if(mydata.country != '' && mydata['country'].classname != '') {
if(!countriesSet.has(mydata['country'].classname)) { if(!countriesSet.has(mydata['country'].classname)) {

View File

@ -34,6 +34,7 @@ export class DatasourcesTabComponent {
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
console.info("datasources tab: init");
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders()+this.paramsForSearchLink; this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders()+this.paramsForSearchLink;
// console.info(this.linkToSearchDataproviders); // console.info(this.linkToSearchDataproviders);
} }

View File

@ -14,12 +14,13 @@ import {Component, Input} from '@angular/core';
</p> </p>
<div *ngFor="let item of organizations"> <div *ngFor="let item of organizations">
<p *ngIf=" item != undefined && item['url'] != undefined"> <p *ngIf=" item != undefined && item['id'] != undefined">
<a href="{{item['url']}}"> <!--a href="{{item['url']}}"-->
<a [queryParams]="{organizationId: item.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{item['name']}} {{item['name']}}
</a> </a>
</p> </p>
<p *ngIf="item['url'] == undefined"> <p *ngIf="item['id'] == undefined">
{{item['name']}} {{item['name']}}
</p> </p>
</div> </div>
@ -29,7 +30,7 @@ import {Component, Input} from '@angular/core';
export class OrganizationsTabComponent { export class OrganizationsTabComponent {
@Input() organizations: {"name": string, "url": string}[] ; @Input() organizations: {"name": string, "id": string}[] ;
constructor () {} constructor () {}

View File

@ -34,6 +34,7 @@ export class PublicationsTabComponent {
ngOnInit() { ngOnInit() {
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications()+this.paramsForSearchLink; this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications()+this.paramsForSearchLink;
console.info("publications tab: init");
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -3,6 +3,7 @@ import {Component, Input} from '@angular/core';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class';
@Component({ @Component({
selector: 'relatedDatasourcesTab', selector: 'relatedDatasourcesTab',
@ -28,13 +29,16 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<tbody> <tbody>
<tr *ngFor="let item of fetchPublications.results"> <tr *ngFor="let item of fetchPublications.results">
<td class="uk-text-center"> <td class="uk-text-center">
<a href="{{item.url}}" target="_blank" class="uk-icon-external-link"> <!--a href="{{item.url}}"-->
<!--a [queryParams]="{datasourceId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider"-->
<a href="{{searchLinkToDataProvider}}{{item.id}}">
{{item.name}} {{item.name}}
</a> </a>
</td> </td>
<td class="uk-text-center"> <td class="uk-text-center">
<a href="{{linkToSearchPublications}}{{item.id}}&ho=and&collectedFrom={{dataproviderId}}&co=and" <!--a href="{{linkToSearchPublications}}{{item.id}}&ho=and&collectedFrom={{dataproviderId}}&co=and"-->
target="_blank" class="uk-icon-external-link"> <a [queryParams]="routerHelper.createQueryParams(['hostedBy', 'ho', 'collectedFrom', 'co'], [item.id, 'and', dataproviderId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
{{item.count}} {{item.count}}
</a> </a>
</td> </td>
@ -48,12 +52,24 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
export class RelatedDatasourcesTabComponent { export class RelatedDatasourcesTabComponent {
@Input() dataproviderId: string; @Input() dataproviderId: string;
@Input() fetchPublications : FetchPublications; @Input() fetchPublications : FetchPublications;
private linkToSearchPublications = ""; public linkToSearchPublications: string = "";
public searchLinkToDataProvider: string = "";
public routerHelper:RouterHelper = new RouterHelper();
//public queryParams: string[] = [];
//public queryParamsIds: string[] = [];
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications()+"?&hostedBy=";//+ +"&ho=and&collectedFrom="+ +"&co=and"; console.info("related datasources tab: init");
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();//+"?&hostedBy=";//+ +"&ho=and&collectedFrom="+ +"&co=and";
this.searchLinkToDataProvider = OpenaireProperties.getsearchLinkToDataProvider();
/*queryParams.push("hostedBy");
queryParams.push("ho");
queryParams.push("collectedFrom");
queryParams.push("co");
queryParamsIds.push()*/
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -1,5 +1,6 @@
import {Component, Input} from '@angular/core'; import {Component, Input, Renderer, ElementRef} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router'; import {ActivatedRoute, Params} from '@angular/router';
//import { DOCUMENT } from '@angular/platform-browser';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import { SearchPublicationsService } from '../../services/searchPublications.service'; import { SearchPublicationsService } from '../../services/searchPublications.service';
@ -16,8 +17,8 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
selector: 'tabs', selector: 'tabs',
template: ` template: `
<ul *ngIf="tabs != undefined" class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul *ngIf="tabs != undefined" class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li *ngIf="tabs.length>0" class="uk-active"> <li *ngIf="tabs.length>0" class="uk-active" id="{{tabs[0].content}}">
<a href="#{{tabs[0].content}}"> <a href="{{tabs[0].content}}">
{{tabs[0].name}} {{tabs[0].name}}
<i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-chart"></i> <i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-chart"></i>
<i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i> <i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
@ -67,7 +68,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</ul> </ul>
<ul *ngIf="tabs != undefined" id="tab-content" class="uk-switcher uk-margin"> <ul *ngIf="tabs != undefined" id="tab-content" class="uk-switcher uk-margin">
<li *ngIf="tabs.length>0" id="{{tabs[0].content}}"> <li id="firstTab-content" *ngIf="tabs.length>0">
<publicationsTab *ngIf="tabs[0].content=='publicationsTab'" <publicationsTab *ngIf="tabs[0].content=='publicationsTab'"
[paramsForSearchLink]="paramsForSearchLink" [paramsForSearchLink]="paramsForSearchLink"
[fetchPublications]="fetchPublications"> [fetchPublications]="fetchPublications">
@ -129,7 +130,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</div> </div>
</div> </div>
</div> </div>
<projectsTab *ngIf="tabs[0].content=='projectsTab'" <!--projectsTab *ngIf="tabs[0].content=='projectsTab'"
[paramsForSearchLink]="paramsForSearchLink" [paramsForSearchLink]="paramsForSearchLink"
[fetchProjects]="fetchProjects"> [fetchProjects]="fetchProjects">
</projectsTab> </projectsTab>
@ -142,7 +143,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</organizationsTab> </organizationsTab>
<relatedDatasourcesTab *ngIf="tabs[0].content=='relatedDatasourcesTab'" <relatedDatasourcesTab *ngIf="tabs[0].content=='relatedDatasourcesTab'"
[fetchPublications]="fetchPublicationsAggregators"> [fetchPublications]="fetchPublicationsAggregators">
</relatedDatasourcesTab> </relatedDatasourcesTab-->
<!--div *ngIf="tabs[0].content=='metricsTab' && metrics == undefined" class = "uk-alert uk-alert-warning"> <!--div *ngIf="tabs[0].content=='metricsTab' && metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable Metrics are currently unavailable
</div> </div>
@ -160,7 +161,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</i-frame> </i-frame>
</li> </li>
<li *ngFor="let tab of tabs; let i=index" id="{{tab.content}}"> <li *ngFor="let tab of tabs; let i=index">
<publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'" <publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'"
[paramsForSearchLink]="paramsForSearchLink" [paramsForSearchLink]="paramsForSearchLink"
[fetchPublications] = "fetchPublications"> [fetchPublications] = "fetchPublications">
@ -281,8 +282,8 @@ export class TabsComponent {
public fetchProjects: FetchProjects; public fetchProjects: FetchProjects;
public fetchDataproviders: FetchDataproviders; public fetchDataproviders: FetchDataproviders;
public fetchPublicationsAggregators: FetchPublications; public fetchPublicationsAggregators: FetchPublications;
private nativeElement : Node;
constructor (private route: ActivatedRoute, constructor (private renderer : Renderer, private element : ElementRef,private route: ActivatedRoute,
private _searchPublicationsService: SearchPublicationsService, private _searchPublicationsService: SearchPublicationsService,
private _searchDatasetsService: SearchDatasetsService, private _searchDatasetsService: SearchDatasetsService,
private _searchProjectsService: SearchProjectsService, private _searchProjectsService: SearchProjectsService,
@ -295,7 +296,33 @@ export class TabsComponent {
} }
ngOnInit() { ngOnInit() {
}
ngOnChanges() {
console.info("on changes dataprovider tabs");
if(this.tabs != undefined && this.tabs.length > 0) { if(this.tabs != undefined && this.tabs.length > 0) {
/*if(typeof document !== undefined) {
let element = document.getElementById(this.tabs[0].content);
if(element != null) {
element.className = "uk-active";
element.setAttribute("aria-expanded", "true");
}
let element2 = document.getElementById("firstTab-content");
if(element2 != null) {
element2.className = "uk-active";
element2.setAttribute("aria-hidden", "false");
}
}*/
this.reloadPublications = true;
this.reloadDatasets = true;
this.reloadProjects = true;
this.reloadDataproviders = true;
this.reloadRelatedDatasources = true;
this.statsClicked = false;
this.search(this.tabs[0].content, 1, 10); this.search(this.tabs[0].content, 1, 10);
this.count(1, 0); this.count(1, 0);
@ -345,7 +372,6 @@ export class TabsComponent {
} else if(content=='projectsTab') { } else if(content=='projectsTab') {
this.searchProjects(page, size); this.searchProjects(page, size);
} else if(content=='datasourcesTab') { } else if(content=='datasourcesTab') {
console.info("fdsfsfs");
this.searchDatasources(page, size); this.searchDatasources(page, size);
} else if(content=='relatedDatasourcesTab') { } else if(content=='relatedDatasourcesTab') {
this.searchRelatedDatasources(1, 0); this.searchRelatedDatasources(1, 0);

View File

@ -76,7 +76,7 @@
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<tabTable [info]="datasetInfo.relatedResearchResults"></tabTable> <tabTable from="dataset" [info]="datasetInfo.relatedResearchResults"></tabTable>
</div> </div>
</li> </li>
@ -90,7 +90,7 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<tabTable [info]="datasetInfo.similarResearchResults"></tabTable> <tabTable from="dataset" [info]="datasetInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
<li id="metricsTab"> <li id="metricsTab">
@ -127,16 +127,6 @@
</dd> </dd>
</dl> </dl>
</li> </li>
<li *ngIf="datasetInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt>
<dd *ngFor="let item of datasetInfo.collectedFrom">
<a href="{{item['url']}}">
{{item['name']}}
</a>
</dd>
</dl>
</li>
<li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0"> <li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0">
<dl class="uk-description-list-line functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt class="title">Download from</dt> <dt class="title">Download from</dt>
@ -166,12 +156,16 @@
| Funder: {{item['funderName']}} ({{item['funderShortname']}}) | Funder: {{item['funderName']}} ({{item['funderShortname']}})
| Funding: {{item['funding']}}" | Funding: {{item['funding']}}"
class="line" *ngFor="let item of datasetInfo.fundedByProjects"> class="line" *ngFor="let item of datasetInfo.fundedByProjects">
<a *ngIf="!item['inline']" href="{{item['url']}}"> <!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
<a *ngIf="!item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
{{item['funderShortname']?item['funderShortname']:item['funderName']}} {{item['funderShortname']?item['funderShortname']:item['funderName']}}
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
</a> </a>
<a *ngIf="item['inline']" href="{{item['url']}}"> <!--a *ngIf="item['inline']" href="{{item['url']}}"-->
<a *ngIf="item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
<mark> <mark>
{{item['funderShortname']?item['funderShortname']:item['funderName']}} {{item['funderShortname']?item['funderShortname']:item['funderName']}}
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
@ -202,6 +196,17 @@
</dl> </dl>
</li> </li>
<li *ngIf="datasetInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt>
<dd *ngFor="let item of datasetInfo.collectedFrom">
<!--a href="{{item['url']}}"-->
<a [queryParams]="{datasourceId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
{{item['name']}}
</a>
</dd>
</dl>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -86,16 +86,16 @@ export class DatasetService {
if(mydata.hasOwnProperty("to")) { if(mydata.hasOwnProperty("to")) {
if(mydata['to'].class == "hasAuthor") { if(mydata['to'].class == "hasAuthor") {
if(this.datasetInfo.authors == undefined) { if(this.datasetInfo.authors == undefined) {
this.datasetInfo.authors = new Array<{"name": string, "url": string}>(); this.datasetInfo.authors = new Array<{"name": string, "id": string}>();
} }
this.datasetInfo.authors[mydata.ranking-1] = {"name": "", "url": ""}; this.datasetInfo.authors[mydata.ranking-1] = {"name": "", "id": ""};
this.datasetInfo.authors[mydata.ranking-1]['name'] = mydata.fullname; this.datasetInfo.authors[mydata.ranking-1]['name'] = mydata.fullname;
this.datasetInfo.authors[mydata.ranking-1]['url'] = OpenaireProperties.getsearchLinkToPerson()+mydata['to'].content; this.datasetInfo.authors[mydata.ranking-1]['id'] = /*OpenaireProperties.getsearchLinkToPerson()+*/mydata['to'].content;
} else if(mydata['to'].class == "isProducedBy") { } else if(mydata['to'].class == "isProducedBy") {
if(this.datasetInfo.fundedByProjects == undefined) { if(this.datasetInfo.fundedByProjects == undefined) {
this.datasetInfo.fundedByProjects = new Array< this.datasetInfo.fundedByProjects = new Array<
{ "url": string, "acronym": string, "title": string, { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "inline": boolean "funding": string, "inline": boolean
}>(); }>();
@ -104,13 +104,13 @@ export class DatasetService {
counter = this.datasetInfo.fundedByProjects.length; counter = this.datasetInfo.fundedByProjects.length;
this.datasetInfo.fundedByProjects[counter] = { this.datasetInfo.fundedByProjects[counter] = {
"url": "", "acronym": "", "title": "", "id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "", "funderShortname": "", "funderName": "",
"funding": "", "inline": false "funding": "", "inline": false
} }
this.datasetInfo.fundedByProjects[counter]['url'] = this.datasetInfo.fundedByProjects[counter]['id'] =
OpenaireProperties.getsearchLinkToProject()+mydata['to'].content; /*OpenaireProperties.getsearchLinkToProject()+*/mydata['to'].content;
this.datasetInfo.fundedByProjects[counter]['acronym'] = mydata.acronym; this.datasetInfo.fundedByProjects[counter]['acronym'] = mydata.acronym;
this.datasetInfo.fundedByProjects[counter]['title'] = mydata.title; this.datasetInfo.fundedByProjects[counter]['title'] = mydata.title;
@ -151,24 +151,26 @@ export class DatasetService {
} else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") { } else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") {
if(this.datasetInfo.similarResearchResults == undefined) { if(this.datasetInfo.similarResearchResults == undefined) {
this.datasetInfo.similarResearchResults = new Array<{ this.datasetInfo.similarResearchResults = new Array<{
"name": string, "url": string, "date": string, "name": string, "id": string, "date": string,
"trust": string, "class": string}>(); "trust": string, "class": string}>();
} }
counter = this.datasetInfo.similarResearchResults.length; counter = this.datasetInfo.similarResearchResults.length;
this.datasetInfo.similarResearchResults[counter] = {"name": "", "url": "", "date": "", "trust": "", "class": ""} this.datasetInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
let url; //let url;
if(mydata['resulttype'].classname == "publication") { if(mydata['resulttype'].classname == "publication") {
url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content; //url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
this.datasetInfo.similarResearchResults[counter]['class'] = "publication"; this.datasetInfo.similarResearchResults[counter]['class'] = "publication";
} else { } else {
url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content; //url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
this.datasetInfo.similarResearchResults[counter]['class'] = "dataset"; this.datasetInfo.similarResearchResults[counter]['class'] = "dataset";
} }
this.datasetInfo.similarResearchResults[counter]['url'] = url; this.datasetInfo.similarResearchResults[counter]['id'] = mydata['to'].content;
this.datasetInfo.similarResearchResults[counter]['name'] = mydata['title'].content; //this.datasetInfo.similarResearchResults[counter]['url'] = url;
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
this.datasetInfo.similarResearchResults[counter]['name'] = titleName;
this.datasetInfo.similarResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);; this.datasetInfo.similarResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%"; this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%";
@ -176,24 +178,26 @@ export class DatasetService {
} else if(mydata['to'].class == "isRelatedTo") { } else if(mydata['to'].class == "isRelatedTo") {
if(this.datasetInfo.relatedResearchResults == undefined) { if(this.datasetInfo.relatedResearchResults == undefined) {
this.datasetInfo.relatedResearchResults = new Array<{ this.datasetInfo.relatedResearchResults = new Array<{
"name": string, "url": string, "date": string, "name": string, "id": string, "date": string,
"trust": string, "class": string}>(); "trust": string, "class": string}>();
} }
counter = this.datasetInfo.relatedResearchResults.length; counter = this.datasetInfo.relatedResearchResults.length;
this.datasetInfo.relatedResearchResults[counter] = {"name": "", "url": "", "date": "", "trust": "", "class": ""} this.datasetInfo.relatedResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
let url; //let url;
if(mydata['resulttype'].classname == "publication") { if(mydata['resulttype'].classname == "publication") {
url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content; //url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
this.datasetInfo.relatedResearchResults[counter]['class'] = "publication"; this.datasetInfo.relatedResearchResults[counter]['class'] = "publication";
} else { } else {
url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content; //url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
this.datasetInfo.relatedResearchResults[counter]['class'] = "dataset"; this.datasetInfo.relatedResearchResults[counter]['class'] = "dataset";
} }
this.datasetInfo.relatedResearchResults[counter]['url'] = url; this.datasetInfo.relatedResearchResults[counter]['id'] = mydata['to'].content;
this.datasetInfo.relatedResearchResults[counter]['name'] = mydata['title'].content; //this.datasetInfo.relatedResearchResults[counter]['url'] = url;
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
this.datasetInfo.relatedResearchResults[counter]['name'] = titleName;
this.datasetInfo.relatedResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);; this.datasetInfo.relatedResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
this.datasetInfo.relatedResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%"; this.datasetInfo.relatedResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%";
@ -405,16 +409,16 @@ export class DatasetService {
} }
if(data[7] != null) { if(data[7] != null) {
this.datasetInfo.collectedFrom = new Array<{"name": string, "url": string}>(); this.datasetInfo.collectedFrom = new Array<{"name": string, "id": string}>();
let mydata; let mydata;
let length = data[7].length!=undefined ? data[7].length : 1; let length = data[7].length!=undefined ? data[7].length : 1;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
mydata = data[7].length!=undefined ? data[7][i] : data[7]; mydata = data[7].length!=undefined ? data[7][i] : data[7];
let link = OpenaireProperties.getsearchLinkToDataProvider(); //let link = OpenaireProperties.getsearchLinkToDataProvider();
this.datasetInfo.collectedFrom[i] = {"name": "", "url": ""}; this.datasetInfo.collectedFrom[i] = {"name": "", "id": ""};
this.datasetInfo.collectedFrom[i]['name'] = mydata.name; this.datasetInfo.collectedFrom[i]['name'] = mydata.name;
this.datasetInfo.collectedFrom[i]['url'] = link+mydata.id; this.datasetInfo.collectedFrom[i]['id'] = /*link+*/mydata.id;
} }
} }

View File

@ -5,21 +5,20 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import {TabPagingComponent} from './tabPaging.component'; import {TabPagingComponent} from './tabPaging.component';
import {TabTableComponent} from './tabTable.component';
import {ShowTitleComponent} from './showTitle.component'; import {ShowTitleComponent} from './showTitle.component';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule
], ],
declarations: [ declarations: [
TabPagingComponent, TabTableComponent, ShowTitleComponent, TabPagingComponent, ShowTitleComponent,
], ],
providers:[ providers:[
], ],
exports: [ exports: [
TabPagingComponent, TabTableComponent, ShowTitleComponent, TabPagingComponent, ShowTitleComponent,
] ]
}) })
export class LandingModule { } export class LandingModule { }

View File

@ -100,10 +100,12 @@
{{key}} {{key}}
</td> </td>
<td *ngIf="fundersSet.has(key)"> <td *ngIf="fundersSet.has(key)">
<a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}"> <!--a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}"-->
<a *ngIf="item['id'] != '' && item['name'] != ''"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
{{item['name']}} {{item['name']}}
</a> </a>
<p *ngIf="item['url'] == '' && item['name'] != ''">{{item['name']}}</p> <p *ngIf="item['id'] == '' && item['name'] != ''">{{item['name']}}</p>
<span *ngIf="item['code'] != null && item['code'] != ''"> ({{item['code']}}) </span> <span *ngIf="item['code'] != null && item['code'] != ''"> ({{item['code']}}) </span>
</td> </td>
</tr> </tr>

View File

@ -1,6 +1,7 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { OrganizationServiceModule} from '../../services/organizationService.module'; import { OrganizationServiceModule} from '../../services/organizationService.module';
import { OrganizationComponent } from './organization.component'; import { OrganizationComponent } from './organization.component';
@ -13,7 +14,7 @@ import {ReportsServiceModule} from '../../services/reportsService.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule, RouterModule,
LandingModule, LandingModule,
OrganizationRoutingModule, OrganizationRoutingModule,
SearchResultsModule, SearchResultsModule,

View File

@ -47,7 +47,12 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
<!--a [href] = "linkToSearchPublications"-->
<a [queryParams]="{personId: personId, pe: 'and'}" routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchPublications.results" <search-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.searchUtils.status" [(status)]= "fetchPublications.searchUtils.status"
type="publication" urlParam="articleId"> type="publication" urlParam="articleId">
@ -66,7 +71,12 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" >
<!--a [href] = "linkToSearchDatasets"-->
<a [queryParams]="{personId: personId, pe: 'and'}" routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets">
View all {{fetchDatasets.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchDatasets.results" <search-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.status" [(status)]= "fetchDatasets.status"
type="dataset" urlParam="datasetId"> type="dataset" urlParam="datasetId">

View File

@ -110,11 +110,11 @@ export class PersonComponent {
private searchPublications() { private searchPublications() {
this.fetchPublications.getResultsForEntity("person", this.personId, 1, 10); this.fetchPublications.getResultsForEntity("person", this.personId, 1, 10);
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications() + "?person=" + this.personId + "&pe=and"; this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();// + "?person=" + this.personId + "&pe=and";
} }
private searchDatasets() { private searchDatasets() {
this.fetchDatasets.getResultsForEntity("person", this.personId, 1, 10); this.fetchDatasets.getResultsForEntity("person", this.personId, 1, 10);
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets() + "?person=" + this.personId + "&pe=and"; this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets();// + "?person=" + this.personId + "&pe=and";
} }
} }

View File

@ -1,6 +1,7 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { PersonService} from './person.service'; import { PersonService} from './person.service';
import { PersonComponent } from './person.component'; import { PersonComponent } from './person.component';
@ -13,7 +14,7 @@ import {PublicationsServiceModule} from '../../services/publicationsService.modu
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule, RouterModule,
LandingModule, LandingModule,
PersonRoutingModule, PersonRoutingModule,
SearchResultsModule, SearchResultsModule,

View File

@ -27,17 +27,18 @@
<dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd> <dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd>
<dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt> <dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt>
<dd *ngIf="projectInfo.organizations != undefined"> <dd *ngIf="projectInfo.organizations != undefined">
<span *ngFor="let key of projectInfo.organizations.keys() let i=index"> <span *ngFor="let organization of projectInfo.organizations let i=index">
<a *ngIf="projectInfo.organizations.get(key) != null && <!--a *ngIf="projectInfo.organizations.get(key) != null &&
projectInfo.organizations.get(key) != ''" projectInfo.organizations.get(key) != ''"
href="{{(projectInfo.organizations.get(key))}}"> href="{{(projectInfo.organizations.get(key))}}"-->
{{key}} <a *ngIf="organization.id != null && organization.id != ''"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization.name}}
</a> </a>
<span *ngIf="projectInfo.organizations.get(key) == null || <span *ngIf="organization.id == null || organization.id == ''">
projectInfo.organizations.get(key) == ''"> {{organization.name}}
{{key}}
</span> </span>
<span *ngIf="i<projectInfo.organizations.size-1">,</span> <span *ngIf="i<projectInfo.organizations.length-1">,</span>
</span> </span>
</dd> </dd>
<dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt> <dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt>

View File

@ -3,6 +3,7 @@ import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { RouterModule } from '@angular/router';
import { ProjectServiceModule} from './projectService.module'; import { ProjectServiceModule} from './projectService.module';
// import {HtmlProgressReportService} from './htmlProgressReport.service'; // import {HtmlProgressReportService} from './htmlProgressReport.service';

View File

@ -139,10 +139,10 @@ export class ProjectService {
} }
if(data[2] != null) { if(data[2] != null) {
this.projectInfo.organizations = new Map<string, string>(); this.projectInfo.organizations = [];//new Map<string, string>();
let name = ""; let name = "";
let url = ""; let id = "";
if(!Array.isArray(data[2])) { if(!Array.isArray(data[2])) {
if(data[2].hasOwnProperty("legalshortname")) { if(data[2].hasOwnProperty("legalshortname")) {
@ -152,10 +152,10 @@ export class ProjectService {
} }
if(data[2].hasOwnProperty("to") && name != "") { if(data[2].hasOwnProperty("to") && name != "") {
url = OpenaireProperties.getsearchLinkToOrganization()+data[2]['to'].content; id = /*OpenaireProperties.getsearchLinkToOrganization()+*/data[2]['to'].content;
} }
if(name != "") { if(name != "") {
this.projectInfo.organizations.set(name, url); this.projectInfo.organizations.push({"name": name, "id": id});
} }
} else { } else {
for(let i=0; i<data[2].length; i++) { for(let i=0; i<data[2].length; i++) {
@ -167,11 +167,11 @@ export class ProjectService {
} }
if(data[2][i].hasOwnProperty("to") && name!="") { if(data[2][i].hasOwnProperty("to") && name!="") {
url = OpenaireProperties.getsearchLinkToOrganization()+data[2][i]['to'].content; id = /*OpenaireProperties.getsearchLinkToOrganization()+*/data[2][i]['to'].content;
} }
if(name != "") { if(name != "") {
this.projectInfo.organizations.set(name, url); this.projectInfo.organizations.push({"name": name, "id": id});
} }
} }
} }

View File

@ -55,8 +55,8 @@
<div class="uk-text-justify">{{publicationInfo.description}}</div> <div class="uk-text-justify">{{publicationInfo.description}}</div>
</blockquote> </blockquote>
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','publication'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Links to research Results</a> <a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','publication'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Links to research Results</a>
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect: '#tab-content'}">
<li class="uk-active"> <li id="citationsTab" class="uk-active">
<a href="#citationsTab"> <a href="#citationsTab">
References References
<span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span>
@ -104,7 +104,7 @@
</ul> </ul>
<ul id="{{'tab-content'+articleId}}" class="uk-switcher uk-margin"> <ul id="{{'tab-content'+articleId}}" class="uk-switcher uk-margin">
<li id="citationsTab"> <li id="citationsTab-content">
<div *ngIf="publicationInfo.references == undefined" class = "uk-alert" > <div *ngIf="publicationInfo.references == undefined" class = "uk-alert" >
There are no references There are no references
@ -157,7 +157,7 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<tabTable [info]="publicationInfo.relatedResearchResults"></tabTable> <tabTable from="publication" [info]="publicationInfo.relatedResearchResults"></tabTable>
</div> </div>
</li> </li>
@ -172,7 +172,7 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
<tabTable [info]="publicationInfo.similarResearchResults"></tabTable> <tabTable from="publication" [info]="publicationInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab"> <li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab">
@ -336,12 +336,16 @@
| Funding: {{item['funding']}}" | Funding: {{item['funding']}}"
class="line" *ngFor="let item of publicationInfo.fundedByProjects let i=index"> class="line" *ngFor="let item of publicationInfo.fundedByProjects let i=index">
<div *ngIf="i<5 || showAllFundedBy"> <div *ngIf="i<5 || showAllFundedBy">
<a *ngIf="!item['inline']" href="{{item['url']}}"> <!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
<a *ngIf="!item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
{{item['funderShortname']?item['funderShortname']:item['funderName']}} {{item['funderShortname']?item['funderShortname']:item['funderName']}}
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
</a> </a>
<a *ngIf="item['inline']" href="{{item['url']}}"> <!--a *ngIf="item['inline']" href="{{item['url']}}"-->
<a *ngIf="item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
<mark> <mark>
{{item['funderShortname']?item['funderShortname']:item['funderName']}} {{item['funderShortname']?item['funderShortname']:item['funderName']}}
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
@ -388,7 +392,9 @@
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngFor="let item of publicationInfo.collectedFrom let i=index"> <dd *ngFor="let item of publicationInfo.collectedFrom let i=index">
<a *ngIf="i<5 || showAllCollectedFrom" href="{{item['url']}}"> <!--a *ngIf="i<5 || showAllCollectedFrom" href="{{item['url']}}"-->
<a *ngIf="i<5 || showAllCollectedFrom"
[queryParams]="{datasourceId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
{{item['name']}} {{item['name']}}
</a> </a>
</dd> </dd>

View File

@ -54,11 +54,11 @@ export class PublicationComponent {
}else{ }else{
console.info("Article id not found"); console.info("Article id not found");
} }
});
this.metricsClicked = false; this.metricsClicked = false;
this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'; this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'; this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
});
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -88,16 +88,16 @@ export class PublicationService {
if(relation.hasOwnProperty("to")) { if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "hasAuthor") { if(relation['to'].class == "hasAuthor") {
if(this.publicationInfo.authors == undefined) { if(this.publicationInfo.authors == undefined) {
this.publicationInfo.authors = new Array<{"name": string, "url": string}>(); this.publicationInfo.authors = new Array<{"name": string, "id": string}>();
} }
this.publicationInfo.authors[relation.ranking-1] = {"name": "", "url": ""}; this.publicationInfo.authors[relation.ranking-1] = {"name": "", "id": ""};
this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname; this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname;
this.publicationInfo.authors[relation.ranking-1]['url'] = OpenaireProperties.getsearchLinkToPerson() + relation['to'].content; this.publicationInfo.authors[relation.ranking-1]['id'] = /*OpenaireProperties.getsearchLinkToPerson() + */relation['to'].content;
} else if(relation['to'].class == "isProducedBy") { } else if(relation['to'].class == "isProducedBy") {
if(this.publicationInfo.fundedByProjects == undefined) { if(this.publicationInfo.fundedByProjects == undefined) {
this.publicationInfo.fundedByProjects = new Array< this.publicationInfo.fundedByProjects = new Array<
{ "url": string, "acronym": string, "title": string, { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "code": string, "inline": boolean "funding": string, "code": string, "inline": boolean
}>(); }>();
@ -106,13 +106,13 @@ export class PublicationService {
counter = this.publicationInfo.fundedByProjects.length; counter = this.publicationInfo.fundedByProjects.length;
this.publicationInfo.fundedByProjects[counter] = { this.publicationInfo.fundedByProjects[counter] = {
"url": "", "acronym": "", "title": "", "id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "", "funderShortname": "", "funderName": "",
"funding": "", "code": "", "inline": false "funding": "", "code": "", "inline": false
} }
this.publicationInfo.fundedByProjects[counter]['url'] = this.publicationInfo.fundedByProjects[counter]['id'] =
OpenaireProperties.getsearchLinkToProject() + relation['to'].content; /*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
this.publicationInfo.fundedByProjects[counter]['acronym'] = relation.acronym; this.publicationInfo.fundedByProjects[counter]['acronym'] = relation.acronym;
this.publicationInfo.fundedByProjects[counter]['title'] = relation.title; this.publicationInfo.fundedByProjects[counter]['title'] = relation.title;
this.publicationInfo.fundedByProjects[counter]['code'] = relation.code; this.publicationInfo.fundedByProjects[counter]['code'] = relation.code;
@ -154,48 +154,52 @@ export class PublicationService {
} else if(relation['to'].class == "isRelatedTo") { } else if(relation['to'].class == "isRelatedTo") {
if(this.publicationInfo.relatedResearchResults == undefined) { if(this.publicationInfo.relatedResearchResults == undefined) {
this.publicationInfo.relatedResearchResults = new Array<{ this.publicationInfo.relatedResearchResults = new Array<{
"name": string, "url": string, "date": string, "name": string, "id": string, "date": string,
"trust": string, "class": string}>(); "trust": string, "class": string}>();
} }
counter = this.publicationInfo.relatedResearchResults.length; counter = this.publicationInfo.relatedResearchResults.length;
this.publicationInfo.relatedResearchResults[counter] = {"name": "", "url": "", "date": "", "trust": "", "class": ""} this.publicationInfo.relatedResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
let url; //let url;
if(relation['resulttype'].classname == "publication") { if(relation['resulttype'].classname == "publication") {
url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content; //url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
this.publicationInfo.relatedResearchResults[counter]['class'] = "publication"; this.publicationInfo.relatedResearchResults[counter]['class'] = "publication";
} else { } else {
url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content; //url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
this.publicationInfo.relatedResearchResults[counter]['class'] = "dataset"; this.publicationInfo.relatedResearchResults[counter]['class'] = "dataset";
} }
this.publicationInfo.relatedResearchResults[counter]['url'] = url; this.publicationInfo.relatedResearchResults[counter]['id'] = relation['to'].content;
this.publicationInfo.relatedResearchResults[counter]['name'] = relation['title'].content; //this.publicationInfo.relatedResearchResults[counter]['url'] = url;
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
this.publicationInfo.relatedResearchResults[counter]['name'] = titleName;
this.publicationInfo.relatedResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);; this.publicationInfo.relatedResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);;
this.publicationInfo.relatedResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%"; this.publicationInfo.relatedResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%";
} else if(relation['to'].class == "hasAmongTopNSimilarDocuments") { } else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
if(this.publicationInfo.similarResearchResults == undefined) { if(this.publicationInfo.similarResearchResults == undefined) {
this.publicationInfo.similarResearchResults = new Array<{ this.publicationInfo.similarResearchResults = new Array<{
"name": string, "url": string, "date": string, "name": string, "id": string, "date": string,
"trust": string, "class": string}>(); "trust": string, "class": string}>();
} }
counter = this.publicationInfo.similarResearchResults.length; counter = this.publicationInfo.similarResearchResults.length;
this.publicationInfo.similarResearchResults[counter] = {"name": "", "url": "", "date": "", "trust": "", "class": ""} this.publicationInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
let url; //let url;
if(relation['resulttype'].classname == "publication") { if(relation['resulttype'].classname == "publication") {
url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content; //url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
this.publicationInfo.similarResearchResults[counter]['class'] = "publication"; this.publicationInfo.similarResearchResults[counter]['class'] = "publication";
} else { } else {
url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content; //url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
this.publicationInfo.similarResearchResults[counter]['class'] = "dataset"; this.publicationInfo.similarResearchResults[counter]['class'] = "dataset";
} }
this.publicationInfo.similarResearchResults[counter]['url'] = url; this.publicationInfo.similarResearchResults[counter]['id'] = relation['to'].content;
this.publicationInfo.similarResearchResults[counter]['name'] = relation['title'].content; //this.publicationInfo.similarResearchResults[counter]['url'] = url;
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
this.publicationInfo.similarResearchResults[counter]['name'] = titleName;
this.publicationInfo.similarResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);; this.publicationInfo.similarResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);;
this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%"; this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%";
} }
@ -510,16 +514,16 @@ export class PublicationService {
} }
if(data[9] != null) { if(data[9] != null) {
this.publicationInfo.collectedFrom = new Array<{"name": string, "url": string}>(); this.publicationInfo.collectedFrom = new Array<{"name": string, "id": string}>();
let collectedFrom; let collectedFrom;
let length = Array.isArray(data[9]) ? data[9].length : 1; let length = Array.isArray(data[9]) ? data[9].length : 1;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
collectedFrom = Array.isArray(data[9]) ? data[9][i] : data[9]; collectedFrom = Array.isArray(data[9]) ? data[9][i] : data[9];
let link = OpenaireProperties.getsearchLinkToDataProvider(); //let link = OpenaireProperties.getsearchLinkToDataProvider();
this.publicationInfo.collectedFrom[i] = {"name": "", "url": ""}; this.publicationInfo.collectedFrom[i] = {"name": "", "id": ""};
this.publicationInfo.collectedFrom[i]['name'] = collectedFrom.name; this.publicationInfo.collectedFrom[i]['name'] = collectedFrom.name;
this.publicationInfo.collectedFrom[i]['url'] = link + collectedFrom.id; this.publicationInfo.collectedFrom[i]['id'] = /*link + */collectedFrom.id;
} }
} }

View File

@ -7,18 +7,19 @@ import { RouterModule } from '@angular/router';
import {ShowAuthorsComponent} from './showAuthors.component'; import {ShowAuthorsComponent} from './showAuthors.component';
import {ShowIdentifiersComponent} from './showIdentifiers.component'; import {ShowIdentifiersComponent} from './showIdentifiers.component';
import {ShowSubjectsComponent} from './showSubjects.component'; import {ShowSubjectsComponent} from './showSubjects.component';
import {TabTableComponent} from './tabTable.component';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule CommonModule, FormsModule, RouterModule
], ],
declarations: [ declarations: [
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
], ],
providers:[ providers:[
], ],
exports: [ exports: [
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
] ]
}) })
export class ResultLandingModule { } export class ResultLandingModule { }

View File

@ -8,15 +8,16 @@ import {Component, Input} from '@angular/core';
<a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a> <a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
</div> </div>
<span *ngFor="let item of authors.slice(0,30)"> <span *ngFor="let item of authors.slice(0,30)">
<a href="{{item['url']}}"> <!--a href="{{item['url']}}"-->
<!--a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: 'datacite____::9da3a037961b36a634fcd40ab0bf6535'}" --> <a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">
{{item['name']}}; {{item['name']}};
</a> </a>
</span> </span>
<span *ngIf="!showAll && authors.length > 30"> ... </span> <span *ngIf="!showAll && authors.length > 30"> ... </span>
<span *ngIf="showAll"> <span *ngIf="showAll">
<span *ngFor="let item of authors.slice(30)"> <span *ngFor="let item of authors.slice(30)">
<a href="{{item['url']}}"> <!--a href="{{item['url']}}"-->
<a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">
{{item['name']}}; {{item['name']}};
</a> </a>
</span> </span>

View File

@ -1,5 +1,6 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {RouterHelper} from '../utils/routerHelper.class';
import {OpenaireProperties} from '../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'tabTable', selector: 'tabTable',
@ -17,10 +18,31 @@ import {Component, Input} from '@angular/core';
<span *ngIf="item['class'] == 'dataset'" class="glyphicon glyphicon-star" aria-hidden="true"> <span *ngIf="item['class'] == 'dataset'" class="glyphicon glyphicon-star" aria-hidden="true">
</span> </span>
<a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}"> <!--a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}"-->
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'dataset' && from == 'publication'"
[queryParams]="{datasetId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataset">
{{item['name']}} {{item['name']}}
</a> </a>
<p *ngIf="item['url'] == '' && item['name'] != ''">{{item['name']}}</p>
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'dataset' && from == 'dataset'"
href="{{searchLinkToDataset}}{{item['id']}}">
{{item['name']}}
</a>
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'publication' && from == 'dataset'"
[queryParams]="{articleId: item.id}" routerLinkActive="router-link-active" routerLink="/search/publication">
<!--a *ngIf="item['url'] != '' && item['name'] != '' && item['class'] == 'publication'"
href="http://astero.di.uoa.gr:3000/search/publication?articleId={{item['id']}}"-->
{{item['name']}}
</a>
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'publication' && from == 'publication'"
href="{{searchLinkToPublication}}{{item['id']}}">
{{item['name']}}
</a>
<p *ngIf="item['id'] == '' && item['name'] != ''">{{item['name']}}</p>
<span *ngIf="item['date'] != ''"> <span *ngIf="item['date'] != ''">
({{item['date']}}) ({{item['date']}})
</span> </span>
@ -44,13 +66,20 @@ import {Component, Input} from '@angular/core';
}) })
export class TabTableComponent { export class TabTableComponent {
@Input() from: string = "publication";
@Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map<string, string[]>; @Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map<string, string[]>;
public routerHelper:RouterHelper = new RouterHelper();
public searchLinkToPublication: string;
public searchLinkToDataset: string;
constructor () { constructor () {
console.info('tabTable constructor'); console.info('tabTable constructor');
} }
ngOnInit() { ngOnInit() {
console.info('tabTable ngOnInit'); console.info('tabTable ngOnInit');
this.searchLinkToPublication = OpenaireProperties.getsearchLinkToPublication();
this.searchLinkToDataset = OpenaireProperties.getsearchLinkToDataset();
} }
} }

View File

@ -29,8 +29,8 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<div> <div>
<span *ngIf="result['authors'] != undefined"> <span *ngIf="result['authors'] != undefined">
<span *ngFor="let author of result['authors'].slice(0,15)"> <span *ngFor="let author of result['authors'].slice(0,15)">
<a href="{{author['url']}}"> <!--a href="{{author['url']}}"-->
<!--a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}"--> <a [queryParams]="{personId: author.id}" routerLinkActive="router-link-active" routerLink="/search/person">
{{author['name']}}; {{author['name']}};
</a> </a>
</span> </span>
@ -48,11 +48,12 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<div *ngIf="result['projects'] != undefined"> <div *ngIf="result['projects'] != undefined">
<span> Projects: </span> <span> Projects: </span>
<span *ngFor="let project of result['projects'].slice(0,15) let i=index"> <span *ngFor="let project of result['projects'].slice(0,15) let i=index">
<a *ngIf="project.url != undefined" href="{{project.url}}"> <!--a *ngIf="project.url != undefined" href="{{project.url}}"-->
<a *ngIf="project.id != undefined" [queryParams]="{projectId: project.id}" routerLinkActive="router-link-active" routerLink="/search/project">
{{project['funderShortname']?project['funderShortname']:project['funderName']}} {{project['funderShortname']?project['funderShortname']:project['funderName']}}
| {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}}) | {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}})
</a> </a>
<p *ngIf="project.url == undefined"> <p *ngIf="project.id == undefined">
{{project['funderShortname']?project['funderShortname']:project['funderName']}} {{project['funderShortname']?project['funderShortname']:project['funderName']}}
| {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}}) | {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}})
</p> </p>
@ -84,10 +85,11 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0"> <div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0">
<span> Organizations: </span> <span> Organizations: </span>
<span *ngFor="let organization of result['organizations'] let i=index"> <span *ngFor="let organization of result['organizations'] let i=index">
<a *ngIf="organization.url != undefined" href="{{organization.url}}"> <!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
<a *ngIf="organization.id != undefined" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization.name}} {{organization.name}}
</a> </a>
<span *ngIf="organization.url == undefined"> <span *ngIf="organization.id == undefined">
{{organization.name}} {{organization.name}}
</span> </span>
<span *ngIf="i < result['organizations'].length-1"> ,</span> <span *ngIf="i < result['organizations'].length-1"> ,</span>

View File

@ -97,7 +97,7 @@ export class OrganizationService {
if(mydata['funding'].hasOwnProperty("funder")) { if(mydata['funding'].hasOwnProperty("funder")) {
if(this.organizationInfo.projects == undefined) { if(this.organizationInfo.projects == undefined) {
this.organizationInfo.projects = new Map<string, this.organizationInfo.projects = new Map<string,
{ "name": string, "id": string, "url": string, "code": string, { "name": string, "id": string, "code": string,
"acronym": string, "funder": string, "funderId": string, "acronym": string, "funder": string, "funderId": string,
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string, "fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
"sc39": string, "startDate": string, "endDate": string }[]>(); "sc39": string, "startDate": string, "endDate": string }[]>();
@ -105,7 +105,7 @@ export class OrganizationService {
if(!this.organizationInfo.projects.has(mydata['funding']['funder'].name)) { if(!this.organizationInfo.projects.has(mydata['funding']['funder'].name)) {
this.organizationInfo.projects.set(mydata['funding']['funder'].name, this.organizationInfo.projects.set(mydata['funding']['funder'].name,
new Array<{ "name": string, "id": string, "url": string, "code": string, new Array<{ "name": string, "id": string, "code": string,
"acronym": string, "funder": string, "funderId": string, "acronym": string, "funder": string, "funderId": string,
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string, "fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
"sc39": string, "startDate": string, "endDate": string }>()); "sc39": string, "startDate": string, "endDate": string }>());
@ -113,18 +113,18 @@ export class OrganizationService {
counter = this.organizationInfo.projects.get(mydata['funding']['funder'].name).length; counter = this.organizationInfo.projects.get(mydata['funding']['funder'].name).length;
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter] = this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter] =
{ "name": "", "id": "", "url": "", "code": "", { "name": "", "id": "", "code": "",
"acronym": "", "funder": "", "funderId": "", "acronym": "", "funder": "", "funderId": "",
"fundingStream": "", "fundingLevel1": "", "fundingLevel2": "", "fundingStream": "", "fundingLevel1": "", "fundingLevel2": "",
"sc39": "", "startDate": "", "endDate": "" }; "sc39": "", "startDate": "", "endDate": "" };
let url = ""; //let url = "";
if(mydata['to'].content != null && mydata['to'].content != "") { if(mydata['to'].content != null && mydata['to'].content != "") {
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['id'] = mydata['to'].content; this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['id'] = mydata['to'].content;
url = OpenaireProperties.getsearchLinkToProject()+mydata['to'].content; //url = OpenaireProperties.getsearchLinkToProject()+mydata['to'].content;
} }
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['name'] = mydata.title; this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['name'] = mydata.title;
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['url'] = url; //this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['url'] = url;
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['code'] = mydata.code; this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['code'] = mydata.code;
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['acronym'] = mydata.acronym; this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter]['acronym'] = mydata.acronym;

View File

@ -278,7 +278,7 @@ export class SearchDataprovidersService {
result['websiteURL'] = resData.websiteurl; result['websiteURL'] = resData.websiteurl;
let res:[string[], {"name":string, "url":string}[]] = this.getDataproviderCountriesOrganizations(resData, true, true); let res:[string[], {"name":string, "id":string}[]] = this.getDataproviderCountriesOrganizations(resData, true, true);
result['organizations'] = res[1]; result['organizations'] = res[1];
result['countries'] = res[0]; result['countries'] = res[0];
@ -304,9 +304,9 @@ export class SearchDataprovidersService {
} }
} }
getDataproviderCountriesOrganizations(resData: any, getCountries: boolean, getOrganizations: boolean): [string[], {"name": string, "url": string}[]] { getDataproviderCountriesOrganizations(resData: any, getCountries: boolean, getOrganizations: boolean): [string[], {"name": string, "id": string}[]] {
let countries: string[] = []; let countries: string[] = [];
let organizations: {"name": string, "url": string}[] = []; let organizations: {"name": string, "id": string}[] = [];
if(resData['rels'].hasOwnProperty("rel")) { if(resData['rels'].hasOwnProperty("rel")) {
let countriesSet: Set<string> = new Set<string>(); let countriesSet: Set<string> = new Set<string>();
@ -319,9 +319,9 @@ export class SearchDataprovidersService {
if(relation.hasOwnProperty("to")) { if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "provides" && relation['to'].type == "organization") { if(relation['to'].class == "provides" && relation['to'].type == "organization") {
if(getOrganizations) { if(getOrganizations) {
let item: {"name":string, "url":string} = {"name": "", "url": ""}; let item: {"name":string, "id":string} = {"name": "", "id": ""};
item['name'] = relation.legalname; item['name'] = relation.legalname;
item['url'] = OpenaireProperties.getsearchLinkToOrganization()+relation['to'].content; item['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/relation['to'].content;
organizations.push(item); organizations.push(item);
} }

View File

@ -170,14 +170,14 @@ export class SearchDatasetsService {
if(relation.hasOwnProperty("to")) { if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "hasAuthor") { if(relation['to'].class == "hasAuthor") {
if(result['authors'] == undefined) { if(result['authors'] == undefined) {
result['authors'] = new Array<{"name": string, "url": string}>(); result['authors'] = new Array<{"name": string, "id": string}>();
} }
result['authors'].push({"name": relation.fullname, "url": OpenaireProperties.getsearchLinkToPerson()+relation['to'].content}); result['authors'].push({"name": relation.fullname, "id": /*OpenaireProperties.getsearchLinkToPerson()+*/relation['to'].content});
} else if(relation['to'].class == "isProducedBy") { } else if(relation['to'].class == "isProducedBy") {
if(result['projects'] == undefined) { if(result['projects'] == undefined) {
result['projects'] = new Array< result['projects'] = new Array<
{ "url": string, "acronym": string, "title": string, { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"code": string "code": string
}>(); }>();
@ -186,13 +186,13 @@ export class SearchDatasetsService {
let countProjects = result['projects'].length; let countProjects = result['projects'].length;
result['projects'][countProjects] = { result['projects'][countProjects] = {
"url": "", "acronym": "", "title": "", "id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "", "funderShortname": "", "funderName": "",
"code": "" "code": ""
} }
result['projects'][countProjects]['url'] = result['projects'][countProjects]['id'] =
OpenaireProperties.getsearchLinkToProject() + relation['to'].content; /*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
result['projects'][countProjects]['acronym'] = relation.acronym; result['projects'][countProjects]['acronym'] = relation.acronym;
result['projects'][countProjects]['title'] = relation.title; result['projects'][countProjects]['title'] = relation.title;
result['projects'][countProjects]['code'] = relation.code; result['projects'][countProjects]['code'] = relation.code;

View File

@ -118,7 +118,7 @@ export class SearchOrganizationsService {
if(relation['to'].class == "isParticipant") { if(relation['to'].class == "isParticipant") {
if(result['projects'] == undefined) { if(result['projects'] == undefined) {
result['projects'] = new Array< result['projects'] = new Array<
{ "url": string, "acronym": string, "title": string, { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"code": string "code": string
}>(); }>();
@ -127,13 +127,13 @@ export class SearchOrganizationsService {
let countProjects = result['projects'].length; let countProjects = result['projects'].length;
result['projects'][countProjects] = { result['projects'][countProjects] = {
"url": "", "acronym": "", "title": "", "id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "", "funderShortname": "", "funderName": "",
"code": "" "code": ""
} }
result['projects'][countProjects]['url'] = result['projects'][countProjects]['id'] =
OpenaireProperties.getsearchLinkToProject() + relation['to'].content; /*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
result['projects'][countProjects]['acronym'] = relation.acronym; result['projects'][countProjects]['acronym'] = relation.acronym;
result['projects'][countProjects]['title'] = relation.title; result['projects'][countProjects]['title'] = relation.title;
result['projects'][countProjects]['code'] = relation.code; result['projects'][countProjects]['code'] = relation.code;

View File

@ -156,20 +156,16 @@ export class SearchProjectsService {
if(relation['to'].class == "hasParticipant") { if(relation['to'].class == "hasParticipant") {
if(result['organizations'] == undefined) { if(result['organizations'] == undefined) {
result['organizations'] = new Array< result['organizations'] = new Array<
{ "name": string, "url": string}>(); { "name": string, "id": string}>();
} }
let countOrganizations = result['organizations'].length; let countOrganizations = result['organizations'].length;
result['organizations'][countOrganizations] = { "name": "", "url": "" } result['organizations'][countOrganizations] = { "name": "", "id": "" }
result['organizations'][countOrganizations]['url'] = result['organizations'][countOrganizations]['id'] =
OpenaireProperties.getsearchLinkToOrganization() + relation['to'].content; /*OpenaireProperties.getsearchLinkToOrganization() + */relation['to'].content;
result['organizations'][countOrganizations]['name'] = relation.legalname; result['organizations'][countOrganizations]['name'] = relation.legalname;
} }
} }
} }

View File

@ -237,14 +237,14 @@ export class SearchPublicationsService {
if(relation.hasOwnProperty("to")) { if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "hasAuthor") { if(relation['to'].class == "hasAuthor") {
if(result['authors'] == undefined) { if(result['authors'] == undefined) {
result['authors'] = new Array<{"name": string, "url": string}>(); result['authors'] = new Array<{"name": string, "id": string}>();
} }
result['authors'].push({"name": relation.fullname, "url": OpenaireProperties.getsearchLinkToPerson()+relation['to'].content}); result['authors'].push({"name": relation.fullname, "id": /*OpenaireProperties.getsearchLinkToPerson()+*/relation['to'].content});
} else if(relation['to'].class == "isProducedBy") { } else if(relation['to'].class == "isProducedBy") {
if(result['projects'] == undefined) { if(result['projects'] == undefined) {
result['projects'] = new Array< result['projects'] = new Array<
{ "url": string, "acronym": string, "title": string, { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"code": string "code": string
}>(); }>();
@ -253,13 +253,13 @@ export class SearchPublicationsService {
let countProjects = result['projects'].length; let countProjects = result['projects'].length;
result['projects'][countProjects] = { result['projects'][countProjects] = {
"url": "", "acronym": "", "title": "", "id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "", "funderShortname": "", "funderName": "",
"code": "" "code": ""
} }
result['projects'][countProjects]['url'] = result['projects'][countProjects]['id'] =
OpenaireProperties.getsearchLinkToProject() + relation['to'].content; /*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
result['projects'][countProjects]['acronym'] = relation.acronym; result['projects'][countProjects]['acronym'] = relation.acronym;
result['projects'][countProjects]['title'] = relation.title; result['projects'][countProjects]['title'] = relation.title;
result['projects'][countProjects]['code'] = relation.code; result['projects'][countProjects]['code'] = relation.code;
@ -400,10 +400,10 @@ export class SearchPublicationsService {
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
let datasource = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'][i] : data['resulthostingdatasource']; let datasource = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'][i] : data['resulthostingdatasource'];
let result: {"name": string, "id": string, "url":string, "count": number} = {"name": "", "id": "", "url": "", "count": 0}; let result: {"name": string, "id": string, "count": number} = {"name": "", "id": "", "count": 0};
result['name'] = datasource.name; result['name'] = datasource.name;
result['id'] = datasource.id.split("||")[0]; result['id'] = datasource.id.split("||")[0];
result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id']; //result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
result['count'] = datasource.count; result['count'] = datasource.count;
results.push(result); results.push(result);

View File

@ -94,7 +94,7 @@ export class DataProviderInfo {
]) ])
}; };
organizations: {"name": string, "url": string}[] = []; organizations: {"name": string, "id": string}[] = [];
//publications: any; //publications: any;
//datasets: any; //datasets: any;
statistics: any; statistics: any;

View File

@ -1,6 +1,6 @@
export class DatasetInfo { export class DatasetInfo {
title: { "name": string, "url": string, "accessMode": string}; title: { "name": string, "url": string, "accessMode": string};
authors: { "name": string, "url": string}[]; authors: { "name": string, "id": string}[];
date: string; date: string;
embargoEndDate: string; embargoEndDate: string;
type: string; type: string;
@ -13,11 +13,11 @@ export class DatasetInfo {
classifiedSubjects: Map<string, string[]>; classifiedSubjects: Map<string, string[]>;
description: string; description: string;
bestlicense: string; bestlicense: string;
collectedFrom: { "name": string, "url": string}[]; collectedFrom: { "name": string, "id": string}[];
fundedByProjects: { "url": string, "acronym": string, "title": string, fundedByProjects: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "inline": boolean}[]; "funding": string, "inline": boolean}[];
relatedResearchResults: { "name": string, "url": string, "date": string, "trust": string, "class": string}[]; relatedResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
similarResearchResults: {"name": string, "url": string, "date": string, "trust": string, "class": string}[]; similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[]; contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
} }

View File

@ -3,7 +3,7 @@ export class OrganizationInfo {
name: string; name: string;
country: string; country: string;
projects: Map<string, { "name": string, "id":string, "url": string, "code": string, projects: Map<string, { "name": string, "id":string, "code": string,
"acronym": string, "funder": string, "funderId": string, "acronym": string, "funder": string, "funderId": string,
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string, "fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
"sc39": string, "startDate": string, "endDate": string }[]>; "sc39": string, "startDate": string, "endDate": string }[]>;

View File

@ -9,7 +9,7 @@ export class ProjectInfo {
endDate: string; endDate: string;
openAccessMandate: string; openAccessMandate: string;
specialClause39: string; specialClause39: string;
organizations: Map<string, string>; organizations: { "name": string, "id": string }[];//Map<string, string>;
url: string; url: string;
urlInfo: string; urlInfo: string;

View File

@ -1,6 +1,6 @@
export class PublicationInfo { export class PublicationInfo {
title: { "name": string, "url": string, "accessMode": string}; title: { "name": string, "url": string, "accessMode": string};
authors: { "name": string, "url": string}[]; authors: { "name": string, "id": string}[];
date: string; date: string;
embargoEndDate: string; embargoEndDate: string;
types: string[]; types: string[];
@ -17,16 +17,16 @@ export class PublicationInfo {
classifiedSubjects: Map<string, string[]>; //<class of subject, subjects> classifiedSubjects: Map<string, string[]>; //<class of subject, subjects>
description: string; description: string;
bestlicense: string; bestlicense: string;
collectedFrom: { "name": string, "url": string}[]; collectedFrom: { "name": string, "id": string}[];
fundedByProjects: { "url": string, "acronym": string, "title": string, fundedByProjects: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "code": string, inline: boolean}[]; "funding": string, "code": string, inline: boolean}[];
//relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[]; //relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[];
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[]; //relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[];
//similarPublications: {"name": string, "url": string, "date": string, "trust": string}[]; //similarPublications: {"name": string, "url": string, "date": string, "trust": string}[];
//similarDatasets: {"name": string, "url": string, "date": string, "trust": string}[]; //similarDatasets: {"name": string, "url": string, "date": string, "trust": string}[];
relatedResearchResults: { "name": string, "url": string, "date": string, "trust": string, "class": string}[]; relatedResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
similarResearchResults: {"name": string, "url": string, "date": string, "trust": string, "class": string}[]; similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
references: { "name": string, "url": string}[]; references: { "name": string, "url": string}[];
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[]; contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
} }

View File

@ -2,17 +2,17 @@ export class SearchResult {
title: { "name": string, "accessMode": string}; title: { "name": string, "accessMode": string};
id:string; id:string;
DOI:string; DOI:string;
//publications & organizations: //publications & datasets & organizations:
projects: {"funderShortname": string, "funderName": string, "acronym": string, "title": string, "code": string, "url": string}[]; projects: {"funderShortname": string, "funderName": string, "acronym": string, "title": string, "code": string, "id": string}[];
//datasets & publications //datasets & publications
description: string; description: string;
year: string; year: string;
embargoEndDate: string; embargoEndDate: string;
authors: { "name": string, "url": string}[]; authors: { "name": string, "id": string}[];
//datasets: //datasets:
publisher: string; publisher: string;
//dataproviders & projects: //dataproviders & projects:
organizations: { "name": string, "url": string}[]; organizations: { "name": string, "id": string}[];
//projects: //projects:
funders: {"funderShortname": string, "funderName": string}[]; funders: {"funderShortname": string, "funderName": string}[];
startYear:number; startYear:number;