Publications' tab in dataprovider's and person's landing pages completed | Datasets' tab in project's, dataprovider's and person's landing pages completed | Dataproviders' tab in organization's landing page completed | (view all links should be fixed)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44072 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8308223b18
commit
f888c6937d
|
@ -12,7 +12,7 @@ import {DepositResultComponent} from './depositResult.component';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule,
|
CommonModule, FormsModule,
|
||||||
UtilsModule
|
UtilsModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
DepositComponent,
|
DepositComponent,
|
||||||
|
|
|
@ -32,9 +32,8 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<tabs [tabs]="dataProviderInfo.tabs"
|
<tabs [id] = "datasourceId"
|
||||||
[publications]="dataProviderInfo.publications"
|
[tabs]="dataProviderInfo.tabs"
|
||||||
[datasets]="dataProviderInfo.datasets"
|
|
||||||
[statistics]="dataProviderInfo.statistics"
|
[statistics]="dataProviderInfo.statistics"
|
||||||
[projects]="dataProviderInfo.projects"
|
[projects]="dataProviderInfo.projects"
|
||||||
[datasources]="dataProviderInfo.datasources">
|
[datasources]="dataProviderInfo.datasources">
|
||||||
|
|
|
@ -1,28 +1,39 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
|
|
||||||
|
import { SearchDatasetsComponent } from '../../searchPages/searchDatasets.component';
|
||||||
|
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||||
|
|
||||||
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'datasetsTab',
|
selector: 'datasetsTab',
|
||||||
template: `
|
template: `
|
||||||
<div *ngIf="datasets == undefined" class = "alert alert-info " >
|
<div *ngIf="searchDatasetsComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
There are no datasets
|
There are no datasets
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="datasets != undefined">
|
<div *ngIf="searchDatasetsComponent.totalResults > 0">
|
||||||
<p>
|
<p>
|
||||||
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>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchDatasetsComponent.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class DatasetsTabComponent {
|
export class DatasetsTabComponent {
|
||||||
|
|
||||||
@Input() datasets;
|
@Input() searchDatasetsComponent : SearchDatasetsComponent;
|
||||||
|
private linkToSearchDatasets = "";
|
||||||
|
|
||||||
constructor () {}
|
constructor () {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy() {}
|
ngOnDestroy() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,39 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
|
|
||||||
|
import { SearchPublicationsComponent } from '../../searchPages/searchPublications.component';
|
||||||
|
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||||
|
|
||||||
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'publicationsTab',
|
selector: 'publicationsTab',
|
||||||
template: `
|
template: `
|
||||||
<div *ngIf="publications == undefined" class = "alert alert-info " >
|
<div *ngIf="searchPublicationsComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
There are no publications
|
There are no publications
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="publications != undefined">
|
<div *ngIf="searchPublicationsComponent.totalResults > 0">
|
||||||
<p>
|
<p>
|
||||||
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>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchPublicationsComponent.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class PublicationsTabComponent {
|
export class PublicationsTabComponent {
|
||||||
|
|
||||||
@Input() publications;
|
@Input() searchPublicationsComponent : SearchPublicationsComponent;
|
||||||
|
private linkToSearchPublications = "";
|
||||||
|
|
||||||
constructor () {}
|
constructor () {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy() {}
|
ngOnDestroy() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
|
import {ActivatedRoute, Params} from '@angular/router';
|
||||||
|
|
||||||
|
import { SearchPublicationsComponent } from '../../searchPages/searchPublications.component';
|
||||||
|
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||||
|
import { SearchDatasetsComponent } from '../../searchPages/searchDatasets.component';
|
||||||
|
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||||
|
import {RefineResultsService} from '../../services/servicesUtils/refineResuts.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tabs',
|
selector: 'tabs',
|
||||||
|
@ -7,12 +14,24 @@ import {Component, Input} from '@angular/core';
|
||||||
<li *ngIf="tabs.length>0" class="active">
|
<li *ngIf="tabs.length>0" class="active">
|
||||||
<a data-toggle="tab" href="#{{tabs[0].content}}">
|
<a data-toggle="tab" href="#{{tabs[0].content}}">
|
||||||
{{tabs[0].name}}
|
{{tabs[0].name}}
|
||||||
|
<span class="badge" *ngIf="tabs[0].content=='publicationsTab'">
|
||||||
|
{{searchPublicationsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
|
<span class="badge" *ngIf="tabs[0].content=='datasetsTab'">
|
||||||
|
{{searchDatasetsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li *ngFor="let tab of tabs; let i=index" role="presentation">
|
<li *ngFor="let tab of tabs; let i=index" role="presentation">
|
||||||
<a *ngIf="i>0" data-toggle="tab" href="#{{tab.content}}">
|
<a *ngIf="i>0" data-toggle="tab" href="#{{tab.content}}">
|
||||||
{{tab.name}}
|
{{tab.name}}
|
||||||
|
<span class="badge" *ngIf="tab.content=='publicationsTab'">
|
||||||
|
{{searchPublicationsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
|
<span class="badge" *ngIf="tab.content=='datasetsTab'">
|
||||||
|
{{searchDatasetsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -20,10 +39,10 @@ import {Component, Input} from '@angular/core';
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div *ngIf="tabs.length>0" id="{{tabs[0].content}}" class="tab-pane fade in active panel-body">
|
<div *ngIf="tabs.length>0" id="{{tabs[0].content}}" class="tab-pane fade in active panel-body">
|
||||||
<publicationsTab *ngIf="tabs[0].content=='publicationsTab'"
|
<publicationsTab *ngIf="tabs[0].content=='publicationsTab'"
|
||||||
[publications]="publications">
|
[searchPublicationsComponent]="searchPublicationsComponent">
|
||||||
</publicationsTab>
|
</publicationsTab>
|
||||||
<datasetsTab *ngIf="tabs[0].content=='datasetsTab'"
|
<datasetsTab *ngIf="tabs[0].content=='datasetsTab'"
|
||||||
[datasets]="datasets">
|
[searchDatasetsComponent]="searchDatasetsComponent">
|
||||||
</datasetsTab>
|
</datasetsTab>
|
||||||
<statisticsTab *ngIf="tabs[0].content=='statisticsTab'"
|
<statisticsTab *ngIf="tabs[0].content=='statisticsTab'"
|
||||||
[statistics]="statistics">
|
[statistics]="statistics">
|
||||||
|
@ -37,7 +56,9 @@ import {Component, Input} from '@angular/core';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngFor="let tab of tabs; let i=index" id="{{tab.content}}" class="tab-pane fade panel-body">
|
<div *ngFor="let tab of tabs; let i=index" id="{{tab.content}}" class="tab-pane fade panel-body">
|
||||||
<publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'"></publicationsTab>
|
<publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'"
|
||||||
|
[searchPublicationsComponent] = "searchPublicationsComponent">
|
||||||
|
</publicationsTab>
|
||||||
<datasetsTab *ngIf="i>0 && tab.content=='datasetsTab'"></datasetsTab>
|
<datasetsTab *ngIf="i>0 && tab.content=='datasetsTab'"></datasetsTab>
|
||||||
<statisticsTab *ngIf="i>0 && tab.content=='statisticsTab'">trgfrg</statisticsTab>
|
<statisticsTab *ngIf="i>0 && tab.content=='statisticsTab'">trgfrg</statisticsTab>
|
||||||
<projectsTab *ngIf="i>0 && tab.content=='projectsTab'"></projectsTab>
|
<projectsTab *ngIf="i>0 && tab.content=='projectsTab'"></projectsTab>
|
||||||
|
@ -49,16 +70,48 @@ import {Component, Input} from '@angular/core';
|
||||||
|
|
||||||
export class TabsComponent {
|
export class TabsComponent {
|
||||||
|
|
||||||
|
@Input() id: string;
|
||||||
@Input() tabs: {"name": string, "content": string}[];
|
@Input() tabs: {"name": string, "content": string}[];
|
||||||
@Input() publications;
|
//@Input() publications;
|
||||||
@Input() datasets;
|
//@Input() datasets;
|
||||||
@Input() statistics;
|
@Input() statistics;
|
||||||
@Input() projects;
|
@Input() projects;
|
||||||
@Input() datasources;
|
@Input() datasources;
|
||||||
|
|
||||||
constructor () {}
|
subPublications: any;
|
||||||
|
subDatasets: any;
|
||||||
|
|
||||||
ngOnInit() {}
|
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||||
|
private searchDatasetsComponent: SearchDatasetsComponent;
|
||||||
|
|
||||||
ngOnDestroy() {}
|
constructor (private route: ActivatedRoute,
|
||||||
|
private _searchPublicationsService: SearchPublicationsService,
|
||||||
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
private _refineResultsService:RefineResultsService) {
|
||||||
|
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||||
|
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService, this._refineResultsService);
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.subPublications = this.route.queryParams.subscribe(params => {
|
||||||
|
this.searchPublications();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.subDatasets = this.route.queryParams.subscribe(params => {
|
||||||
|
this.searchDatasets();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.subPublications.unsubscribe();
|
||||||
|
this.subDatasets.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
private searchPublications() {
|
||||||
|
this.searchPublicationsComponent.getResults(this.id, 1, 10, "dataproviderPage");
|
||||||
|
}
|
||||||
|
|
||||||
|
private searchDatasets() {
|
||||||
|
this.searchDatasetsComponent.getResults(this.id, 1, 10, "dataproviderPage");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,12 +25,10 @@ import {TabsComponent} from './dataProvider/tabs.component';
|
||||||
|
|
||||||
|
|
||||||
import {DataProviderComponent} from './dataProvider/dataProvider.component';
|
import {DataProviderComponent} from './dataProvider/dataProvider.component';
|
||||||
|
|
||||||
import { PersonComponent } from './person/person.component';
|
import { PersonComponent } from './person/person.component';
|
||||||
import { ProjectComponent } from './project/project.component';
|
import { ProjectComponent } from './project/project.component';
|
||||||
import { OrganizationComponent } from './organization/organization.component';
|
import { OrganizationComponent } from './organization/organization.component';
|
||||||
import { DatasetComponent } from './dataset/dataset.component';
|
import { DatasetComponent } from './dataset/dataset.component';
|
||||||
|
|
||||||
import { PublicationComponent } from './publication/publication.component';
|
import { PublicationComponent } from './publication/publication.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -36,9 +36,12 @@
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a data-toggle="tab" href="#dataProvidersTab">
|
<a data-toggle="tab" href="#dataProvidersTab">
|
||||||
Data Providers
|
Data Providers
|
||||||
<span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
|
<!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
|
||||||
<span *ngIf="organizationInfo.dataProviders != undefined" class="badge">
|
<span *ngIf="organizationInfo.dataProviders != undefined" class="badge">
|
||||||
{{organizationInfo.dataProviders.length}}
|
{{organizationInfo.dataProviders.length}}
|
||||||
|
</span-->
|
||||||
|
<span class="badge">
|
||||||
|
{{searchDataprovidersComponent.totalResults}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -104,7 +107,20 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="dataProvidersTab" class="tab-pane fade panel-body">
|
<div id="dataProvidersTab" class="tab-pane fade panel-body">
|
||||||
<showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders>
|
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
|
||||||
|
<div *ngIf="searchDataprovidersComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
|
There are no dataproviders
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="searchDataprovidersComponent.totalResults > 0">
|
||||||
|
<p>
|
||||||
|
The results below are discovered through our pilot algorithms.
|
||||||
|
<a href="mailto:">Let us know how we are doing!</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchDataprovidersComponent.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,15 +4,39 @@ import {ActivatedRoute} from '@angular/router';
|
||||||
import {OrganizationService} from '../../services/organization.service';
|
import {OrganizationService} from '../../services/organization.service';
|
||||||
import {OrganizationInfo} from '../../utils/entities/organizationInfo';
|
import {OrganizationInfo} from '../../utils/entities/organizationInfo';
|
||||||
|
|
||||||
|
import { SearchDataprovidersComponent } from '../../searchPages/searchDataproviders.component';
|
||||||
|
import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
|
||||||
|
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||||
|
|
||||||
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'organization',
|
selector: 'organization',
|
||||||
templateUrl: 'organization.component.html',
|
templateUrl: 'organization.component.html',
|
||||||
})
|
})
|
||||||
|
|
||||||
export class OrganizationComponent {
|
export class OrganizationComponent {
|
||||||
|
|
||||||
|
organizationInfo: OrganizationInfo;
|
||||||
|
private organizationId: string;
|
||||||
|
private projectsNum : number = 0;
|
||||||
|
private fundersSet: Set<string>;
|
||||||
|
private emptyFundersSet: boolean = true;
|
||||||
|
public warningMessage = "";
|
||||||
|
public errorMessage = "";
|
||||||
|
private data : any = { "export":[] };
|
||||||
|
|
||||||
|
sub: any;
|
||||||
|
subDataproviders: any;
|
||||||
|
|
||||||
|
private searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||||
|
private linkToSearchDataproviders = "";
|
||||||
|
|
||||||
constructor (private _organizationService: OrganizationService,
|
constructor (private _organizationService: OrganizationService,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private _searchDataprovidersService: SearchDataprovidersService) {
|
||||||
console.info('organization constructor');
|
console.info('organization constructor');
|
||||||
|
this.searchDataprovidersComponent = new SearchDataprovidersComponent(this.route, this._searchDataprovidersService);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -26,22 +50,17 @@ export class OrganizationComponent {
|
||||||
this.warningMessage="No valid project id";
|
this.warningMessage="No valid project id";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
organizationInfo: OrganizationInfo;
|
this.subDataproviders = this.route.queryParams.subscribe(params => {
|
||||||
private organizationId: string;
|
this.searchDataproviders();
|
||||||
private projectsNum : number = 0;
|
});
|
||||||
private fundersSet: Set<string>;
|
}
|
||||||
private emptyFundersSet: boolean = true;
|
|
||||||
public warningMessage = "";
|
|
||||||
public errorMessage = "";
|
|
||||||
private data : any = { "export":[] };
|
|
||||||
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
|
this.subDataproviders.unsubscribe();
|
||||||
}
|
}
|
||||||
sub: any;
|
|
||||||
|
|
||||||
private getOrganizationInfo () {
|
private getOrganizationInfo () {
|
||||||
console.info("inside getProjectInfo of component");
|
console.info("inside getProjectInfo of component");
|
||||||
|
@ -114,4 +133,10 @@ export class OrganizationComponent {
|
||||||
quote(word: string): string {
|
quote(word: string): string {
|
||||||
return '"'+word+'"';
|
return '"'+word+'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private searchDataproviders() {
|
||||||
|
this.searchDataprovidersComponent.getResults(this.organizationId, 1, 10, "organizationPage");
|
||||||
|
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,17 @@
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a data-toggle="tab" href="#publicationsTab">
|
<a data-toggle="tab" href="#publicationsTab">
|
||||||
Publications
|
Publications
|
||||||
|
<span class="badge">
|
||||||
|
{{searchPublicationsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a data-toggle="tab" href="#researchDataTab">
|
<a data-toggle="tab" href="#researchDataTab">
|
||||||
Research Data
|
Research Data
|
||||||
|
<span class="badge">
|
||||||
|
{{searchDatasetsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -36,27 +42,34 @@
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div id="publicationsTab" class="tab-pane fade in active panel-body">
|
<div id="publicationsTab" class="tab-pane fade in active panel-body">
|
||||||
|
|
||||||
<div *ngIf="personInfo.publications == undefined" class = "alert alert-info " >
|
<div *ngIf="searchPublicationsComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
There are no publications
|
There are no publications
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="personInfo.publications != undefined">
|
<div *ngIf="searchPublicationsComponent.totalResults > 0">
|
||||||
<p>
|
<p>
|
||||||
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>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchPublicationsComponent.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="researchDataTab" class="tab-pane fade panel-body">
|
<div id="researchDataTab" class="tab-pane fade panel-body">
|
||||||
<div *ngIf="personInfo.researchData == undefined" class = "alert alert-info ">
|
<div *ngIf="searchDatasetsComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
There are no research data
|
There are no research data
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="personInfo.researchData != undefined">
|
|
||||||
|
<div *ngIf="searchDatasetsComponent.totalResults > 0">
|
||||||
<p>
|
<p>
|
||||||
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>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchDatasetsComponent.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,15 +3,45 @@ import {Observable} from 'rxjs/Observable';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import {PersonService} from '../../services/person.service';
|
import {PersonService} from '../../services/person.service';
|
||||||
import { PersonInfo } from '../../utils/entities/personInfo';
|
import { PersonInfo } from '../../utils/entities/personInfo';
|
||||||
|
|
||||||
|
import { SearchPublicationsComponent } from '../../searchPages/searchPublications.component';
|
||||||
|
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||||
|
import { SearchDatasetsComponent } from '../../searchPages/searchDatasets.component';
|
||||||
|
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||||
|
import {RefineResultsService} from '../../services/servicesUtils/refineResuts.service';
|
||||||
|
import { SearchResultComponent } from '../../searchPages/searchUtils/searchResult.component';
|
||||||
|
|
||||||
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'person',
|
selector: 'person',
|
||||||
templateUrl: 'person.component.html',
|
templateUrl: 'person.component.html',
|
||||||
})
|
})
|
||||||
|
|
||||||
export class PersonComponent {
|
export class PersonComponent {
|
||||||
|
|
||||||
|
sub: any;
|
||||||
|
subPublications: any;
|
||||||
|
subDatasets: any;
|
||||||
|
|
||||||
|
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||||
|
private linkToSearchPublications = "";
|
||||||
|
private searchDatasetsComponent : SearchDatasetsComponent;
|
||||||
|
private linkToSearchDatasets = "";
|
||||||
|
|
||||||
|
personInfo: PersonInfo;
|
||||||
|
private personId: string;
|
||||||
|
public warningMessage = "";
|
||||||
|
public errorMessage = "";
|
||||||
|
|
||||||
constructor (private _personService: PersonService,
|
constructor (private _personService: PersonService,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private _searchPublicationsService: SearchPublicationsService,
|
||||||
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
private _refineResultsService:RefineResultsService) {
|
||||||
console.info('person constructor');
|
console.info('person constructor');
|
||||||
|
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||||
|
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService, this._refineResultsService);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -26,16 +56,22 @@ export class PersonComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.subPublications = this.route.queryParams.subscribe(params => {
|
||||||
|
this.searchPublications();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.subDatasets = this.route.queryParams.subscribe(params => {
|
||||||
|
this.searchDatasets();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
personInfo: PersonInfo;
|
|
||||||
private personId: string;
|
|
||||||
public warningMessage = "";
|
|
||||||
public errorMessage = "";
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
|
this.subPublications.unsubscribe();
|
||||||
|
this.subDatasets.unsubscribe();
|
||||||
}
|
}
|
||||||
sub: any;
|
|
||||||
|
|
||||||
private getPersonInfo () {
|
private getPersonInfo () {
|
||||||
console.info("inside getProjectInfo of component");
|
console.info("inside getProjectInfo of component");
|
||||||
|
@ -57,4 +93,13 @@ export class PersonComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private searchPublications() {
|
||||||
|
this.searchPublicationsComponent.getResults(this.personId, 1, 10, "personPage");
|
||||||
|
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications();
|
||||||
|
}
|
||||||
|
|
||||||
|
private searchDatasets() {
|
||||||
|
this.searchDatasetsComponent.getResults(this.personId, 1, 10, "personPage");
|
||||||
|
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
<li>
|
<li>
|
||||||
<a data-toggle="tab" href="#researchDataTab">
|
<a data-toggle="tab" href="#researchDataTab">
|
||||||
Research Data
|
Research Data
|
||||||
|
<span class="badge">
|
||||||
|
{{searchDatasetsComponent.totalResults}}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -94,14 +97,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="researchDataTab" class="tab-pane fade panel-body">
|
<div id="researchDataTab" class="tab-pane fade panel-body">
|
||||||
<div *ngIf="projectInfo.researchData == undefined" class = "alert alert-info ">
|
<div *ngIf="searchDatasetsComponent.totalResults == 0" class = "alert alert-info " >
|
||||||
There are no research data
|
There are no research data
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="projectInfo.researchData != undefined">
|
|
||||||
|
<div *ngIf="searchDatasetsComponent.totalResults > 0">
|
||||||
<p>
|
<p>
|
||||||
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>
|
||||||
|
|
||||||
|
<div class = "text-right" *ngIf = "searchDatasetsComponent.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.totalResults}} results</a></div>
|
||||||
|
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,9 @@ import {InlineClaimResultComponent} from '../../claimPages/inlineClaims/inlineCl
|
||||||
|
|
||||||
import { SearchPublicationsComponent } from '../../searchPages/searchPublications.component';
|
import { SearchPublicationsComponent } from '../../searchPages/searchPublications.component';
|
||||||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||||
//import { SearchDatasetsComponent } from '../../searchPages/searchDatasets.component';
|
import { SearchDatasetsComponent } from '../../searchPages/searchDatasets.component';
|
||||||
//import {SearchDatasetsService} from '../../services/searchDatasets.service';
|
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||||
|
import {RefineResultsService} from '../../services/servicesUtils/refineResuts.service';
|
||||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||||
|
|
||||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
@ -33,13 +34,18 @@ export class ProjectComponent implements OnInit{
|
||||||
|
|
||||||
sub: any;
|
sub: any;
|
||||||
subPublications: any;
|
subPublications: any;
|
||||||
|
subDatasets: any;
|
||||||
|
|
||||||
private searchPublicationsComponent : SearchPublicationsComponent;
|
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||||
private linkToSearchPublications = "";
|
private linkToSearchPublications = "";
|
||||||
|
private searchDatasetsComponent : SearchDatasetsComponent;
|
||||||
|
private linkToSearchDatasets = "";
|
||||||
|
|
||||||
constructor (private _projectService: ProjectService,
|
constructor (private _projectService: ProjectService,
|
||||||
|
private route: ActivatedRoute,
|
||||||
private _searchPublicationsService: SearchPublicationsService,
|
private _searchPublicationsService: SearchPublicationsService,
|
||||||
private route: ActivatedRoute) {
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
private _refineResultsService:RefineResultsService) {
|
||||||
console.info('project constructor');
|
console.info('project constructor');
|
||||||
// this.projectId = 'corda_______::2c37878a0cede85dbbd1081bb9b4a2f8';
|
// this.projectId = 'corda_______::2c37878a0cede85dbbd1081bb9b4a2f8';
|
||||||
// console.info("1 Id is :"+this.projectId);
|
// console.info("1 Id is :"+this.projectId);
|
||||||
|
@ -50,6 +56,7 @@ export class ProjectComponent implements OnInit{
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||||
|
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService, this._refineResultsService);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -94,12 +101,16 @@ export class ProjectComponent implements OnInit{
|
||||||
this.searchPublications();
|
this.searchPublications();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.subDatasets = this.route.queryParams.subscribe(params => {
|
||||||
|
this.searchDatasets();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
this.subPublications.unsubscribe();
|
this.subPublications.unsubscribe();
|
||||||
|
this.subDatasets.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
private searchPublications() {
|
private searchPublications() {
|
||||||
|
@ -107,6 +118,11 @@ export class ProjectComponent implements OnInit{
|
||||||
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications();
|
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private searchDatasets() {
|
||||||
|
this.searchDatasetsComponent.getResults(this.projectId, 1, 10, "projectPage");
|
||||||
|
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();
|
||||||
|
}
|
||||||
|
|
||||||
getProjectInfo (id:string) {
|
getProjectInfo (id:string) {
|
||||||
console.info("inside getProjectInfo of component");
|
console.info("inside getProjectInfo of component");
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getResults(this.keyword, this.page, this.size);
|
this.getResults(this.keyword, this.page, this.size, "searchPage");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number, flag: string){
|
||||||
console.info("getResults: Execute search query "+parameters);
|
console.info("getResults: Execute search query "+parameters);
|
||||||
//q=(not datasourcecompatibilityid exact 'UNKNOWN' )and (not datasourcecompatibilityid exact 'hostedBy' ) and (not datasourcecompatibilityid exact 'notCompatible' )
|
//q=(not datasourcecompatibilityid exact 'UNKNOWN' )and (not datasourcecompatibilityid exact 'hostedBy' ) and (not datasourcecompatibilityid exact 'notCompatible' )
|
||||||
// (datasourcecompatibilityid <> "UNKNOWN") and (datasourcecompatibilityid <> "hostedBy") and (datasourcecompatibilityid <> "notCompatible")
|
// (datasourcecompatibilityid <> "UNKNOWN") and (datasourcecompatibilityid <> "hostedBy") and (datasourcecompatibilityid <> "notCompatible")
|
||||||
this._searchDataprovidersService.searchDataproviders(parameters, page, size).subscribe(
|
this._searchDataprovidersService.searchDataproviders(parameters, page, size, flag).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.totalResults = data[0];
|
this.totalResults = data[0];
|
||||||
console.info("searchPubl total="+this.totalResults);
|
console.info("searchPubl total="+this.totalResults);
|
||||||
|
@ -98,7 +98,7 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
private queryChanged($event) {
|
private queryChanged($event) {
|
||||||
var parameters = $event.value;
|
var parameters = $event.value;
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
console.info("queryChanged: Execute search query "+parameters);
|
||||||
this.getResults(parameters, this.page, this.size);
|
this.getResults(parameters, this.page, this.size, "searchPage");
|
||||||
}
|
}
|
||||||
private createFilters():Filter[] {
|
private createFilters():Filter[] {
|
||||||
var filter_names=["Type","Compatibility Level"];
|
var filter_names=["Type","Compatibility Level"];
|
||||||
|
|
|
@ -160,7 +160,7 @@ export class SearchComponent {
|
||||||
}
|
}
|
||||||
private searchDatasets() {
|
private searchDatasets() {
|
||||||
this.activeTab = "datasets";
|
this.activeTab = "datasets";
|
||||||
this.searchDatasetsComponent.getResults(this.keyword, 1, 10);
|
this.searchDatasetsComponent.getResults(this.keyword, 1, 10, "searchPage");
|
||||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets() + this.keyword;
|
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets() + this.keyword;
|
||||||
}
|
}
|
||||||
private searchProjects() {
|
private searchProjects() {
|
||||||
|
@ -170,7 +170,7 @@ export class SearchComponent {
|
||||||
}
|
}
|
||||||
private searchDataProviders() {
|
private searchDataProviders() {
|
||||||
this.activeTab = "datproviders";
|
this.activeTab = "datproviders";
|
||||||
this.searchDataProvidersComponent.getResults(this.keyword, 1, 10);
|
this.searchDataProvidersComponent.getResults(this.keyword, 1, 10, "searchPage");
|
||||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders() + this.keyword;
|
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders() + this.keyword;
|
||||||
}
|
}
|
||||||
private searchOrganizations() {
|
private searchOrganizations() {
|
||||||
|
|
|
@ -45,7 +45,7 @@ export class SearchDataprovidersComponent {
|
||||||
this.page = (params['page']=== undefined)?1:+params['page'];
|
this.page = (params['page']=== undefined)?1:+params['page'];
|
||||||
|
|
||||||
this.filters = this.createFilters();
|
this.filters = this.createFilters();
|
||||||
this.getResults(this.keyword, this.page, this.size);
|
this.getResults(this.keyword, this.page, this.size, "searchPage");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,10 +53,10 @@ export class SearchDataprovidersComponent {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number, flag: string){
|
||||||
console.info("getResults: Execute search query "+parameters);
|
console.info("getResults: Execute search query "+parameters);
|
||||||
|
|
||||||
this._searchDataprovidersService.searchDataproviders(parameters, page, size).subscribe(
|
this._searchDataprovidersService.searchDataproviders(parameters, page, size, flag).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.totalResults = data[0];
|
this.totalResults = data[0];
|
||||||
console.info("searchPubl total="+this.totalResults);
|
console.info("searchPubl total="+this.totalResults);
|
||||||
|
@ -87,7 +87,7 @@ export class SearchDataprovidersComponent {
|
||||||
private queryChanged($event) {
|
private queryChanged($event) {
|
||||||
var parameters = $event.value;
|
var parameters = $event.value;
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
console.info("queryChanged: Execute search query "+parameters);
|
||||||
this.getResults(parameters, this.page, this.size);
|
this.getResults(parameters, this.page, this.size, "searchPage");
|
||||||
}
|
}
|
||||||
|
|
||||||
private createFilters():Filter[] {
|
private createFilters():Filter[] {
|
||||||
|
|
|
@ -46,7 +46,7 @@ export class SearchDatasetsComponent {
|
||||||
this.keyword = (params['keyword']?params['keyword']:'');
|
this.keyword = (params['keyword']?params['keyword']:'');
|
||||||
this.page = (params['page']=== undefined)?1:+params['page'];
|
this.page = (params['page']=== undefined)?1:+params['page'];
|
||||||
this.getRefineResults();
|
this.getRefineResults();
|
||||||
this.getResults(this.keyword, this.page, this.size);
|
this.getResults(this.keyword, this.page, this.size, "searchPage");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,10 +78,10 @@ export class SearchDatasetsComponent {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number, flag: string){
|
||||||
console.info("getResults: Execute search query "+parameters);
|
console.info("getResults: Execute search query "+parameters);
|
||||||
|
|
||||||
this._searchDatasetsService.searchDatasets(parameters, page, size).subscribe(
|
this._searchDatasetsService.searchDatasets(parameters, page, size, flag).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.totalResults = data[0];
|
this.totalResults = data[0];
|
||||||
console.info("searchDataset total="+this.totalResults);
|
console.info("searchDataset total="+this.totalResults);
|
||||||
|
@ -112,6 +112,6 @@ export class SearchDatasetsComponent {
|
||||||
private queryChanged($event) {
|
private queryChanged($event) {
|
||||||
var parameters = $event.value;
|
var parameters = $event.value;
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
console.info("queryChanged: Execute search query "+parameters);
|
||||||
this.getResults(parameters, this.page, this.size);
|
this.getResults(parameters, this.page, this.size, "searchPage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,18 +8,24 @@ import {SearchResult} from '../utils/entities/searchResult';
|
||||||
export class SearchDataprovidersService {
|
export class SearchDataprovidersService {
|
||||||
constructor(private http: Http) {}
|
constructor(private http: Http) {}
|
||||||
|
|
||||||
searchDataproviders (params: string, page: number, size: number):any {
|
searchDataproviders (params: string, page: number, size: number, flag: string):any {
|
||||||
|
|
||||||
console.info("In searchDataproviders");
|
console.info("In searchDataproviders");
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURL()+"datasources";
|
let link, url;
|
||||||
|
|
||||||
let url = link+"?";
|
if(flag == "searchPage") {
|
||||||
|
link = OpenaireProperties.getSearchAPIURL()+"datasources";
|
||||||
|
|
||||||
|
url = link+"?";
|
||||||
if(params != '') {
|
if(params != '') {
|
||||||
url += "q="+params+"&page="+page+"&size="+size;
|
url += "q="+params+"&page="+page+"&size="+size;
|
||||||
} else {
|
} else {
|
||||||
url += "page="+page+"&size="+size;
|
url += "page="+page+"&size="+size;
|
||||||
}
|
}
|
||||||
|
} else if(flag == 'organizationPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'organizations/'+params+"/datasources";
|
||||||
|
}
|
||||||
|
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
|
|
|
@ -10,18 +10,28 @@ export class SearchDatasetsService {
|
||||||
|
|
||||||
constructor(private http: Http) {}
|
constructor(private http: Http) {}
|
||||||
|
|
||||||
searchDatasets (params: string, page: number, size: number):any {
|
searchDatasets (params: string, page: number, size: number, flag: string):any {
|
||||||
|
|
||||||
console.info("In searchDatasets");
|
console.info("In searchDatasets");
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURL()+"datasets";
|
let link, url;
|
||||||
|
|
||||||
let url = link+"?";
|
if(flag == 'searchPage') {
|
||||||
|
link = OpenaireProperties.getSearchAPIURL()+"datasets";
|
||||||
|
|
||||||
|
url = link+"?";
|
||||||
if(params != '') {
|
if(params != '') {
|
||||||
url += "q="+params+"&page="+page+"&size="+size;
|
url += "q="+params+"&page="+page+"&size="+size;
|
||||||
} else {
|
} else {
|
||||||
url += "page="+page+"&size="+size;
|
url += "page="+page+"&size="+size;
|
||||||
}
|
}
|
||||||
|
} else if(flag == 'personPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'people/'+params+"/datasets";
|
||||||
|
} else if(flag == 'projectPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'projects/'+params+"/datasets";
|
||||||
|
} else if(flag == 'dataproviderPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'datasources/'+params+"/datasets";
|
||||||
|
}
|
||||||
|
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
|
@ -38,7 +48,7 @@ export class SearchDatasetsService {
|
||||||
let length = Array.isArray(data) ? data.length : 1;
|
let length = Array.isArray(data) ? data.length : 1;
|
||||||
|
|
||||||
for(let i=0; i<length; i++) {
|
for(let i=0; i<length; i++) {
|
||||||
let resData = length > 1 ? data[i]['result']['metadata']['oaf:entity']['oaf:result'] : data['result']['metadata']['oaf:entity']['oaf:result'];
|
let resData = Array.isArray(data) ? data[i]['result']['metadata']['oaf:entity']['oaf:result'] : data['result']['metadata']['oaf:entity']['oaf:result'];
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
|
@ -51,7 +61,7 @@ export class SearchDatasetsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
result['title'].url = OpenaireProperties.getsearchLinkToDataset();
|
result['title'].url = OpenaireProperties.getsearchLinkToDataset();
|
||||||
result['title'].url += length > 1 ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
||||||
if(resData['bestlicense'].hasOwnProperty("classid")) {
|
if(resData['bestlicense'].hasOwnProperty("classid")) {
|
||||||
result['title'].accessMode = resData['bestlicense'].classid;
|
result['title'].accessMode = resData['bestlicense'].classid;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +70,7 @@ export class SearchDatasetsService {
|
||||||
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
|
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
|
||||||
|
|
||||||
for(let j=0; j<relLength; j++) {
|
for(let j=0; j<relLength; j++) {
|
||||||
let relation = relLength > 1 ? resData['rels']['rel'][j] : resData['rels']['rel'];
|
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
|
||||||
|
|
||||||
if(relation.hasOwnProperty("to")) {
|
if(relation.hasOwnProperty("to")) {
|
||||||
if(relation['to'].class == "hasAuthor") {
|
if(relation['to'].class == "hasAuthor") {
|
||||||
|
@ -96,7 +106,7 @@ export class SearchDatasetsService {
|
||||||
let fundingLength = Array.isArray(relation['funding']) ? relation['funding'].length : 1;
|
let fundingLength = Array.isArray(relation['funding']) ? relation['funding'].length : 1;
|
||||||
|
|
||||||
for(let z=0; z<fundingLength; z++) {
|
for(let z=0; z<fundingLength; z++) {
|
||||||
let fundingData = fundingLength > 1 ? relation['funding'][z] : relation['funding'];
|
let fundingData = Array.isArray(relation['funding']) ? relation['funding'][z] : relation['funding'];
|
||||||
|
|
||||||
if(fundingData.hasOwnProperty("funder")) {
|
if(fundingData.hasOwnProperty("funder")) {
|
||||||
result['projects'][countProjects]['funderShortname'] = fundingData['funder'].shortname;
|
result['projects'][countProjects]['funderShortname'] = fundingData['funder'].shortname;
|
||||||
|
|
|
@ -13,9 +13,11 @@ export class SearchOrganizationsService {
|
||||||
|
|
||||||
console.info("In searchOrganizations");
|
console.info("In searchOrganizations");
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURL()+"organizations";
|
let link, url;
|
||||||
|
|
||||||
let url = link+"?";
|
link = OpenaireProperties.getSearchAPIURL()+"organizations";
|
||||||
|
|
||||||
|
url = link+"?";
|
||||||
if(params != '') {
|
if(params != '') {
|
||||||
url += "q="+params+"&page="+page+"&size="+size;
|
url += "q="+params+"&page="+page+"&size="+size;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -27,6 +27,10 @@ export class SearchPublicationsService {
|
||||||
}
|
}
|
||||||
} else if(flag == 'projectPage') {
|
} else if(flag == 'projectPage') {
|
||||||
url = OpenaireProperties.getSearchAPIURL() + 'projects/'+params+"/publications";
|
url = OpenaireProperties.getSearchAPIURL() + 'projects/'+params+"/publications";
|
||||||
|
} else if(flag == 'dataproviderPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'datasources/'+params+"/publications";
|
||||||
|
} else if(flag == 'personPage') {
|
||||||
|
url = OpenaireProperties.getSearchAPIURL() + 'people/'+params+"/publications";
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class DataProviderInfo {
|
||||||
};
|
};
|
||||||
|
|
||||||
organizations: {"name": string, "url": string}[];
|
organizations: {"name": string, "url": string}[];
|
||||||
publications: any;
|
//publications: any;
|
||||||
datasets: any;
|
datasets: any;
|
||||||
statistics: any;
|
statistics: any;
|
||||||
projects: any;
|
projects: any;
|
||||||
|
|
|
@ -7,6 +7,6 @@ export class OrganizationInfo {
|
||||||
"acronym": string, "funder": string, "fundingStream": string,
|
"acronym": string, "funder": string, "fundingStream": string,
|
||||||
"fundingLevel1": string, "fundingLevel2": string,
|
"fundingLevel1": string, "fundingLevel2": string,
|
||||||
"sc39": string, "startDate": string, "endDate": string }[]>;
|
"sc39": string, "startDate": string, "endDate": string }[]>;
|
||||||
dataProviders: { "name": string, "url": string, "type": string, "websiteUrl": string,
|
//dataProviders: { "name": string, "url": string, "type": string, "websiteUrl": string,
|
||||||
"organizations": {"name": string, "url": string}[]}[];
|
// "organizations": {"name": string, "url": string}[]}[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ export class ProjectInfo {
|
||||||
url: string;
|
url: string;
|
||||||
urlInfo: string;
|
urlInfo: string;
|
||||||
|
|
||||||
publications: any;
|
//publications: any;
|
||||||
researchData: any;
|
researchData: any;
|
||||||
statistics: any;
|
statistics: any;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue