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:
parent
bce2dfa03b
commit
613f602e98
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
// import { ResultLandingModule } from '../resultLanding.module';
|
||||
|
@ -30,9 +31,9 @@ import { DataProviderRoutingModule } from './dataProvider-routing.module';
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
DataProviderRoutingModule,
|
||||
SearchResultsModule, IFrameModule, MetricsModule, LandingModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule
|
||||
SearchResultsModule, IFrameModule, MetricsModule, LandingModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
@ -42,10 +43,10 @@ import { DataProviderRoutingModule } from './dataProvider-routing.module';
|
|||
],
|
||||
providers:[
|
||||
DataProviderService
|
||||
],
|
||||
],
|
||||
exports: [
|
||||
DataProviderComponent
|
||||
]
|
||||
]
|
||||
|
||||
})
|
||||
export class DataProviderModule { }
|
||||
|
|
|
@ -135,9 +135,9 @@ export class DataProviderService {
|
|||
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]['url'] = OpenaireProperties.getsearchLinkToOrganization()+mydata['to'].content;
|
||||
this.dataProviderInfo.organizations[counter]['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/mydata['to'].content;
|
||||
|
||||
if(mydata.country != '' && mydata['country'].classname != '') {
|
||||
if(!countriesSet.has(mydata['country'].classname)) {
|
||||
|
|
|
@ -34,6 +34,7 @@ export class DatasourcesTabComponent {
|
|||
constructor () {}
|
||||
|
||||
ngOnInit() {
|
||||
console.info("datasources tab: init");
|
||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders()+this.paramsForSearchLink;
|
||||
// console.info(this.linkToSearchDataproviders);
|
||||
}
|
||||
|
|
|
@ -14,12 +14,13 @@ import {Component, Input} from '@angular/core';
|
|||
</p>
|
||||
|
||||
<div *ngFor="let item of organizations">
|
||||
<p *ngIf=" item != undefined && item['url'] != undefined">
|
||||
<a href="{{item['url']}}">
|
||||
<p *ngIf=" item != undefined && item['id'] != undefined">
|
||||
<!--a href="{{item['url']}}"-->
|
||||
<a [queryParams]="{organizationId: item.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
|
||||
{{item['name']}}
|
||||
</a>
|
||||
</p>
|
||||
<p *ngIf="item['url'] == undefined">
|
||||
<p *ngIf="item['id'] == undefined">
|
||||
{{item['name']}}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -29,7 +30,7 @@ import {Component, Input} from '@angular/core';
|
|||
|
||||
export class OrganizationsTabComponent {
|
||||
|
||||
@Input() organizations: {"name": string, "url": string}[] ;
|
||||
@Input() organizations: {"name": string, "id": string}[] ;
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ export class PublicationsTabComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications()+this.paramsForSearchLink;
|
||||
console.info("publications tab: init");
|
||||
}
|
||||
|
||||
ngOnDestroy() {}
|
||||
|
|
|
@ -3,6 +3,7 @@ import {Component, Input} from '@angular/core';
|
|||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||
|
||||
@Component({
|
||||
selector: 'relatedDatasourcesTab',
|
||||
|
@ -28,14 +29,17 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<tbody>
|
||||
<tr *ngFor="let item of fetchPublications.results">
|
||||
<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}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="uk-text-center">
|
||||
<a href="{{linkToSearchPublications}}{{item.id}}&ho=and&collectedFrom={{dataproviderId}}&co=and"
|
||||
target="_blank" class="uk-icon-external-link">
|
||||
{{item.count}}
|
||||
<!--a href="{{linkToSearchPublications}}{{item.id}}&ho=and&collectedFrom={{dataproviderId}}&co=and"-->
|
||||
<a [queryParams]="routerHelper.createQueryParams(['hostedBy', 'ho', 'collectedFrom', 'co'], [item.id, 'and', dataproviderId, 'and'])"
|
||||
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
|
||||
{{item.count}}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -48,12 +52,24 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
export class RelatedDatasourcesTabComponent {
|
||||
@Input() dataproviderId: string;
|
||||
@Input() fetchPublications : FetchPublications;
|
||||
private linkToSearchPublications = "";
|
||||
public linkToSearchPublications: string = "";
|
||||
public searchLinkToDataProvider: string = "";
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
//public queryParams: string[] = [];
|
||||
//public queryParamsIds: string[] = [];
|
||||
|
||||
constructor () {}
|
||||
|
||||
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() {}
|
||||
|
|
|
@ -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 { DOCUMENT } from '@angular/platform-browser';
|
||||
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||
|
@ -16,8 +17,8 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
selector: 'tabs',
|
||||
template: `
|
||||
<ul *ngIf="tabs != undefined" class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<li *ngIf="tabs.length>0" class="uk-active">
|
||||
<a href="#{{tabs[0].content}}">
|
||||
<li *ngIf="tabs.length>0" class="uk-active" id="{{tabs[0].content}}">
|
||||
<a href="{{tabs[0].content}}">
|
||||
{{tabs[0].name}}
|
||||
<i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-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 *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'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[fetchPublications]="fetchPublications">
|
||||
|
@ -129,7 +130,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<projectsTab *ngIf="tabs[0].content=='projectsTab'"
|
||||
<!--projectsTab *ngIf="tabs[0].content=='projectsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[fetchProjects]="fetchProjects">
|
||||
</projectsTab>
|
||||
|
@ -142,7 +143,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</organizationsTab>
|
||||
<relatedDatasourcesTab *ngIf="tabs[0].content=='relatedDatasourcesTab'"
|
||||
[fetchPublications]="fetchPublicationsAggregators">
|
||||
</relatedDatasourcesTab>
|
||||
</relatedDatasourcesTab-->
|
||||
<!--div *ngIf="tabs[0].content=='metricsTab' && metrics == undefined" class = "uk-alert uk-alert-warning">
|
||||
Metrics are currently unavailable
|
||||
</div>
|
||||
|
@ -160,7 +161,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</i-frame>
|
||||
</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'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[fetchPublications] = "fetchPublications">
|
||||
|
@ -226,7 +227,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<metrics *ngIf="i>0 && tab.content=='metricsTab' && metricsClicked"
|
||||
[id]="id" [type]="'datasources'" [name]="name" (metricsResults)="metricsResults($event)">
|
||||
</metrics>
|
||||
|
@ -281,8 +282,8 @@ export class TabsComponent {
|
|||
public fetchProjects: FetchProjects;
|
||||
public fetchDataproviders: FetchDataproviders;
|
||||
public fetchPublicationsAggregators: FetchPublications;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private nativeElement : Node;
|
||||
constructor (private renderer : Renderer, private element : ElementRef,private route: ActivatedRoute,
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDatasetsService: SearchDatasetsService,
|
||||
private _searchProjectsService: SearchProjectsService,
|
||||
|
@ -295,7 +296,33 @@ export class TabsComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
console.info("on changes dataprovider tabs");
|
||||
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.count(1, 0);
|
||||
|
||||
|
@ -345,7 +372,6 @@ export class TabsComponent {
|
|||
} else if(content=='projectsTab') {
|
||||
this.searchProjects(page, size);
|
||||
} else if(content=='datasourcesTab') {
|
||||
console.info("fdsfsfs");
|
||||
this.searchDatasources(page, size);
|
||||
} else if(content=='relatedDatasourcesTab') {
|
||||
this.searchRelatedDatasources(1, 0);
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<tabTable [info]="datasetInfo.relatedResearchResults"></tabTable>
|
||||
<tabTable from="dataset" [info]="datasetInfo.relatedResearchResults"></tabTable>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
@ -90,7 +90,7 @@
|
|||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable [info]="datasetInfo.similarResearchResults"></tabTable>
|
||||
<tabTable from="dataset" [info]="datasetInfo.similarResearchResults"></tabTable>
|
||||
</div>
|
||||
</li>
|
||||
<li id="metricsTab">
|
||||
|
@ -127,16 +127,6 @@
|
|||
</dd>
|
||||
</dl>
|
||||
</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">
|
||||
<dl class="uk-description-list-line functionsSection">
|
||||
<dt class="title">Download from</dt>
|
||||
|
@ -166,12 +156,16 @@
|
|||
| Funder: {{item['funderName']}} ({{item['funderShortname']}})
|
||||
| Funding: {{item['funding']}}"
|
||||
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['acronym']?item['acronym']:item['title']}}
|
||||
</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>
|
||||
{{item['funderShortname']?item['funderShortname']:item['funderName']}}
|
||||
| {{ item['acronym']?item['acronym']:item['title']}}
|
||||
|
@ -202,6 +196,17 @@
|
|||
</dl>
|
||||
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -86,16 +86,16 @@ export class DatasetService {
|
|||
if(mydata.hasOwnProperty("to")) {
|
||||
if(mydata['to'].class == "hasAuthor") {
|
||||
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]['url'] = OpenaireProperties.getsearchLinkToPerson()+mydata['to'].content;
|
||||
this.datasetInfo.authors[mydata.ranking-1]['id'] = /*OpenaireProperties.getsearchLinkToPerson()+*/mydata['to'].content;
|
||||
} else if(mydata['to'].class == "isProducedBy") {
|
||||
if(this.datasetInfo.fundedByProjects == undefined) {
|
||||
this.datasetInfo.fundedByProjects = new Array<
|
||||
{ "url": string, "acronym": string, "title": string,
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "inline": boolean
|
||||
}>();
|
||||
|
@ -104,13 +104,13 @@ export class DatasetService {
|
|||
counter = this.datasetInfo.fundedByProjects.length;
|
||||
|
||||
this.datasetInfo.fundedByProjects[counter] = {
|
||||
"url": "", "acronym": "", "title": "",
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"funding": "", "inline": false
|
||||
}
|
||||
|
||||
this.datasetInfo.fundedByProjects[counter]['url'] =
|
||||
OpenaireProperties.getsearchLinkToProject()+mydata['to'].content;
|
||||
this.datasetInfo.fundedByProjects[counter]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject()+*/mydata['to'].content;
|
||||
this.datasetInfo.fundedByProjects[counter]['acronym'] = mydata.acronym;
|
||||
this.datasetInfo.fundedByProjects[counter]['title'] = mydata.title;
|
||||
|
||||
|
@ -151,24 +151,26 @@ export class DatasetService {
|
|||
} else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||
if(this.datasetInfo.similarResearchResults == undefined) {
|
||||
this.datasetInfo.similarResearchResults = new Array<{
|
||||
"name": string, "url": string, "date": string,
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
}
|
||||
|
||||
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") {
|
||||
url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
|
||||
this.datasetInfo.similarResearchResults[counter]['class'] = "publication";
|
||||
} else {
|
||||
url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
|
||||
this.datasetInfo.similarResearchResults[counter]['class'] = "dataset";
|
||||
}
|
||||
|
||||
this.datasetInfo.similarResearchResults[counter]['url'] = url;
|
||||
this.datasetInfo.similarResearchResults[counter]['name'] = mydata['title'].content;
|
||||
this.datasetInfo.similarResearchResults[counter]['id'] = mydata['to'].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]['trust'] = Math.round(mydata.trust*100)+"%";
|
||||
|
||||
|
@ -176,24 +178,26 @@ export class DatasetService {
|
|||
} else if(mydata['to'].class == "isRelatedTo") {
|
||||
if(this.datasetInfo.relatedResearchResults == undefined) {
|
||||
this.datasetInfo.relatedResearchResults = new Array<{
|
||||
"name": string, "url": string, "date": string,
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
}
|
||||
|
||||
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") {
|
||||
url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToPublication()+mydata['to'].content;
|
||||
this.datasetInfo.relatedResearchResults[counter]['class'] = "publication";
|
||||
} else {
|
||||
url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToDataset()+mydata['to'].content;
|
||||
this.datasetInfo.relatedResearchResults[counter]['class'] = "dataset";
|
||||
}
|
||||
|
||||
this.datasetInfo.relatedResearchResults[counter]['url'] = url;
|
||||
this.datasetInfo.relatedResearchResults[counter]['name'] = mydata['title'].content;
|
||||
this.datasetInfo.relatedResearchResults[counter]['id'] = mydata['to'].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]['trust'] = Math.round(mydata.trust*100)+"%";
|
||||
|
||||
|
@ -405,16 +409,16 @@ export class DatasetService {
|
|||
}
|
||||
|
||||
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 length = data[7].length!=undefined ? data[7].length : 1;
|
||||
for(let i=0; i<length; i++) {
|
||||
mydata = data[7].length!=undefined ? data[7][i] : data[7];
|
||||
let link = OpenaireProperties.getsearchLinkToDataProvider();
|
||||
this.datasetInfo.collectedFrom[i] = {"name": "", "url": ""};
|
||||
//let link = OpenaireProperties.getsearchLinkToDataProvider();
|
||||
this.datasetInfo.collectedFrom[i] = {"name": "", "id": ""};
|
||||
this.datasetInfo.collectedFrom[i]['name'] = mydata.name;
|
||||
this.datasetInfo.collectedFrom[i]['url'] = link+mydata.id;
|
||||
this.datasetInfo.collectedFrom[i]['id'] = /*link+*/mydata.id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,21 +5,20 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {TabPagingComponent} from './tabPaging.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
import {ShowTitleComponent} from './showTitle.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
CommonModule, FormsModule,
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
TabPagingComponent, TabTableComponent, ShowTitleComponent,
|
||||
TabPagingComponent, ShowTitleComponent,
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
TabPagingComponent, TabTableComponent, ShowTitleComponent,
|
||||
TabPagingComponent, ShowTitleComponent,
|
||||
]
|
||||
})
|
||||
export class LandingModule { }
|
||||
|
|
|
@ -100,10 +100,12 @@
|
|||
{{key}}
|
||||
</td>
|
||||
<td *ngIf="fundersSet.has(key)">
|
||||
<a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}">
|
||||
{{item['name']}}
|
||||
<!--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']}}
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { OrganizationServiceModule} from '../../services/organizationService.module';
|
||||
import { OrganizationComponent } from './organization.component';
|
||||
|
@ -13,7 +14,7 @@ import {ReportsServiceModule} from '../../services/reportsService.module';
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
LandingModule,
|
||||
OrganizationRoutingModule,
|
||||
SearchResultsModule,
|
||||
|
|
|
@ -47,7 +47,12 @@
|
|||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</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"
|
||||
[(status)]= "fetchPublications.searchUtils.status"
|
||||
type="publication" urlParam="articleId">
|
||||
|
@ -66,7 +71,12 @@
|
|||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</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"
|
||||
[(status)]= "fetchDatasets.status"
|
||||
type="dataset" urlParam="datasetId">
|
||||
|
|
|
@ -110,11 +110,11 @@ export class PersonComponent {
|
|||
|
||||
private searchPublications() {
|
||||
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() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { PersonService} from './person.service';
|
||||
import { PersonComponent } from './person.component';
|
||||
|
@ -13,7 +14,7 @@ import {PublicationsServiceModule} from '../../services/publicationsService.modu
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
LandingModule,
|
||||
PersonRoutingModule,
|
||||
SearchResultsModule,
|
||||
|
|
|
@ -27,17 +27,18 @@
|
|||
<dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd>
|
||||
<dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt>
|
||||
<dd *ngIf="projectInfo.organizations != undefined">
|
||||
<span *ngFor="let key of projectInfo.organizations.keys() let i=index">
|
||||
<a *ngIf="projectInfo.organizations.get(key) != null &&
|
||||
<span *ngFor="let organization of projectInfo.organizations let i=index">
|
||||
<!--a *ngIf="projectInfo.organizations.get(key) != null &&
|
||||
projectInfo.organizations.get(key) != ''"
|
||||
href="{{(projectInfo.organizations.get(key))}}">
|
||||
{{key}}
|
||||
href="{{(projectInfo.organizations.get(key))}}"-->
|
||||
<a *ngIf="organization.id != null && organization.id != ''"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
|
||||
{{organization.name}}
|
||||
</a>
|
||||
<span *ngIf="projectInfo.organizations.get(key) == null ||
|
||||
projectInfo.organizations.get(key) == ''">
|
||||
{{key}}
|
||||
<span *ngIf="organization.id == null || organization.id == ''">
|
||||
{{organization.name}}
|
||||
</span>
|
||||
<span *ngIf="i<projectInfo.organizations.size-1">,</span>
|
||||
<span *ngIf="i<projectInfo.organizations.length-1">,</span>
|
||||
</span>
|
||||
</dd>
|
||||
<dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { ProjectServiceModule} from './projectService.module';
|
||||
|
|
|
@ -139,10 +139,10 @@ export class ProjectService {
|
|||
}
|
||||
|
||||
if(data[2] != null) {
|
||||
this.projectInfo.organizations = new Map<string, string>();
|
||||
this.projectInfo.organizations = [];//new Map<string, string>();
|
||||
|
||||
let name = "";
|
||||
let url = "";
|
||||
let id = "";
|
||||
|
||||
if(!Array.isArray(data[2])) {
|
||||
if(data[2].hasOwnProperty("legalshortname")) {
|
||||
|
@ -152,10 +152,10 @@ export class ProjectService {
|
|||
}
|
||||
|
||||
if(data[2].hasOwnProperty("to") && name != "") {
|
||||
url = OpenaireProperties.getsearchLinkToOrganization()+data[2]['to'].content;
|
||||
id = /*OpenaireProperties.getsearchLinkToOrganization()+*/data[2]['to'].content;
|
||||
}
|
||||
if(name != "") {
|
||||
this.projectInfo.organizations.set(name, url);
|
||||
this.projectInfo.organizations.push({"name": name, "id": id});
|
||||
}
|
||||
} else {
|
||||
for(let i=0; i<data[2].length; i++) {
|
||||
|
@ -167,11 +167,11 @@ export class ProjectService {
|
|||
}
|
||||
|
||||
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 != "") {
|
||||
this.projectInfo.organizations.set(name, url);
|
||||
this.projectInfo.organizations.push({"name": name, "id": id});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
<div class="uk-text-justify">{{publicationInfo.description}}</div>
|
||||
</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>
|
||||
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<li class="uk-active">
|
||||
<ul class="uk-tab" data-uk-switcher="{connect: '#tab-content'}">
|
||||
<li id="citationsTab" class="uk-active">
|
||||
<a href="#citationsTab">
|
||||
References
|
||||
<span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -104,7 +104,7 @@
|
|||
</ul>
|
||||
|
||||
<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" >
|
||||
There are no references
|
||||
|
@ -157,7 +157,7 @@
|
|||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable [info]="publicationInfo.relatedResearchResults"></tabTable>
|
||||
<tabTable from="publication" [info]="publicationInfo.relatedResearchResults"></tabTable>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
@ -172,7 +172,7 @@
|
|||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable [info]="publicationInfo.similarResearchResults"></tabTable>
|
||||
<tabTable from="publication" [info]="publicationInfo.similarResearchResults"></tabTable>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab">
|
||||
|
@ -336,12 +336,16 @@
|
|||
| Funding: {{item['funding']}}"
|
||||
class="line" *ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<a *ngIf="!item['inline']" href="{{item['url']}}">
|
||||
{{item['funderShortname']?item['funderShortname']:item['funderName']}}
|
||||
| {{ item['acronym']?item['acronym']:item['title']}}
|
||||
<!--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['acronym']?item['acronym']:item['title']}}
|
||||
</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>
|
||||
{{item['funderShortname']?item['funderShortname']:item['funderName']}}
|
||||
| {{ item['acronym']?item['acronym']:item['title']}}
|
||||
|
@ -388,8 +392,10 @@
|
|||
<dl class="uk-description-list-line">
|
||||
<dt>Collected from</dt>
|
||||
<dd *ngFor="let item of publicationInfo.collectedFrom let i=index">
|
||||
<a *ngIf="i<5 || showAllCollectedFrom" href="{{item['url']}}">
|
||||
{{item['name']}}
|
||||
<!--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']}}
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="showAllCollectedFrom" class="uk-text-right">
|
||||
|
|
|
@ -46,19 +46,19 @@ export class PublicationComponent {
|
|||
private route: ActivatedRoute) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.sub = this.route.queryParams.subscribe(data => {
|
||||
this.articleId = data['articleId'];
|
||||
console.info("Article id is :"+this.articleId);
|
||||
if(this.articleId){
|
||||
this.getPublicationInfo(this.articleId);
|
||||
}else{
|
||||
console.info("Article id not found");
|
||||
}
|
||||
});
|
||||
this.sub = this.route.queryParams.subscribe(data => {
|
||||
this.articleId = data['articleId'];
|
||||
console.info("Article id is :"+this.articleId);
|
||||
if(this.articleId){
|
||||
this.getPublicationInfo(this.articleId);
|
||||
}else{
|
||||
console.info("Article id not found");
|
||||
}
|
||||
|
||||
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.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.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.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() {
|
||||
|
|
|
@ -88,16 +88,16 @@ export class PublicationService {
|
|||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
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]['url'] = OpenaireProperties.getsearchLinkToPerson() + relation['to'].content;
|
||||
this.publicationInfo.authors[relation.ranking-1]['id'] = /*OpenaireProperties.getsearchLinkToPerson() + */relation['to'].content;
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
if(this.publicationInfo.fundedByProjects == undefined) {
|
||||
this.publicationInfo.fundedByProjects = new Array<
|
||||
{ "url": string, "acronym": string, "title": string,
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "inline": boolean
|
||||
}>();
|
||||
|
@ -106,13 +106,13 @@ export class PublicationService {
|
|||
counter = this.publicationInfo.fundedByProjects.length;
|
||||
|
||||
this.publicationInfo.fundedByProjects[counter] = {
|
||||
"url": "", "acronym": "", "title": "",
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"funding": "", "code": "", "inline": false
|
||||
}
|
||||
|
||||
this.publicationInfo.fundedByProjects[counter]['url'] =
|
||||
OpenaireProperties.getsearchLinkToProject() + relation['to'].content;
|
||||
this.publicationInfo.fundedByProjects[counter]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
|
||||
this.publicationInfo.fundedByProjects[counter]['acronym'] = relation.acronym;
|
||||
this.publicationInfo.fundedByProjects[counter]['title'] = relation.title;
|
||||
this.publicationInfo.fundedByProjects[counter]['code'] = relation.code;
|
||||
|
@ -154,48 +154,52 @@ export class PublicationService {
|
|||
} else if(relation['to'].class == "isRelatedTo") {
|
||||
if(this.publicationInfo.relatedResearchResults == undefined) {
|
||||
this.publicationInfo.relatedResearchResults = new Array<{
|
||||
"name": string, "url": string, "date": string,
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
}
|
||||
|
||||
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") {
|
||||
url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
|
||||
this.publicationInfo.relatedResearchResults[counter]['class'] = "publication";
|
||||
} else {
|
||||
url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
|
||||
this.publicationInfo.relatedResearchResults[counter]['class'] = "dataset";
|
||||
}
|
||||
|
||||
this.publicationInfo.relatedResearchResults[counter]['url'] = url;
|
||||
this.publicationInfo.relatedResearchResults[counter]['name'] = relation['title'].content;
|
||||
this.publicationInfo.relatedResearchResults[counter]['id'] = relation['to'].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]['trust'] = Math.round(relation.trust*100)+"%";
|
||||
|
||||
} else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||
if(this.publicationInfo.similarResearchResults == undefined) {
|
||||
this.publicationInfo.similarResearchResults = new Array<{
|
||||
"name": string, "url": string, "date": string,
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
}
|
||||
|
||||
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") {
|
||||
url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToPublication() + relation['to'].content;
|
||||
this.publicationInfo.similarResearchResults[counter]['class'] = "publication";
|
||||
} else {
|
||||
url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
|
||||
//url = OpenaireProperties.getsearchLinkToDataset() + relation['to'].content;
|
||||
this.publicationInfo.similarResearchResults[counter]['class'] = "dataset";
|
||||
}
|
||||
|
||||
this.publicationInfo.similarResearchResults[counter]['url'] = url;
|
||||
this.publicationInfo.similarResearchResults[counter]['name'] = relation['title'].content;
|
||||
this.publicationInfo.similarResearchResults[counter]['id'] = relation['to'].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]['trust'] = Math.round(relation.trust*100)+"%";
|
||||
}
|
||||
|
@ -510,16 +514,16 @@ export class PublicationService {
|
|||
}
|
||||
|
||||
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 length = Array.isArray(data[9]) ? data[9].length : 1;
|
||||
for(let i=0; i<length; i++) {
|
||||
collectedFrom = Array.isArray(data[9]) ? data[9][i] : data[9];
|
||||
let link = OpenaireProperties.getsearchLinkToDataProvider();
|
||||
this.publicationInfo.collectedFrom[i] = {"name": "", "url": ""};
|
||||
//let link = OpenaireProperties.getsearchLinkToDataProvider();
|
||||
this.publicationInfo.collectedFrom[i] = {"name": "", "id": ""};
|
||||
this.publicationInfo.collectedFrom[i]['name'] = collectedFrom.name;
|
||||
this.publicationInfo.collectedFrom[i]['url'] = link + collectedFrom.id;
|
||||
this.publicationInfo.collectedFrom[i]['id'] = /*link + */collectedFrom.id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,18 +7,19 @@ import { RouterModule } from '@angular/router';
|
|||
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||
import {ShowIdentifiersComponent} from './showIdentifiers.component';
|
||||
import {ShowSubjectsComponent} from './showSubjects.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingModule { }
|
||||
|
|
|
@ -8,15 +8,16 @@ import {Component, Input} from '@angular/core';
|
|||
<a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
|
||||
</div>
|
||||
<span *ngFor="let item of authors.slice(0,30)">
|
||||
<a href="{{item['url']}}">
|
||||
<!--a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: 'datacite____::9da3a037961b36a634fcd40ab0bf6535'}" -->
|
||||
<!--a href="{{item['url']}}"-->
|
||||
<a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">
|
||||
{{item['name']}};
|
||||
</a>
|
||||
</span>
|
||||
<span *ngIf="!showAll && authors.length > 30"> ... </span>
|
||||
<span *ngIf="showAll">
|
||||
<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']}};
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
import {RouterHelper} from '../utils/routerHelper.class';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
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>
|
||||
<a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}">
|
||||
{{item['name']}}
|
||||
<!--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']}}
|
||||
</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'] != ''">
|
||||
({{item['date']}})
|
||||
</span>
|
||||
|
@ -44,13 +66,20 @@ import {Component, Input} from '@angular/core';
|
|||
})
|
||||
|
||||
export class TabTableComponent {
|
||||
@Input() from: string = "publication";
|
||||
@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 () {
|
||||
console.info('tabTable constructor');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.info('tabTable ngOnInit');
|
||||
this.searchLinkToPublication = OpenaireProperties.getsearchLinkToPublication();
|
||||
this.searchLinkToDataset = OpenaireProperties.getsearchLinkToDataset();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<div>
|
||||
<span *ngIf="result['authors'] != undefined">
|
||||
<span *ngFor="let author of result['authors'].slice(0,15)">
|
||||
<a href="{{author['url']}}">
|
||||
<!--a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}"-->
|
||||
<!--a href="{{author['url']}}"-->
|
||||
<a [queryParams]="{personId: author.id}" routerLinkActive="router-link-active" routerLink="/search/person">
|
||||
{{author['name']}};
|
||||
</a>
|
||||
</span>
|
||||
|
@ -48,11 +48,12 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<div *ngIf="result['projects'] != undefined">
|
||||
<span> Projects: </span>
|
||||
<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['acronym']?project['acronym']:project['title']}} ({{project.code}})
|
||||
</a>
|
||||
<p *ngIf="project.url == undefined">
|
||||
<p *ngIf="project.id == undefined">
|
||||
{{project['funderShortname']?project['funderShortname']:project['funderName']}}
|
||||
| {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}})
|
||||
</p>
|
||||
|
@ -84,10 +85,11 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0">
|
||||
<span> Organizations: </span>
|
||||
<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}}
|
||||
</a>
|
||||
<span *ngIf="organization.url == undefined">
|
||||
<span *ngIf="organization.id == undefined">
|
||||
{{organization.name}}
|
||||
</span>
|
||||
<span *ngIf="i < result['organizations'].length-1"> ,</span>
|
||||
|
|
|
@ -97,7 +97,7 @@ export class OrganizationService {
|
|||
if(mydata['funding'].hasOwnProperty("funder")) {
|
||||
if(this.organizationInfo.projects == undefined) {
|
||||
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,
|
||||
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
|
||||
"sc39": string, "startDate": string, "endDate": string }[]>();
|
||||
|
@ -105,7 +105,7 @@ export class OrganizationService {
|
|||
|
||||
if(!this.organizationInfo.projects.has(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,
|
||||
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
|
||||
"sc39": string, "startDate": string, "endDate": string }>());
|
||||
|
@ -113,18 +113,18 @@ export class OrganizationService {
|
|||
|
||||
counter = this.organizationInfo.projects.get(mydata['funding']['funder'].name).length;
|
||||
this.organizationInfo.projects.get(mydata['funding']['funder'].name)[counter] =
|
||||
{ "name": "", "id": "", "url": "", "code": "",
|
||||
{ "name": "", "id": "", "code": "",
|
||||
"acronym": "", "funder": "", "funderId": "",
|
||||
"fundingStream": "", "fundingLevel1": "", "fundingLevel2": "",
|
||||
"sc39": "", "startDate": "", "endDate": "" };
|
||||
|
||||
let url = "";
|
||||
//let url = "";
|
||||
if(mydata['to'].content != null && 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]['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]['acronym'] = mydata.acronym;
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ export class SearchDataprovidersService {
|
|||
|
||||
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['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 organizations: {"name": string, "url": string}[] = [];
|
||||
let organizations: {"name": string, "id": string}[] = [];
|
||||
|
||||
if(resData['rels'].hasOwnProperty("rel")) {
|
||||
let countriesSet: Set<string> = new Set<string>();
|
||||
|
@ -319,9 +319,9 @@ export class SearchDataprovidersService {
|
|||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "provides" && relation['to'].type == "organization") {
|
||||
if(getOrganizations) {
|
||||
let item: {"name":string, "url":string} = {"name": "", "url": ""};
|
||||
let item: {"name":string, "id":string} = {"name": "", "id": ""};
|
||||
item['name'] = relation.legalname;
|
||||
item['url'] = OpenaireProperties.getsearchLinkToOrganization()+relation['to'].content;
|
||||
item['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/relation['to'].content;
|
||||
organizations.push(item);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,14 +170,14 @@ export class SearchDatasetsService {
|
|||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
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") {
|
||||
if(result['projects'] == undefined) {
|
||||
result['projects'] = new Array<
|
||||
{ "url": string, "acronym": string, "title": string,
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"code": string
|
||||
}>();
|
||||
|
@ -186,13 +186,13 @@ export class SearchDatasetsService {
|
|||
let countProjects = result['projects'].length;
|
||||
|
||||
result['projects'][countProjects] = {
|
||||
"url": "", "acronym": "", "title": "",
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"code": ""
|
||||
}
|
||||
|
||||
result['projects'][countProjects]['url'] =
|
||||
OpenaireProperties.getsearchLinkToProject() + relation['to'].content;
|
||||
result['projects'][countProjects]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
|
||||
result['projects'][countProjects]['acronym'] = relation.acronym;
|
||||
result['projects'][countProjects]['title'] = relation.title;
|
||||
result['projects'][countProjects]['code'] = relation.code;
|
||||
|
|
|
@ -118,7 +118,7 @@ export class SearchOrganizationsService {
|
|||
if(relation['to'].class == "isParticipant") {
|
||||
if(result['projects'] == undefined) {
|
||||
result['projects'] = new Array<
|
||||
{ "url": string, "acronym": string, "title": string,
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"code": string
|
||||
}>();
|
||||
|
@ -127,13 +127,13 @@ export class SearchOrganizationsService {
|
|||
let countProjects = result['projects'].length;
|
||||
|
||||
result['projects'][countProjects] = {
|
||||
"url": "", "acronym": "", "title": "",
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"code": ""
|
||||
}
|
||||
|
||||
result['projects'][countProjects]['url'] =
|
||||
OpenaireProperties.getsearchLinkToProject() + relation['to'].content;
|
||||
result['projects'][countProjects]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
|
||||
result['projects'][countProjects]['acronym'] = relation.acronym;
|
||||
result['projects'][countProjects]['title'] = relation.title;
|
||||
result['projects'][countProjects]['code'] = relation.code;
|
||||
|
|
|
@ -156,20 +156,16 @@ export class SearchProjectsService {
|
|||
if(relation['to'].class == "hasParticipant") {
|
||||
if(result['organizations'] == undefined) {
|
||||
result['organizations'] = new Array<
|
||||
{ "name": string, "url": string}>();
|
||||
{ "name": string, "id": string}>();
|
||||
}
|
||||
|
||||
let countOrganizations = result['organizations'].length;
|
||||
|
||||
result['organizations'][countOrganizations] = { "name": "", "url": "" }
|
||||
result['organizations'][countOrganizations] = { "name": "", "id": "" }
|
||||
|
||||
result['organizations'][countOrganizations]['url'] =
|
||||
OpenaireProperties.getsearchLinkToOrganization() + relation['to'].content;
|
||||
result['organizations'][countOrganizations]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToOrganization() + */relation['to'].content;
|
||||
result['organizations'][countOrganizations]['name'] = relation.legalname;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,14 +237,14 @@ export class SearchPublicationsService {
|
|||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
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") {
|
||||
if(result['projects'] == undefined) {
|
||||
result['projects'] = new Array<
|
||||
{ "url": string, "acronym": string, "title": string,
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"code": string
|
||||
}>();
|
||||
|
@ -253,13 +253,13 @@ export class SearchPublicationsService {
|
|||
let countProjects = result['projects'].length;
|
||||
|
||||
result['projects'][countProjects] = {
|
||||
"url": "", "acronym": "", "title": "",
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"code": ""
|
||||
}
|
||||
|
||||
result['projects'][countProjects]['url'] =
|
||||
OpenaireProperties.getsearchLinkToProject() + relation['to'].content;
|
||||
result['projects'][countProjects]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
|
||||
result['projects'][countProjects]['acronym'] = relation.acronym;
|
||||
result['projects'][countProjects]['title'] = relation.title;
|
||||
result['projects'][countProjects]['code'] = relation.code;
|
||||
|
@ -400,10 +400,10 @@ export class SearchPublicationsService {
|
|||
for(let i=0; i<length; i++) {
|
||||
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['id'] = datasource.id.split("||")[0];
|
||||
result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
|
||||
//result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
|
||||
result['count'] = datasource.count;
|
||||
|
||||
results.push(result);
|
||||
|
|
|
@ -94,7 +94,7 @@ export class DataProviderInfo {
|
|||
])
|
||||
};
|
||||
|
||||
organizations: {"name": string, "url": string}[] = [];
|
||||
organizations: {"name": string, "id": string}[] = [];
|
||||
//publications: any;
|
||||
//datasets: any;
|
||||
statistics: any;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export class DatasetInfo {
|
||||
title: { "name": string, "url": string, "accessMode": string};
|
||||
authors: { "name": string, "url": string}[];
|
||||
authors: { "name": string, "id": string}[];
|
||||
date: string;
|
||||
embargoEndDate: string;
|
||||
type: string;
|
||||
|
@ -13,11 +13,11 @@ export class DatasetInfo {
|
|||
classifiedSubjects: Map<string, string[]>;
|
||||
description: string;
|
||||
bestlicense: string;
|
||||
collectedFrom: { "name": string, "url": string}[];
|
||||
fundedByProjects: { "url": string, "acronym": string, "title": string,
|
||||
collectedFrom: { "name": string, "id": string}[];
|
||||
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "inline": boolean}[];
|
||||
relatedResearchResults: { "name": string, "url": string, "date": string, "trust": string, "class": string}[];
|
||||
similarResearchResults: {"name": string, "url": string, "date": string, "trust": string, "class": string}[];
|
||||
relatedResearchResults: { "name": string, "id": 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}[];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ export class OrganizationInfo {
|
|||
name: 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,
|
||||
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string,
|
||||
"sc39": string, "startDate": string, "endDate": string }[]>;
|
||||
|
|
|
@ -9,7 +9,7 @@ export class ProjectInfo {
|
|||
endDate: string;
|
||||
openAccessMandate: string;
|
||||
specialClause39: string;
|
||||
organizations: Map<string, string>;
|
||||
organizations: { "name": string, "id": string }[];//Map<string, string>;
|
||||
url: string;
|
||||
urlInfo: string;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export class PublicationInfo {
|
||||
title: { "name": string, "url": string, "accessMode": string};
|
||||
authors: { "name": string, "url": string}[];
|
||||
authors: { "name": string, "id": string}[];
|
||||
date: string;
|
||||
embargoEndDate: string;
|
||||
types: string[];
|
||||
|
@ -17,16 +17,16 @@ export class PublicationInfo {
|
|||
classifiedSubjects: Map<string, string[]>; //<class of subject, subjects>
|
||||
description: string;
|
||||
bestlicense: string;
|
||||
collectedFrom: { "name": string, "url": string}[];
|
||||
fundedByProjects: { "url": string, "acronym": string, "title": string,
|
||||
collectedFrom: { "name": string, "id": string}[];
|
||||
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, inline: boolean}[];
|
||||
//relatedPublications: { "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}[];
|
||||
//similarDatasets: {"name": string, "url": string, "date": string, "trust": string}[];
|
||||
relatedResearchResults: { "name": string, "url": string, "date": string, "trust": string, "class": string}[];
|
||||
similarResearchResults: {"name": string, "url": string, "date": string, "trust": string, "class": string}[];
|
||||
relatedResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
||||
references: { "name": string, "url": string}[];
|
||||
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@ export class SearchResult {
|
|||
title: { "name": string, "accessMode": string};
|
||||
id:string;
|
||||
DOI:string;
|
||||
//publications & organizations:
|
||||
projects: {"funderShortname": string, "funderName": string, "acronym": string, "title": string, "code": string, "url": string}[];
|
||||
//publications & datasets & organizations:
|
||||
projects: {"funderShortname": string, "funderName": string, "acronym": string, "title": string, "code": string, "id": string}[];
|
||||
//datasets & publications
|
||||
description: string;
|
||||
year: string;
|
||||
embargoEndDate: string;
|
||||
authors: { "name": string, "url": string}[];
|
||||
authors: { "name": string, "id": string}[];
|
||||
//datasets:
|
||||
publisher: string;
|
||||
//dataproviders & projects:
|
||||
organizations: { "name": string, "url": string}[];
|
||||
organizations: { "name": string, "id": string}[];
|
||||
//projects:
|
||||
funders: {"funderShortname": string, "funderName": string}[];
|
||||
startYear:number;
|
||||
|
|
Loading…
Reference in New Issue