Make class fields public for ngfactory | use new refine fields in order to display names - not
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44826 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
70bd195043
commit
8a426cc52d
|
@ -84,10 +84,10 @@ public filteredList = [];
|
|||
public elementRef;
|
||||
|
||||
public communities:string[];
|
||||
private selectedCommunityLabel:string = "Community:";
|
||||
public selectedCommunityLabel:string = "Community:";
|
||||
|
||||
public categories:string[];
|
||||
private selectedCategoryLabel:string ="Category:";
|
||||
public selectedCategoryLabel:string ="Category:";
|
||||
public concepts = [];
|
||||
public warningMessage = "";
|
||||
public infoMessage = "";
|
||||
|
|
|
@ -91,11 +91,11 @@ export class ClaimDatasetComponent {
|
|||
@Input() public keyword:string = '';
|
||||
@Input() public selectedDatasets = [] ;
|
||||
@Output() datasetsChange = new EventEmitter();
|
||||
private size:number = 10;
|
||||
private navigateTo: string = "Search";
|
||||
private source: string = "datacite";
|
||||
private type : string = "dataset";
|
||||
private errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public size:number = 10;
|
||||
public navigateTo: string = "Search";
|
||||
public source: string = "datacite";
|
||||
public type : string = "dataset";
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
dataciteResults=[];
|
||||
dataciteResultsNum : Observable<number> = null;
|
||||
|
@ -110,9 +110,9 @@ export class ClaimDatasetComponent {
|
|||
public warningMessage = "";
|
||||
public infoMessage = "";
|
||||
|
||||
private todayDate = '';
|
||||
private nextDate = '';
|
||||
private DOIs:string[] = [];
|
||||
public todayDate = '';
|
||||
public nextDate = '';
|
||||
public DOIs:string[] = [];
|
||||
|
||||
public search(term: string, size : number, page : number){
|
||||
this.DOIs = DOI.getDOIsFromString(term);
|
||||
|
|
|
@ -80,12 +80,12 @@ export class ClaimProjectsComponent {
|
|||
public warningMessage = "";
|
||||
public infoMessage = "";
|
||||
|
||||
private searchTermStream = new Subject<string>();
|
||||
public searchTermStream = new Subject<string>();
|
||||
filtered: Observable<{}> = this.searchTermStream
|
||||
.debounceTime(300).distinctUntilChanged()
|
||||
.switchMap((term: string) => this._projectService.searchForProjectsObs(term, this.selectedFunderId));
|
||||
private tries:number = 0 ;
|
||||
private keywordlimit = 3;
|
||||
public tries:number = 0 ;
|
||||
public keywordlimit = 3;
|
||||
|
||||
constructor(private _service: ProjectService, private _projectService: SearchProjectsService, myElement: ElementRef) {
|
||||
this.elementRef = myElement;
|
||||
|
|
|
@ -37,10 +37,10 @@ import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component
|
|||
contexts=[];
|
||||
publications;
|
||||
datasets;
|
||||
private show = 'context';
|
||||
private showComp:boolean = false;
|
||||
private enableButton:boolean=true;
|
||||
keyword: string = "";
|
||||
public show = 'context';
|
||||
public showComp:boolean = false;
|
||||
public enableButton:boolean=true;
|
||||
public keyword: string = "";
|
||||
|
||||
@Output() contextAdded = new EventEmitter();
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component
|
|||
@Input() public inlineType:string;
|
||||
|
||||
|
||||
projects=[];
|
||||
publications;
|
||||
datasets;
|
||||
private show = 'project';
|
||||
private showComp:boolean = false;
|
||||
private enableButton:boolean=true;
|
||||
keyword: string = "";
|
||||
public projects=[];
|
||||
public publications;
|
||||
public datasets;
|
||||
public show = 'project';
|
||||
public showComp:boolean = false;
|
||||
public enableButton:boolean=true;
|
||||
public keyword: string = "";
|
||||
|
||||
@Output() projectAdded = new EventEmitter();
|
||||
|
||||
|
|
|
@ -35,16 +35,16 @@ import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component
|
|||
// This is the component from the landing page
|
||||
@Input() public inlineEntity:any;
|
||||
@Input() public inlineType:string;
|
||||
private hideType:string;
|
||||
public hideType:string;
|
||||
|
||||
|
||||
|
||||
publications = [];
|
||||
datasets = [];
|
||||
private show = 'project';
|
||||
private showComp:boolean = false;
|
||||
private enableButton:boolean=true;
|
||||
keyword: string = "";
|
||||
public publications = [];
|
||||
public datasets = [];
|
||||
public show = 'project';
|
||||
public showComp:boolean = false;
|
||||
public enableButton:boolean=true;
|
||||
public keyword: string = "";
|
||||
|
||||
@Output() datasetAdded = new EventEmitter();
|
||||
@Output() publicationAdded = new EventEmitter();
|
||||
|
|
|
@ -65,7 +65,7 @@ export class BulkClaimComponent {
|
|||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||
errorMessage = "";
|
||||
infoMEssage = "";
|
||||
private enableUpload:boolean = true;
|
||||
enableUpload:boolean = true;
|
||||
constructor(private _searchCrossrefService: SearchCrossrefService) {
|
||||
this.filesToUpload = [];
|
||||
|
||||
|
|
|
@ -42,13 +42,13 @@ export class ClaimInsertComponent {
|
|||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||
@ViewChild(AlertModal) alert;
|
||||
|
||||
private claiming =false;
|
||||
private error = false;
|
||||
private errorMessage = "";
|
||||
private warningMessage = "";
|
||||
private claimsTODO:number = 0;
|
||||
private claims:number = 0;
|
||||
private errorclaims:number = 0;
|
||||
public claiming =false;
|
||||
public error = false;
|
||||
public errorMessage = "";
|
||||
public warningMessage = "";
|
||||
public claimsTODO:number = 0;
|
||||
public claims:number = 0;
|
||||
public errorclaims:number = 0;
|
||||
|
||||
public validateInsertions(){
|
||||
// console.info("Inlineentity:" +(this.inlineEntity)?this.inlineEntity+(this.inlineEntity.id)?this.inlineEntity.id:"no id":"null"+ + " show "+ (!this.claiming && this.showButton) );
|
||||
|
|
|
@ -62,8 +62,8 @@ export class ClaimSelectedDatasetsComponent {
|
|||
todayDate = '';
|
||||
nextDate = '';
|
||||
@ViewChild(AlertModal) alertApplyAll;
|
||||
private commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every result
|
||||
private commonEmbargoEndDate; // for access rights: embargoEndDate - changes when user apply a change to every result
|
||||
public commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every result
|
||||
public commonEmbargoEndDate; // for access rights: embargoEndDate - changes when user apply a change to every result
|
||||
|
||||
removeDataset(item:any){
|
||||
var index:number =this.datasets.indexOf(item);
|
||||
|
|
|
@ -63,8 +63,8 @@ export class ClaimSelectedPublicationsComponent {
|
|||
nextDate = '';
|
||||
@ViewChild(AlertModal) alertApplyAll;
|
||||
|
||||
private commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every result
|
||||
private commonEmbargoEndDate; // for access rights: embargoEndDate - changes when user apply a change to every result
|
||||
public commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every result
|
||||
public commonEmbargoEndDate; // for access rights: embargoEndDate - changes when user apply a change to every result
|
||||
|
||||
removePublication(item:any){
|
||||
var index:number =this.publications.indexOf(item);
|
||||
|
|
|
@ -72,19 +72,19 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
|
|||
})
|
||||
|
||||
export class DepositComponent {
|
||||
private keyword: string='';
|
||||
private openAccess: string;
|
||||
private openAccessRepo: string;
|
||||
private fp7Guidlines: string;
|
||||
private h2020Guidlines: string;
|
||||
private ercGuidlines: string;
|
||||
private helpdesk: string;
|
||||
private organizations: {"name": string, "id": string}[] = [];
|
||||
public keyword: string='';
|
||||
public openAccess: string;
|
||||
public openAccessRepo: string;
|
||||
public fp7Guidlines: string;
|
||||
public h2020Guidlines: string;
|
||||
public ercGuidlines: string;
|
||||
public helpdesk: string;
|
||||
public organizations: {"name": string, "id": string}[] = [];
|
||||
@Input() compatibility: string = '';
|
||||
@Input() requestFor: string = "Publications";
|
||||
|
||||
private status: number;
|
||||
private errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public status: number;
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
constructor (private _router: Router,
|
||||
private _searchOrganizationsService: SearchOrganizationsService) {
|
||||
|
|
|
@ -69,18 +69,18 @@ import {OrganizationService} from '../services/organization.service';
|
|||
})
|
||||
|
||||
export class DepositResultComponent {
|
||||
private organization: {"name": string, "url": string};
|
||||
private organizationId: string = "";
|
||||
public organization: {"name": string, "url": string};
|
||||
public organizationId: string = "";
|
||||
|
||||
private status: number;
|
||||
private errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public status: number;
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
sub: any;
|
||||
subDataproviders: any;
|
||||
|
||||
private searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
private linkToSearchDataproviders = "";
|
||||
private zenodo: string;
|
||||
public searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
public linkToSearchDataproviders = "";
|
||||
public zenodo: string;
|
||||
@Input() compatibility: string = '';
|
||||
@Input() requestFor: string = "Publications";
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import { Location } from '@angular/common';
|
|||
})
|
||||
|
||||
export class ErrorPageComponent {
|
||||
private page: string;
|
||||
public page: string;
|
||||
|
||||
constructor (private _location: Location) {
|
||||
this.page = _location.path(true);
|
||||
|
|
|
@ -55,6 +55,6 @@ console.log('ngAfterViewChecked: Execution time: ' + time);
|
|||
|
||||
|
||||
searchTerm(term: string) {
|
||||
window.location.href="/search?keyword="+term;
|
||||
window.location.href="/search/find?keyword="+term;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
export class DatasetsTabComponent {
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchDatasetsComponent : SearchDatasetsComponent;
|
||||
private linkToSearchDatasets = "";
|
||||
public linkToSearchDatasets = "";
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export class DatasourcesTabComponent {
|
|||
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
private linkToSearchDataproviders = "";
|
||||
public linkToSearchDataproviders = "";
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export class ProjectsTabComponent {
|
|||
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchProjectsComponent : SearchProjectsComponent;
|
||||
private linkToSearchProjects = "";
|
||||
public linkToSearchProjects = "";
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
export class PublicationsTabComponent {
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchPublicationsComponent : SearchPublicationsComponent;
|
||||
private linkToSearchPublications = "";
|
||||
public linkToSearchPublications = "";
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -122,17 +122,17 @@ export class TabsComponent {
|
|||
//@Input() datasources;
|
||||
@Input() organizations: {"name": string, "url": string}[];
|
||||
|
||||
private paramsForSearchLink: string = "";
|
||||
public paramsForSearchLink: string = "";
|
||||
|
||||
private reloadPublications: boolean = true;
|
||||
private reloadDatasets: boolean = true;
|
||||
private reloadProjects: boolean = true;
|
||||
private reloadDataproviders: boolean = true;
|
||||
public reloadPublications: boolean = true;
|
||||
public reloadDatasets: boolean = true;
|
||||
public reloadProjects: boolean = true;
|
||||
public reloadDataproviders: boolean = true;
|
||||
|
||||
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||
private searchDatasetsComponent: SearchDatasetsComponent;
|
||||
private searchProjectsComponent: SearchProjectsComponent;
|
||||
private searchDataprovidersComponent: SearchDataprovidersComponent;
|
||||
public searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public searchDatasetsComponent: SearchDatasetsComponent;
|
||||
public searchProjectsComponent: SearchProjectsComponent;
|
||||
public searchDataprovidersComponent: SearchDataprovidersComponent;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
|
|
|
@ -15,12 +15,12 @@ import {InlineClaimResultComponent} from '../../claimPages/inlineClaims/inlineCl
|
|||
})
|
||||
|
||||
export class PublicationComponent {
|
||||
private showAllCollectedFrom: boolean = false;
|
||||
private showAllDownloadFrom: boolean = false;
|
||||
private showAllFundedBy: boolean = false;
|
||||
private showAllPublishedIn: boolean = false;
|
||||
public showAllCollectedFrom: boolean = false;
|
||||
public showAllDownloadFrom: boolean = false;
|
||||
public showAllFundedBy: boolean = false;
|
||||
public showAllPublishedIn: boolean = false;
|
||||
|
||||
private start ;private end ;
|
||||
public start ;public end ;
|
||||
constructor (private _publicationService: PublicationService, private route: ActivatedRoute) {
|
||||
this.start = new Date().getTime();
|
||||
}
|
||||
|
@ -62,15 +62,15 @@ ngAfterViewChecked() {
|
|||
articleId: string;
|
||||
private publicationInfo: PublicationInfo;
|
||||
|
||||
private showAllReferences: boolean = false;
|
||||
private showAllRelResData: boolean = false;
|
||||
private showAllSimilPubl: boolean = false;
|
||||
private showAllBioentities: boolean = false;
|
||||
private showFundingDetails: boolean = false;
|
||||
public showAllReferences: boolean = false;
|
||||
public showAllRelResData: boolean = false;
|
||||
public showAllSimilPubl: boolean = false;
|
||||
public showAllBioentities: boolean = false;
|
||||
public showFundingDetails: boolean = false;
|
||||
|
||||
private bioentitiesNum: number = 0;
|
||||
public bioentitiesNum: number = 0;
|
||||
|
||||
private result ;
|
||||
public result ;
|
||||
|
||||
@ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
|
||||
@ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ;
|
||||
|
@ -79,7 +79,7 @@ ngAfterViewChecked() {
|
|||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
|
||||
private activeTab: string = '';
|
||||
public activeTab: string = '';
|
||||
|
||||
public myfunct(tab: string) {
|
||||
this.activeTab = tab;
|
||||
|
|
|
@ -1,133 +1,133 @@
|
|||
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {SearchCrossrefService} from '../services/searchCrossref.service';
|
||||
import {Publication} from '../utils/entities/publication';
|
||||
import {PagingFormatter} from '../utils/pagingFormatter.component';
|
||||
import {PublicationTitleFormatter} from '../utils/publicationTitleFormatter.component';
|
||||
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'search-all',
|
||||
template: `
|
||||
|
||||
|
||||
<div *ngIf="claim">
|
||||
<h3>Selected publications:</h3>
|
||||
<p *ngFor=" let item of selected "> <publication-title [title]="item.title" [url]="item.URL" > </publication-title> {{item.DOI}} --{{item.publisher}} <button (click)="remove(item)" type="button" class="btn btn-default">Remove</button></p>
|
||||
</div>
|
||||
|
||||
<h1>Search</h1>
|
||||
<form>
|
||||
<input #term [(ngModel)]="keyword" name= "searchAllTerm" />
|
||||
<button (click)="search(keyword)" type="submit" class="btn btn-default">Search</button>
|
||||
</form>
|
||||
<div>
|
||||
<div *ngIf="resultsNum != null && resultsNum > 0">
|
||||
<p > {{resultsNum }} Total Results </p>
|
||||
<paging [currentPage]="page" [totalResults]="resultsNum" [baseUrl]="'/search?keyword='+keyword" [size]="size"> </paging>
|
||||
</div>
|
||||
<div >
|
||||
|
||||
<p *ngFor=" let item of results "> <publication-title [title]="item.title" [url]="item.URL" > </publication-title> {{item.DOI}} --{{item.publisher}} <button *ngIf="claim" (click)="add(item)" type="button" class="btn btn-default">Select</button> </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`
|
||||
})
|
||||
export class SearchAllComponent {
|
||||
constructor (private _searchService: SearchCrossrefService,
|
||||
private route: ActivatedRoute, private _location: Location) {}
|
||||
ngOnInit() {
|
||||
console.log("Path: " + this._location.path());
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
|
||||
let page = (params['page']=== undefined)?1:+params['page'];
|
||||
let size = (params['size']=== undefined)?10:+params['size'];
|
||||
this.page = page;
|
||||
this.size = size;
|
||||
this.keyword = params['keyword'];
|
||||
if(this.keyword !=null){
|
||||
this.searchCrossref(this.keyword,this.size,this.page);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
sub: any;
|
||||
page : number;
|
||||
size:number;
|
||||
keyword:string;
|
||||
navigateTo: string = "Search";
|
||||
|
||||
@Input() public claim:boolean = true ; // add selection for claiming
|
||||
@Input() public publication:boolean = true ; // true for publication/ false for dataset
|
||||
@Input() public source:string = 'openaire' ; // other values : crossref/ datacite/orcid
|
||||
@Input() public selected = [] ;
|
||||
@Output() selectedChange = new EventEmitter();
|
||||
results:string[];
|
||||
resultsNum : Observable<number> ;
|
||||
search(term: string, size : number, page : number) {
|
||||
// if(this.source == 'crossref' && this.publication){
|
||||
this.searchCrossref(term,10,1);
|
||||
// }else if(this.source == 'openaire' && this.publication){
|
||||
// import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||
// import {Observable} from 'rxjs/Observable';
|
||||
// import {ActivatedRoute, Router} from '@angular/router';
|
||||
// import {SearchCrossrefService} from '../services/searchCrossref.service';
|
||||
// import {Publication} from '../utils/entities/publication';
|
||||
// import {PagingFormatter} from '../utils/pagingFormatter.component';
|
||||
// import {PublicationTitleFormatter} from '../utils/publicationTitleFormatter.component';
|
||||
//
|
||||
// }else if(this.source == 'openaire' && this.publication){
|
||||
// import {Location} from '@angular/common';
|
||||
//
|
||||
// }else if(this.source == 'openaire' && !this.publication){
|
||||
// @Component({
|
||||
// selector: 'search-all',
|
||||
// template: `
|
||||
//
|
||||
// }else if(this.source == 'orcid' && this.publication){
|
||||
//
|
||||
// }else if(this.source == 'datacite' && !this.publication){
|
||||
// <div *ngIf="claim">
|
||||
// <h3>Selected publications:</h3>
|
||||
// <p *ngFor=" let item of selected "> <publication-title [title]="item.title" [url]="item.URL" > </publication-title> {{item.DOI}} --{{item.publisher}} <button (click)="remove(item)" type="button" class="btn btn-default">Remove</button></p>
|
||||
// </div>
|
||||
//
|
||||
// <h1>Search</h1>
|
||||
// <form>
|
||||
// <input #term [(ngModel)]="keyword" name= "searchAllTerm" />
|
||||
// <button (click)="search(keyword)" type="submit" class="btn btn-default">Search</button>
|
||||
// </form>
|
||||
// <div>
|
||||
// <div *ngIf="resultsNum != null && resultsNum > 0">
|
||||
// <p > {{resultsNum }} Total Results </p>
|
||||
// <paging [currentPage]="page" [totalResults]="resultsNum" [baseUrl]="'/search?keyword='+keyword" [size]="size"> </paging>
|
||||
// </div>
|
||||
// <div >
|
||||
//
|
||||
// <p *ngFor=" let item of results "> <publication-title [title]="item.title" [url]="item.URL" > </publication-title> {{item.DOI}} --{{item.publisher}} <button *ngIf="claim" (click)="add(item)" type="button" class="btn btn-default">Select</button> </p>
|
||||
//
|
||||
// </div>
|
||||
// </div>
|
||||
//
|
||||
// `
|
||||
// })
|
||||
// export class SearchAllComponent {
|
||||
// constructor (private _searchService: SearchCrossrefService,
|
||||
// private route: ActivatedRoute, private _location: Location) {}
|
||||
// ngOnInit() {
|
||||
// console.log("Path: " + this._location.path());
|
||||
// this.sub = this.route.queryParams.subscribe(params => {
|
||||
//
|
||||
// let page = (params['page']=== undefined)?1:+params['page'];
|
||||
// let size = (params['size']=== undefined)?10:+params['size'];
|
||||
// this.page = page;
|
||||
// this.size = size;
|
||||
// this.keyword = params['keyword'];
|
||||
// if(this.keyword !=null){
|
||||
// this.searchCrossref(this.keyword,this.size,this.page);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// ngOnDestroy() {
|
||||
// this.sub.unsubscribe();
|
||||
// }
|
||||
// sub: any;
|
||||
// page : number;
|
||||
// size:number;
|
||||
// keyword:string;
|
||||
// navigateTo: string = "Search";
|
||||
//
|
||||
// @Input() public claim:boolean = true ; // add selection for claiming
|
||||
// @Input() public publication:boolean = true ; // true for publication/ false for dataset
|
||||
// @Input() public source:string = 'openaire' ; // other values : crossref/ datacite/orcid
|
||||
// @Input() public selected = [] ;
|
||||
// @Output() selectedChange = new EventEmitter();
|
||||
// results:string[];
|
||||
// resultsNum : Observable<number> ;
|
||||
// search(term: string, size : number, page : number) {
|
||||
// // if(this.source == 'crossref' && this.publication){
|
||||
// this.searchCrossref(term,10,1);
|
||||
// // }else if(this.source == 'openaire' && this.publication){
|
||||
// //
|
||||
// // }else if(this.source == 'openaire' && this.publication){
|
||||
// //
|
||||
// // }else if(this.source == 'openaire' && !this.publication){
|
||||
// //
|
||||
// // }else if(this.source == 'orcid' && this.publication){
|
||||
// //
|
||||
// // }else if(this.source == 'datacite' && !this.publication){
|
||||
// //
|
||||
// // }
|
||||
// }
|
||||
// searchCrossref (term: string, size : number, page : number) {
|
||||
// this._searchService.searchCrossrefResults(term, size, page).subscribe(
|
||||
// data => {
|
||||
// this.results = data.items;
|
||||
// this.page=page;
|
||||
// this.resultsNum = data['total-results'];
|
||||
// },
|
||||
// err => console.error(err)
|
||||
// );
|
||||
// }
|
||||
// searchOpenaire (term2: string) {
|
||||
// //this.items = this._searchService.httpSearchOpenaire(term2);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// add(item){
|
||||
// this.selected.push(item);
|
||||
// console.info("Select:"+this.selected);
|
||||
// for (var i = 0; i < this.selected.length; i++) {
|
||||
// console.log(this.selected[i]);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// var index:number =this.results.indexOf(item);
|
||||
// if (index > -1) {
|
||||
// this.results.splice(index, 1);
|
||||
// }
|
||||
// console.info("Item removed "+this.selected.indexOf(item));
|
||||
// this.selectedChange.emit({
|
||||
// value: this.selected
|
||||
// });
|
||||
// }
|
||||
// remove(item){
|
||||
// var index:number =this.selected.indexOf(item);
|
||||
// if (index > -1) {
|
||||
// this.selected.splice(index, 1);
|
||||
// }
|
||||
// this.selectedChange.emit({
|
||||
// value: this.selected
|
||||
// });
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
searchCrossref (term: string, size : number, page : number) {
|
||||
this._searchService.searchCrossrefResults(term, size, page).subscribe(
|
||||
data => {
|
||||
this.results = data.items;
|
||||
this.page=page;
|
||||
this.resultsNum = data['total-results'];
|
||||
},
|
||||
err => console.error(err)
|
||||
);
|
||||
}
|
||||
searchOpenaire (term2: string) {
|
||||
//this.items = this._searchService.httpSearchOpenaire(term2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
add(item){
|
||||
this.selected.push(item);
|
||||
console.info("Select:"+this.selected);
|
||||
for (var i = 0; i < this.selected.length; i++) {
|
||||
console.log(this.selected[i]);
|
||||
}
|
||||
|
||||
|
||||
var index:number =this.results.indexOf(item);
|
||||
if (index > -1) {
|
||||
this.results.splice(index, 1);
|
||||
}
|
||||
console.info("Item removed "+this.selected.indexOf(item));
|
||||
this.selectedChange.emit({
|
||||
value: this.selected
|
||||
});
|
||||
}
|
||||
remove(item){
|
||||
var index:number =this.selected.indexOf(item);
|
||||
if (index > -1) {
|
||||
this.selected.splice(index, 1);
|
||||
}
|
||||
this.selectedChange.emit({
|
||||
value: this.selected
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,20 +25,14 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchDataProvidersComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
// private page :number = 1;
|
||||
// private size :number = 10;
|
||||
// public status:number;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
// private baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_DATAPROVIDER_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_DATAPROVIDER_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -97,7 +91,7 @@ export class AdvancedSearchDataProvidersComponent {
|
|||
);
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -24,20 +24,16 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchDatasetsComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
// private page :number = 1;
|
||||
// private size :number = 10;
|
||||
// public status:number;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
|
||||
// private searchUtils.baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_DATASET_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATASET_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_DATASET_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATASET_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -102,7 +98,7 @@ export class AdvancedSearchDatasetsComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -24,20 +24,14 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchOrganizationsComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
// private page :number = 1;
|
||||
// private size :number = 10;
|
||||
// public status:number;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
// private baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_ORGANIZATION_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_ORGANIZATION_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -102,7 +96,7 @@ export class AdvancedSearchOrganizationsComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -24,20 +24,16 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchPeopleComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
// private page :number = 1;
|
||||
// private size :number = 10;
|
||||
// public status:number;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
|
||||
// private baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_PERSON_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PERSON_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_PERSON_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PERSON_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -102,7 +98,7 @@ export class AdvancedSearchPeopleComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -23,20 +23,16 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchProjectsComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
// private page :number = 1;
|
||||
// private size :number = 10;
|
||||
// public status:number;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
|
||||
// private baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_PROJECTS_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PROJECT_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_PROJECTS_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PROJECT_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -101,7 +97,7 @@ export class AdvancedSearchProjectsComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -24,17 +24,15 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
|
||||
export class AdvancedSearchPublicationsComponent {
|
||||
private results =[];
|
||||
private filters =[];
|
||||
// private totalResults:number = 0 ;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public results =[];
|
||||
public filters =[];
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
||||
// private baseUrl: string;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
private fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_PUBLICATIONS_PARAM;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PUBLICATION_FIELDS_MAP;
|
||||
private selectedFields:AdvancedField[] = [];
|
||||
public fieldIds: string[] = this.searchFields.ADVANCED_SEARCH_PUBLICATIONS_PARAM;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PUBLICATION_FIELDS_MAP;
|
||||
public selectedFields:AdvancedField[] = [];
|
||||
|
||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||
|
||||
|
@ -96,7 +94,7 @@ export class AdvancedSearchPublicationsComponent {
|
|||
);
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
|
|
@ -27,24 +27,23 @@ import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
|||
})
|
||||
export class SearchCompatibleDataprovidersComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
// public totalResults:number = 0 ;
|
||||
private baseUrl:string;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any; private subResults: any;
|
||||
private _location:Location;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
private _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[{field:"compatibility",opName:"cm",opValue:"not", values:["UNKNOWN","hostedBy","notCompatible"]},{field:"type",opName:"tp",opValue:"not",values: ["other"]}];
|
||||
public filters =[];
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public sub: any; public subResults: any;
|
||||
public _location:Location;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
public _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[{field:"compatibility",opName:"cm",opValue:"not", values:["UNKNOWN","hostedBy","notCompatible"]},{field:"type",opName:"tp",opValue:"not",values: ["other"]}];
|
||||
// ["entityregistry","entityregistry::projects","entityregistry::repositories"]}];
|
||||
private _prefixQuery: string = "";
|
||||
public _prefixQuery: string = "";
|
||||
|
||||
private CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
"export":[]
|
||||
};
|
||||
private CSVDownloaded = false;
|
||||
public CSVDownloaded = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -62,7 +61,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
this._prefixQuery+="&";
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -75,7 +74,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -112,7 +111,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.index;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
||||
|
@ -148,7 +147,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
return filters;
|
||||
}
|
||||
|
||||
private downloadClicked($event) {
|
||||
public downloadClicked($event) {
|
||||
if(!this.CSVDownloaded) {
|
||||
this.CSVDownloaded = false;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ export class DatasourceTableViewComponent {
|
|||
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
// // var results:{name:string, type:string, organizations:string, countries:string, compatibility:string}[] = []
|
||||
// for(var i =0; i < this.datasources.length; i++){
|
||||
// var datasource: {name:string, type:string, organizations:string, countries:string, compatibility:string} = {name:"",type:"",organizations:"", countries:"", compatibility:""};
|
||||
|
@ -64,7 +64,7 @@ export class DatasourceTableViewComponent {
|
|||
// }
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
|
||||
}
|
||||
sort(){
|
||||
|
|
|
@ -26,24 +26,24 @@ import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
|||
})
|
||||
export class SearchEntityRegistriesComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
private baseUrl:string;
|
||||
private searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any; private subResults: any;
|
||||
private _location:Location;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
private _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[
|
||||
public filters =[];
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public sub: any; public subResults: any;
|
||||
public _location:Location;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
public _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[
|
||||
{field:"type",opName:"tp",opValue:"and",values: ["other"]}];
|
||||
// ["entityregistry","entityregistry::projects","entityregistry::repositories"]}];
|
||||
private _prefixQuery: string = "";
|
||||
public _prefixQuery: string = "";
|
||||
|
||||
private CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
"export":[]
|
||||
};
|
||||
private CSVDownloaded = false;
|
||||
public CSVDownloaded = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -61,7 +61,7 @@ export class SearchEntityRegistriesComponent {
|
|||
this._prefixQuery+="&";
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -75,7 +75,7 @@ export class SearchEntityRegistriesComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ export class SearchEntityRegistriesComponent {
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.index;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
this._getResults(parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
|
@ -145,7 +145,7 @@ export class SearchEntityRegistriesComponent {
|
|||
|
||||
|
||||
|
||||
private downloadClicked($event) {
|
||||
public downloadClicked($event) {
|
||||
if(!this.CSVDownloaded) {
|
||||
this.CSVDownloaded = false;
|
||||
|
||||
|
|
|
@ -98,47 +98,47 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
`
|
||||
})
|
||||
export class SearchComponent {
|
||||
private sub: any;
|
||||
private subPublicationsCount: any;
|
||||
private subDatasetsCount: any;
|
||||
private subProjectsCount: any;
|
||||
private subDataprovidersCount: any;
|
||||
private subOrganizationsCount: any;
|
||||
private subPeopleCount: any;
|
||||
public sub: any;
|
||||
public subPublicationsCount: any;
|
||||
public subDatasetsCount: any;
|
||||
public subProjectsCount: any;
|
||||
public subDataprovidersCount: any;
|
||||
public subOrganizationsCount: any;
|
||||
public subPeopleCount: any;
|
||||
|
||||
private reloadPublications: boolean;
|
||||
private reloadDatasets: boolean;
|
||||
private reloadProjects: boolean;
|
||||
private reloadDataproviders: boolean;
|
||||
private reloadOrganizations: boolean;
|
||||
private reloadPeople: boolean;
|
||||
public reloadPublications: boolean;
|
||||
public reloadDatasets: boolean;
|
||||
public reloadProjects: boolean;
|
||||
public reloadDataproviders: boolean;
|
||||
public reloadOrganizations: boolean;
|
||||
public reloadPeople: boolean;
|
||||
|
||||
|
||||
private pageTitle = "Search in OpenAIRE"
|
||||
private keyword:string = "";
|
||||
private publications:string[];
|
||||
private datasets:string[];
|
||||
private projectsTab:string[];
|
||||
private dataproviders:string[];
|
||||
private organizations:string[];
|
||||
private people:string[];
|
||||
public pageTitle = "Search in OpenAIRE"
|
||||
public keyword:string = "";
|
||||
public publications:string[];
|
||||
public datasets:string[];
|
||||
public projectsTab:string[];
|
||||
public dataproviders:string[];
|
||||
public organizations:string[];
|
||||
public people:string[];
|
||||
|
||||
private activeTab = "publications";
|
||||
private linkToSearchPublications = "";
|
||||
private linkToSearchProjects = "";
|
||||
private linkToSearchDataproviders = "";
|
||||
private linkToSearchDatasets = "";
|
||||
private linkToSearchOrganizations = "";
|
||||
private linkToSearchPeople = "";
|
||||
public activeTab = "publications";
|
||||
public linkToSearchPublications = "";
|
||||
public linkToSearchProjects = "";
|
||||
public linkToSearchDataproviders = "";
|
||||
public linkToSearchDatasets = "";
|
||||
public linkToSearchOrganizations = "";
|
||||
public linkToSearchPeople = "";
|
||||
|
||||
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||
private searchDataProvidersComponent : SearchDataprovidersComponent;
|
||||
private searchProjectsComponent : SearchProjectsComponent;
|
||||
private searchDatasetsComponent: SearchDatasetsComponent;
|
||||
private searchOrganizationsComponent: SearchOrganizationsComponent;
|
||||
private searchPeopleComponent: SearchPeopleComponent;
|
||||
public searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public searchDataProvidersComponent : SearchDataprovidersComponent;
|
||||
public searchProjectsComponent : SearchProjectsComponent;
|
||||
public searchDatasetsComponent: SearchDatasetsComponent;
|
||||
public searchOrganizationsComponent: SearchOrganizationsComponent;
|
||||
public searchPeopleComponent: SearchPeopleComponent;
|
||||
|
||||
private subPub;private subData;private subProjects;private subOrg;private subPeople; private subDataPr;
|
||||
public subPub;public subData;public subProjects;public subOrg;public subPeople; public subDataPr;
|
||||
constructor ( private route: ActivatedRoute,
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDataprovidersService: SearchDataprovidersService,
|
||||
|
@ -155,7 +155,7 @@ private subPub;private subData;private subProjects;private subOrg;private subPeo
|
|||
this.searchPeopleComponent = new SearchPeopleComponent(this.route, this._searchPeopleService);
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.keyword = (params['keyword'])?params['keyword']:"";
|
||||
if(this.keyword !=null && this.keyword.length > 0){
|
||||
|
@ -165,7 +165,7 @@ private subPub;private subData;private subProjects;private subOrg;private subPeo
|
|||
}
|
||||
});
|
||||
}
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
if(this.keyword !=null && this.keyword.length > 0){
|
||||
if(this.subPub){
|
||||
|
|
|
@ -22,7 +22,7 @@ import { SearchEntityRegistriesComponent } from './dataProviders/entityRegistrie
|
|||
{ path: 'search/data-providers', component: SearchCompatibleDataprovidersComponent},
|
||||
{ path: 'search/entity-registries', component: SearchEntityRegistriesComponent},
|
||||
{ path: 'search/find', component: SearchComponent },
|
||||
{ path: 'search', component: SearchComponent },
|
||||
// { path: 'search', component: SearchComponent },
|
||||
{ path: 'search/find/publications', component: SearchPublicationsComponent },
|
||||
{ path: 'search/find/dataproviders', component: SearchDataprovidersComponent },
|
||||
{ path: 'search/find/projects', component: SearchProjectsComponent },
|
||||
|
|
|
@ -47,15 +47,15 @@ export class SearchComponent {
|
|||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
private sub: any;
|
||||
private page : number;
|
||||
private size:number;
|
||||
private keyword:string;
|
||||
private navigateTo: string = "./search";
|
||||
public sub: any;
|
||||
public page : number;
|
||||
public size:number;
|
||||
public keyword:string;
|
||||
public navigateTo: string = "./search";
|
||||
|
||||
private results : String[];
|
||||
private orcidresults : String[];
|
||||
private resultsNum : number ;
|
||||
public results : String[];
|
||||
public orcidresults : String[];
|
||||
public resultsNum : number ;
|
||||
search (term: string, size : number, page : number) {
|
||||
this.getCrossrefResults(term,size,page);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import {SearchResult} from '../utils/entities/searchResult';
|
|||
|
||||
|
||||
import {AdvancedSearchPageComponent} from './searchUtils/advancedSearchPage.component';
|
||||
import {SearchAllComponent} from '../searchAll/searchAll.component';//helpers
|
||||
// import {SearchAllComponent} from '../searchAll/searchAll.component';//helpers
|
||||
import {SearchPageComponent} from './searchUtils/searchPage.component';
|
||||
import {SearchFormComponent} from './searchUtils/searchForm.component';
|
||||
import {SearchPagingComponent} from './searchUtils/searchPaging.component';
|
||||
|
@ -52,7 +52,7 @@ import { SearchRoutingModule } from './search-routing.module';
|
|||
declarations: [
|
||||
|
||||
AdvancedSearchPageComponent,
|
||||
SearchAllComponent,
|
||||
// SearchAllComponent,
|
||||
SearchPageComponent,
|
||||
SearchFormComponent,
|
||||
SearchResultComponent,
|
||||
|
@ -78,7 +78,7 @@ import { SearchRoutingModule } from './search-routing.module';
|
|||
// SearchPublicationsService
|
||||
],
|
||||
exports: [
|
||||
SearchAllComponent,
|
||||
// SearchAllComponent,
|
||||
AdvancedSearchPublicationsComponent,
|
||||
AdvancedSearchDataProvidersComponent,
|
||||
AdvancedSearchProjectsComponent,
|
||||
|
|
|
@ -104,9 +104,9 @@ export class AdvancedSearchFormComponent {
|
|||
@Output() queryChange = new EventEmitter();
|
||||
newFieldId:string;
|
||||
fieldList:{[id:string]:any[]} = {};
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
private operators: [{name:string, id:string}] = this.searchFields.ADVANCED_SEARCH_OPERATORS;
|
||||
public operators: [{name:string, id:string}] = this.searchFields.ADVANCED_SEARCH_OPERATORS;
|
||||
constructor () {
|
||||
console.log("Constr: Advanced search form");
|
||||
}
|
||||
|
|
|
@ -54,17 +54,12 @@ export class AdvancedSearchPageComponent {
|
|||
@Input() results = [];
|
||||
@Input() entityType;
|
||||
@Input() searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
// @Input() totalResults: number = 0;
|
||||
@Input() fieldIds: string[];
|
||||
@Input() fieldIdsMap:{ [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ;
|
||||
@Input() selectedFields:AdvancedField[];
|
||||
// @Input() baseUrl:string = '';
|
||||
@Input() simpleSearchUrl: string;
|
||||
|
||||
private baseURLWithParameters:string = '';
|
||||
|
||||
// private searchFields:SearchFields = new SearchFields();
|
||||
|
||||
public baseURLWithParameters:string = '';
|
||||
|
||||
@Output() queryChange = new EventEmitter();
|
||||
constructor (private location: Location) {
|
||||
|
@ -121,17 +116,21 @@ export class AdvancedSearchPageComponent {
|
|||
}
|
||||
public createQueryParameters(){
|
||||
var params="";
|
||||
var countParams = 0;
|
||||
for(var i = 0; i< this.selectedFields.length; i++){
|
||||
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && this.selectedFields[i].value != ""){
|
||||
if(this.selectedFields[i].id == "q"){
|
||||
params += (i == 0 ? "" : this.selectedFields[i].operatorId) + " " + '"' + encodeURIComponent(this.selectedFields[i].value) + '"' + " ";
|
||||
var op = "";
|
||||
// if()
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId) + " " + '"' + encodeURIComponent(this.selectedFields[i].value) + '"' + " ";
|
||||
}else if(countParams == 0 && this.selectedFields[i].operatorId == "not"){
|
||||
params += " "+ this.fieldIdsMap[this.selectedFields[i].id].indexField + " <> "+'"' + encodeURIComponent(this.selectedFields[i].value) +'"' + " ";
|
||||
}else{
|
||||
params += (i == 0 ? "" : this.selectedFields[i].operatorId + " " ) + this.fieldIdsMap[this.selectedFields[i].id].indexField + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+'"' + encodeURIComponent(this.selectedFields[i].value) +'"' + " ";
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId + " " ) + this.fieldIdsMap[this.selectedFields[i].id].indexField + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+'"' + encodeURIComponent(this.selectedFields[i].value) +'"' + " ";
|
||||
|
||||
}
|
||||
// params +="&"+ this.selectedFields[i].id
|
||||
// + "="+ encodeURIComponent(this.selectedFields[i].value)+"&"+this.fieldIdsMap[this.selectedFields[i].id].operator
|
||||
// + "=" + this.selectedFields[i].operatorId;
|
||||
|
||||
countParams++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ export class SearchFilterComponent {
|
|||
|
||||
@Input() filter:Filter;
|
||||
@Input() showResultCount:boolean = true;
|
||||
private showAll:boolean = false;
|
||||
private _maxCharacters:number =30;
|
||||
public showAll:boolean = false;
|
||||
public _maxCharacters:number =30;
|
||||
|
||||
|
||||
constructor () {
|
||||
|
@ -73,7 +73,7 @@ export class SearchFilterComponent {
|
|||
ngOnInit() {
|
||||
|
||||
}
|
||||
private _formatTitle(title,length){
|
||||
public _formatTitle(title,length){
|
||||
return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title+" ("+length+")")
|
||||
}
|
||||
private _formatName(value){
|
||||
|
|
|
@ -165,7 +165,7 @@ export class SearchPageComponent {
|
|||
parameters+= ((countvalues == 1)?" and (":" or ")+ filterId+ '='+ value;
|
||||
fq+=(fq.length > 0 ? " " + "or" + " ":"" ) + filterId + " exact " + this.quote(value);
|
||||
}
|
||||
parameters+= " ) "
|
||||
parameters+= " ) ";
|
||||
if(countvalues > 0){
|
||||
fq="&fq="+fq;
|
||||
}
|
||||
|
@ -185,10 +185,10 @@ export class SearchPageComponent {
|
|||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "q=("+doisParams+")"
|
||||
doiQuery += "and ("+doisParams+")"
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "q=("+this.quote(keyword) +")"
|
||||
keywordQuery += "and ("+this.quote(keyword) +")"
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -323,10 +323,10 @@ export class SearchPageComponent {
|
|||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "q=("+doisParams+")"
|
||||
doiQuery += " and ("+doisParams+")"
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "q=("+this.quote(this.searchUtils.keyword) +")"
|
||||
keywordQuery += " and ("+this.quote(this.searchUtils.keyword) +")"
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,29 +127,8 @@ export class SearchResultComponent {
|
|||
@Input() status: number;
|
||||
errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
private errorMessage: string = "No results found";
|
||||
/*
|
||||
@Input() title;
|
||||
@Input() id;
|
||||
//publications & organizations:
|
||||
@Input() projects;
|
||||
//datasets & publications
|
||||
@Input() description;
|
||||
@Input() year;
|
||||
@Input() authors;
|
||||
//datasets:
|
||||
@Input() publisher;
|
||||
//dataproviders & projects:
|
||||
@Input() organizations;
|
||||
//projects:
|
||||
@Input() funders;
|
||||
//organizations:
|
||||
@Input() country;
|
||||
//dataproviders:
|
||||
@Input() type;
|
||||
@Input() websiteURL;
|
||||
@Input() OAIPMHURL;
|
||||
*/
|
||||
public errorMessage: string = "No results found";
|
||||
|
||||
constructor () {
|
||||
|
||||
}
|
||||
|
|
|
@ -23,20 +23,20 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
export class SearchDataprovidersComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
public filters =[];
|
||||
public totalResults:number = 0 ;
|
||||
private baseUrl:string;
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any; private subResults: any;
|
||||
private _location:Location;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
private CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
public sub: any; public subResults: any;
|
||||
public _location:Location;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.DATAPROVIDER_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.DATAPROVIDER_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.DATAPROVIDER_FIELDS_MAP;
|
||||
public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
|
||||
"export":[]
|
||||
};
|
||||
private CSVDownloaded = false;
|
||||
public CSVDownloaded = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -46,7 +46,7 @@ export class SearchDataprovidersComponent {
|
|||
this.baseUrl = OpenaireProperties.getLinkToSearchDataProviders();
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -61,7 +61,7 @@ console.info("PAGE init = "+this.searchUtils.page);
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -249,13 +249,13 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
console.info("PAGE queryChanged = "+this.searchUtils.page);
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
}
|
||||
|
||||
private downloadClicked($event) {
|
||||
public downloadClicked($event) {
|
||||
if(!this.CSVDownloaded) {
|
||||
this.CSVDownloaded = false;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ export class SearchDatasetsComponent {
|
|||
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -65,7 +65,7 @@ export class SearchDatasetsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
//this.getResults(parameters, this.searchUtils.page, this.searchUtils.size, "searchPage");
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
|
|
|
@ -23,18 +23,17 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
export class SearchOrganizationsComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
// public totalResults:number = 0 ;
|
||||
private baseUrl:string;
|
||||
public filters =[];
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any;
|
||||
private subResults: any;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.ORGANIZATION_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.ORGANIZATION_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
||||
private urlParams : Map<string, string>;
|
||||
private _location:Location;
|
||||
public sub: any;
|
||||
public subResults: any;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.ORGANIZATION_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.ORGANIZATION_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
||||
public urlParams : Map<string, string>;
|
||||
public _location:Location;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -46,7 +45,7 @@ export class SearchOrganizationsComponent {
|
|||
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -60,7 +59,7 @@ export class SearchOrganizationsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -109,7 +108,7 @@ export class SearchOrganizationsComponent {
|
|||
}
|
||||
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
|
|
|
@ -25,13 +25,13 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
export class SearchPeopleComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
private baseUrl:string;
|
||||
public filters =[];
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any;
|
||||
private _location:Location;
|
||||
private refineFields = [];
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
public sub: any;
|
||||
public _location:Location;
|
||||
public refineFields = [];
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -47,7 +47,7 @@ export class SearchPeopleComponent {
|
|||
}
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields; //TODO make it work as a directive
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
|
||||
|
@ -112,7 +112,7 @@ export class SearchPeopleComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
/*
|
||||
|
@ -182,7 +182,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
|||
//TODO set filters from
|
||||
}
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
|
|
|
@ -23,18 +23,17 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
})
|
||||
export class SearchProjectsComponent {
|
||||
public results =[];
|
||||
private filters: Filter[] =[];
|
||||
// public totalResults:number = 0 ;
|
||||
private baseUrl:string;
|
||||
public filters: Filter[] =[];
|
||||
public baseUrl:string;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private sub: any;
|
||||
private subResults: any;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.PROJECT_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.PROJECT_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PROJECT_FIELDS_MAP;
|
||||
private urlParams : Map<string, string>;
|
||||
private _location:Location;
|
||||
public sub: any;
|
||||
public subResults: any;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.PROJECT_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.PROJECT_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PROJECT_FIELDS_MAP;
|
||||
public urlParams : Map<string, string>;
|
||||
public _location:Location;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -47,7 +46,7 @@ export class SearchProjectsComponent {
|
|||
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -67,7 +66,7 @@ export class SearchProjectsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -141,7 +140,7 @@ export class SearchProjectsComponent {
|
|||
}
|
||||
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
this.urlParams = undefined;
|
||||
var parameters = $event.value;
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
|
|
|
@ -28,26 +28,25 @@ import {DOI} from '../../utils/string-utils.class';
|
|||
})
|
||||
export class SearchPublicationsComponent {
|
||||
public results =[];
|
||||
private filters =[];
|
||||
// public totalResults:number = 0 ;
|
||||
public filters =[];
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
private baseUrl:string = "";
|
||||
private sub: any;
|
||||
private subResults: any;
|
||||
private searchFields:SearchFields = new SearchFields();
|
||||
private refineFields: string[] = this.searchFields.PUBLICATION_INDEX;
|
||||
private indexIdsMap: { [key:string]:string } = this.searchFields.PUBLICATION_INDEX_PARAM_MAP;
|
||||
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PUBLICATION_FIELDS_MAP;
|
||||
private urlParams : Map<string, string>;
|
||||
public baseUrl:string = "";
|
||||
public sub: any;
|
||||
public subResults: any;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public refineFields: string[] = this.searchFields.PUBLICATION_INDEX;
|
||||
public indexIdsMap: { [key:string]:string } = this.searchFields.PUBLICATION_INDEX_PARAM_MAP;
|
||||
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.PUBLICATION_FIELDS_MAP;
|
||||
public urlParams : Map<string, string>;
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
private _location:Location;
|
||||
public _location:Location;
|
||||
|
||||
private CSV: any = { "columnNames": ["Title", "Authors", "Publication Year", "DOI",
|
||||
public CSV: any = { "columnNames": ["Title", "Authors", "Publication Year", "DOI",
|
||||
/*"Download From", "Publication type", "Journal",*/
|
||||
"Funder", "Project Name (GA Number)", "Access"],
|
||||
"export":[]
|
||||
};
|
||||
private CSVDownloaded = false;
|
||||
public CSVDownloaded = false;
|
||||
|
||||
constructor (private route: ActivatedRoute, private _searchPublicationsService: SearchPublicationsService ) {
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
@ -56,7 +55,7 @@ export class SearchPublicationsComponent {
|
|||
|
||||
}
|
||||
|
||||
private ngOnInit() {
|
||||
public ngOnInit() {
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
this.searchPage.indexIdsMap = this.indexIdsMap;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
|
@ -72,7 +71,7 @@ export class SearchPublicationsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
private ngOnDestroy() {
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
@ -224,14 +223,14 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
|||
|
||||
|
||||
|
||||
private queryChanged($event) {
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.value;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
console.info("Search Pubs::page "+this.searchUtils.page);
|
||||
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||
}
|
||||
|
||||
private downloadClicked($event) {
|
||||
public downloadClicked($event) {
|
||||
if(!this.CSVDownloaded) {
|
||||
this.CSVDownloaded = false;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export class ContextsService {
|
|||
console.info('ContextsService: request communities '+url);
|
||||
return this.http.get( url)
|
||||
.map(request => <any> request.json().data)
|
||||
.do(request => console.info("Get claims: offset = "))
|
||||
// .do(request => console.info("Get claims: offset = "))
|
||||
.catch(this.handleError)
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
|
@ -43,7 +43,7 @@ export class ContextsService {
|
|||
|
||||
return this.http.get( url)
|
||||
.map(request => <any> request.json().data)
|
||||
.do(request => console.info("Get claims: offset = " ))
|
||||
// .do(request => console.info("Get claims: offset = " ))
|
||||
.catch(this.handleError)
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
|
@ -60,7 +60,7 @@ export class ContextsService {
|
|||
return this.http.get( url)
|
||||
.map(request => <any> request.json().data)
|
||||
.map(res => this.parse(res.concept))
|
||||
.do(res => console.info(res ))
|
||||
// .do(res => console.info(res ))
|
||||
.catch(this.handleError)
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
|
|
|
@ -48,30 +48,21 @@ Selected::
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<span>{{errorMsg}}</span>
|
||||
<button (click)="login()"
|
||||
class="btn waves-effect waves-light"
|
||||
type="submit" name="action">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
//[(filtered)] =filteredObs [(selected)] =selectedObs
|
||||
// [(searchTermStream)] = searchTermStream
|
||||
//(keywordChange)="keywordChanged($event)"
|
||||
|
||||
})
|
||||
export class TestComponent {
|
||||
// for auto complete observable:
|
||||
// searchTermStream = new Subject<string>();
|
||||
// private selectedObs = [];
|
||||
// filteredObs: Observable<{}> = this.searchTermStream
|
||||
// .debounceTime(300).distinctUntilChanged()
|
||||
// .switchMap((term: string) => this.service(term));
|
||||
private lan;
|
||||
private types;
|
||||
|
||||
private user:{password:string,email:string} = {password:"",email:""};
|
||||
public lan;
|
||||
public types;
|
||||
|
||||
public user:{password:string,email:string} = {password:"",email:""};
|
||||
constructor(private _projectService: OpenaireProjectsService,private _searchProjectsService:SearchProjectsService,private _searchPubService:SearchPublicationsService,private _searchDataService:SearchDatasetsService, private _vocabulariesService: ISVocabulariesService) {
|
||||
// this.elementRef = myElement;
|
||||
}
|
||||
ngOnInit() {
|
||||
// this.lan = this._vocabulariesService.getLanguages();
|
||||
|
@ -80,7 +71,7 @@ export class TestComponent {
|
|||
this.user.email = localStorage.getItem("email");
|
||||
this.user.password = localStorage.getItem("password");
|
||||
//&collectedFrom=openaire____::4a39de251a65e801bb88d3e75b47623f&cl=and
|
||||
this._searchDataService.searchDatasets("&collectedFrom=openaire____::fdb035c8b3e0540a8d9a561a6c44f4de&cl=and" ,"&refine=true&fields=resulthostingdatasourceid", 1, 0, ["resulthostingdatasourceid"]).subscribe(
|
||||
this._searchDataService.searchDatasets('&fq=collectedfromdatasourceid exact "openaire____::fdb035c8b3e0540a8d9a561a6c44f4de"' ,"&refine=true&fields=resulthostingdatasourceid", 1, 0, ["resulthostingdatasourceid"]).subscribe(
|
||||
data => {
|
||||
|
||||
console.info("done" +data[0]);
|
||||
|
@ -91,7 +82,7 @@ export class TestComponent {
|
|||
|
||||
}
|
||||
);
|
||||
this._searchPubService.searchPublications("&fq=collectedfromdatasourceid exact openaire____::fdb035c8b3e0540a8d9a561a6c44f4de","&refine=true&fields=resulthostingdatasourceid" , 0, 0, ["resulthostingdatasourceid"]).subscribe(
|
||||
this._searchPubService.searchPublications('&fq=collectedfromdatasourceid exact "openaire____::fdb035c8b3e0540a8d9a561a6c44f4de"',"&refine=true&fields=resulthostingdatasourceid" , 1, 0, ["resulthostingdatasourceid"]).subscribe(
|
||||
data => {
|
||||
|
||||
console.info("done" +data[0]);
|
||||
|
@ -129,8 +120,8 @@ export class TestComponent {
|
|||
return projects;
|
||||
}
|
||||
|
||||
private filtered = [];
|
||||
private selected = [];
|
||||
public filtered = [];
|
||||
public selected = [];
|
||||
keywordChanged($event) {
|
||||
console.log("keyword Changed"+this.lan.length+" "+this.lan[0].id+"-"+this.lan[0].label);
|
||||
var keyword = $event.value;
|
||||
|
|
|
@ -56,17 +56,17 @@ export class EntitiesAutocompleteComponent {
|
|||
@Input() public selectedValue:string = '';
|
||||
@Input() public keyword = '';
|
||||
|
||||
private warningMessage = "";
|
||||
private infoMessage = "";
|
||||
public warningMessage = "";
|
||||
public infoMessage = "";
|
||||
|
||||
private tries = 0;
|
||||
private showInput = true;
|
||||
private sub;
|
||||
private done = false;
|
||||
private showLoading:boolean = false;
|
||||
private searchTermStream = new Subject<string>();
|
||||
public tries = 0;
|
||||
public showInput = true;
|
||||
public sub;
|
||||
public done = false;
|
||||
public showLoading:boolean = false;
|
||||
public searchTermStream = new Subject<string>();
|
||||
filtered: Observable<{}> ;
|
||||
private numFilteredResults:number = 0;
|
||||
public numFilteredResults:number = 0;
|
||||
|
||||
@Input() public funderId:string;
|
||||
@Input() public entityType:string ;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|||
`
|
||||
})
|
||||
export class IFrameComponent {
|
||||
private safeUrl: SafeResourceUrl;
|
||||
public safeUrl: SafeResourceUrl;
|
||||
@Input() url ;
|
||||
@Input() width = '100%';
|
||||
@Input() height = '300';
|
||||
|
|
|
@ -5,10 +5,10 @@ import {Directive, Input, HostBinding} from '@angular/core';
|
|||
@Directive({selector: '[open]'})
|
||||
export class Open {
|
||||
@HostBinding('style.display')
|
||||
private display:string;
|
||||
public display:string;
|
||||
@HostBinding('class.in')
|
||||
@HostBinding('attr.aria-expanded')
|
||||
private isExpanded:boolean = true;
|
||||
public isExpanded:boolean = true;
|
||||
|
||||
@Input()
|
||||
private set open(value:boolean) {
|
||||
|
|
|
@ -14,7 +14,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
|
||||
export class ProjectTitleFormatter {
|
||||
@Input() project: string[];
|
||||
private url:string;
|
||||
public url:string;
|
||||
constructor () {}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
@ -36,8 +36,11 @@ export class OpenaireProperties {
|
|||
// private searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2.0/api/";
|
||||
// private static searchAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
|
||||
|
||||
// private static searchAPIURLLAst = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
|
||||
private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/";
|
||||
|
||||
// private static searchResourcesAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources";
|
||||
private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/resources";
|
||||
|
||||
//private static searchServiveURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
export class SearchFields {
|
||||
//main Entities
|
||||
//PUBLICATIONS
|
||||
public PUBLICATION_INDEX:string[] = ["instancetypenameid", "resultlanguageid", "communityid","relprojectid", "relfunderid",
|
||||
public PUBLICATION_INDEX:string[] = ["instancetypename", "resultlanguagename", "community","relproject", "relfunderid",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"];
|
||||
"resultacceptanceyear","resultbestlicense","collectedfrom"];
|
||||
public ADVANCED_SEARCH_PUBLICATIONS_PARAM:string[] = ["q","title","author","publisher","type", "lang","project", "funder", "funderlv0",
|
||||
"funderlv1","funderlv2","community","access","pid","hostedBy","collectedFrom", "person"];
|
||||
public PUBLICATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community",
|
||||
[ "relprojectid"]:"project",[ "relfunderid"]:"funder",
|
||||
public PUBLICATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypename"]:"type", ["resultlanguagename"]:"lang",["community"]:"community",
|
||||
[ "relproject"]:"project",[ "relfunderid"]:"funder",
|
||||
["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2",
|
||||
["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom",
|
||||
["resultacceptanceyear"]:"year",["resultbestlicense"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfrom"]:"collectedFrom",
|
||||
["pid"]:"pid",["relpersonid"]:"person"};
|
||||
public PUBLICATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
|
||||
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator: "="},
|
||||
["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="},
|
||||
["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="},
|
||||
["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="},
|
||||
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relprojectid", equalityOperator: " exact "},
|
||||
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relproject", equalityOperator: " exact "},
|
||||
["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "},
|
||||
["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "},
|
||||
["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "},
|
||||
["funderlv2"]:{name:"Funding Substream Level 2",operator:"fn2", type:"refine", indexField:"relfundinglevel2_id", equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary", indexField:"instancetypenameid", equalityOperator: " exact "},
|
||||
["lang"]: {name:"Language",operator:"ln", type:"vocabulary", indexField:"resultlanguageid", equalityOperator: " exact "},
|
||||
["community"]: {name:"Community",operator:"cm", type:"refine", indexField:"communityid", equalityOperator: " exact "},
|
||||
["access"]: {name:"Access Mode",operator:"ac", type:"vocabulary", indexField:'resultbestlicenseid', equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary", indexField:"instancetypename", equalityOperator: " exact "},
|
||||
["lang"]: {name:"Language",operator:"ln", type:"vocabulary", indexField:"resultlanguagename", equalityOperator: " exact "},
|
||||
["community"]: {name:"Community",operator:"cm", type:"refine", indexField:"community", equalityOperator: " exact "},
|
||||
["access"]: {name:"Access Mode",operator:"ac", type:"vocabulary", indexField:'resultbestlicense', equalityOperator: " exact "},
|
||||
["hostedBy"]: {name:"Hosted by data provider",operator:"hs", type:"refine", indexField:"resulthostingdatasourceid", equalityOperator: " exact "},
|
||||
["collectedFrom"]: {name:"Collected from data provider",operator:"cl", type:"refine", indexField:"collectedfromdatasourceid", equalityOperator: " exact "},
|
||||
["collectedFrom"]: {name:"Collected from data provider",operator:"cl", type:"refine", indexField:"collectedfrom", equalityOperator: " exact "},
|
||||
["pid"]: {name:"PID",operator:"pd", type:"keyword", indexField:"pid", equalityOperator: " exact "},
|
||||
["person"]: {name:"Person",operator:"pr", type:"entity", indexField:"relpersonid", equalityOperator: " exact "}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
//PROJECT
|
||||
|
||||
public PROJECT_INDEX:string[] = ["funderid","fundinglevel0_id","fundinglevel1_id","fundinglevel2_id","projectstartyear","projectendyear","projectecsc39"];
|
||||
|
@ -59,24 +59,24 @@ export class SearchFields {
|
|||
};
|
||||
//DATAPROVIDERS
|
||||
|
||||
public DATAPROVIDER_INDEX:string[] = ["datasourcetypeuiid", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityid"];;
|
||||
public DATAPROVIDER_INDEX:string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname"];;
|
||||
public ADVANCED_DATAPROVIDER_PARAM:string[] = ["q", "officialname",
|
||||
"engname","subjects", "datasourcetype","lang","contenttype", "compatibility","organization"];
|
||||
public DATAPROVIDER_INDEX_PARAM_MAP:{ [key:string]:string } = {
|
||||
[ "datasourcetypeuiid"]:"type", [ "datasourcetypeid"]:"datasourcetype", ["datasourceodlanguages"]:"lang",["datasourceodcontenttypes"]:"contenttype",
|
||||
["datasourcecompatibilityid"]:"compatibility",["relorganizationid"]:"organization"};
|
||||
[ "datasourcetypeuiname"]:"type", [ "datasourcetypeid"]:"datasourcetype", ["datasourceodlanguages"]:"lang",["datasourceodcontenttypes"]:"contenttype",
|
||||
["datasourcecompatibilityname"]:"compatibility",["relorganizationid"]:"organization"};
|
||||
|
||||
public DATAPROVIDER_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
|
||||
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator:"="},
|
||||
["officialname"]:{name:"Official Name",operator:"of", type:"keyword", indexField:"datasourceofficialname", equalityOperator:"="},
|
||||
["engname"]:{name:"English name",operator:"eg", type:"keyword", indexField:"datasourceenglishname", equalityOperator:"="},
|
||||
["subjects"]: {name:"Subject",operator:"sb", type:"keyword", indexField:"datasourceodsubjects", equalityOperator:"="},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary" , indexField:"datasourcetypeuiid", equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary" , indexField:"datasourcetypeuiname", equalityOperator: " exact "},
|
||||
["datasourcetype"]:{name:"Type",operator:"tp", type:"vocabulary" , indexField:"datasourcetypeid", equalityOperator: " exact "},
|
||||
["lang"]:{name:"Language",operator:"ln", type:"vocabulary", indexField:"datasourceodlanguages", equalityOperator: " exact "},
|
||||
["contenttype"]:{name:"Content Type",operator:"cn", type:"refine", indexField:"datasourceodcontenttypes", equalityOperator: " exact "},
|
||||
["compatibility"]:{name:"Compatibility Level",operator:"cm", type:"vocabulary", indexField:"datasourcecompatibilityid", equalityOperator: " exact "},
|
||||
["contenttype"]:{name:"Content",operator:"cn", type:"refine", indexField:"datasourceodcontenttypes", equalityOperator: " exact "},
|
||||
["compatibility"]:{name:"Compatibility Level",operator:"cm", type:"vocabulary", indexField:"datasourcecompatibilityname", equalityOperator: " exact "},
|
||||
["organization"]: {name:"Organization",operator:"og", type:"entity", indexField:"relorganizationid", equalityOperator: " exact "}
|
||||
|
||||
};
|
||||
|
@ -86,47 +86,47 @@ export class SearchFields {
|
|||
|
||||
|
||||
//DATASET
|
||||
public DATASET_INDEX:string[] = ["instancetypenameid", "resultlanguageid","relprojectid", //"communityid",
|
||||
public DATASET_INDEX:string[] = ["instancetypename", "resultlanguagename","relproject", //"community",
|
||||
"relfunderid", "relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"];
|
||||
"resultacceptanceyear","resultbestlicense","collectedfrom"];
|
||||
public ADVANCED_SEARCH_DATASET_PARAM:string[] = ["q","title","author","publisher","type", "lang", "funder", "funderlv0",
|
||||
"funderlv1","funderlv2","community","access","pid","hostedBy","collectedFrom","person"];
|
||||
public DATASET_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community",
|
||||
[ "relprojectid"]:"project", [ "relfunderid"]:"funder",
|
||||
public DATASET_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypename"]:"type", ["resultlanguagename"]:"lang",["community"]:"community",
|
||||
[ "relproject"]:"project", [ "relfunderid"]:"funder",
|
||||
["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2",
|
||||
["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom",
|
||||
["resultacceptanceyear"]:"year",["resultbestlicense"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfrom"]:"collectedFrom",
|
||||
["pid"]:"pid",["relpersonid"]:"person"};
|
||||
public DATASET_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
|
||||
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator: "="},
|
||||
["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="},
|
||||
["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="},
|
||||
["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="},
|
||||
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relprojectid", equalityOperator: " exact "},
|
||||
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relproject", equalityOperator: " exact "},
|
||||
["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "},
|
||||
["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "},
|
||||
["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "},
|
||||
["funderlv2"]:{name:"Funding Substream Level 2",operator:"fn2", type:"refine", indexField:"relfundinglevel2_id", equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary", indexField:"instancetypenameid", equalityOperator: " exact "},
|
||||
["lang"]: {name:"Language",operator:"ln", type:"vocabulary", indexField:"resultlanguageid", equalityOperator: " exact "},
|
||||
["community"]: {name:"Community",operator:"cm", type:"refine", indexField:"communityid", equalityOperator: " exact "},
|
||||
["access"]: {name:"Access Mode",operator:"ac", type:"vocabulary", indexField:'resultbestlicenseid', equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"vocabulary", indexField:"instancetypename", equalityOperator: " exact "},
|
||||
["lang"]: {name:"Language",operator:"ln", type:"vocabulary", indexField:"resultlanguagename", equalityOperator: " exact "},
|
||||
["community"]: {name:"Community",operator:"cm", type:"refine", indexField:"community", equalityOperator: " exact "},
|
||||
["access"]: {name:"Access Mode",operator:"ac", type:"vocabulary", indexField:'resultbestlicense', equalityOperator: " exact "},
|
||||
["hostedBy"]: {name:"Hosted by data provider",operator:"hs", type:"refine", indexField:"resulthostingdatasourceid", equalityOperator: " exact "},
|
||||
["collectedFrom"]: {name:"Collected from data provider",operator:"cl", type:"refine", indexField:"collectedfromdatasourceid", equalityOperator: " exact "},
|
||||
["collectedFrom"]: {name:"Collected from data provider",operator:"cl", type:"refine", indexField:"collectedfrom", equalityOperator: " exact "},
|
||||
["pid"]: {name:"PID",operator:"pd", type:"keyword", indexField:"pid", equalityOperator: " exact "},
|
||||
["person"]: {name:"Person",operator:"pr", type:"entity", indexField:"relpersonid", equalityOperator: " exact "}
|
||||
};
|
||||
|
||||
|
||||
//ORGANIZATION
|
||||
public ORGANIZATION_INDEX:string[] = ["organizationcountryid","organizationeclegalbody"];
|
||||
public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
|
||||
public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
|
||||
public ORGANIZATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["organizationlegalname"]:"contenttype", ["organizationlegalshortname"]:"type",
|
||||
["organizationcountryid"]:"country",["organizationeclegalbody"]:"type"};
|
||||
["organizationcountryname"]:"country"};//,["organizationeclegalbody"]:"type"};
|
||||
public ORGANIZATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string , equalityOperator:string}} ={
|
||||
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator: "="},
|
||||
["contenttype"]:{name:"Legal Name",operator:"cn", type:"keyword" , indexField:"organizationlegalname", equalityOperator: "="},
|
||||
["compatibility"]:{name:"Legal Short Name",operator:"cm", type:"keyword", indexField:"organizationlegalshortname", equalityOperator: "="},
|
||||
["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryid", equalityOperator: " exact "},
|
||||
["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryname", equalityOperator: " exact "},
|
||||
["type"]:{name:"Type",operator:"tp", type:"refine", indexField:"organizationeclegalbody", equalityOperator: " exact "},
|
||||
|
||||
};
|
||||
|
@ -135,7 +135,7 @@ export class SearchFields {
|
|||
|
||||
//PERSON
|
||||
public PERSON_INDEX:string[] = [];
|
||||
public ADVANCED_SEARCH_PERSON_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
|
||||
public ADVANCED_SEARCH_PERSON_PARAM:string[] = ["q","surname","name","fullname"];
|
||||
public PERSON_INDEX_PARAM_MAP:{ [key:string]:string } = {["personsecondnames"]:"surname", ["personfirstname"]:"name",
|
||||
["personfullname"]:"fullname"};
|
||||
public PERSON_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
|
||||
|
@ -154,13 +154,13 @@ export class SearchFields {
|
|||
|
||||
// public PROJECT_PARAM_FIELDS:string[] = ["funder","fl0","fl1", "fl2", "start","end","sc39"];
|
||||
|
||||
public FIELDS_NAMES: { [key:string]:string } = {["relprojectid"]:"Project",["funderid"]:"Funder",["fundinglevel0_id"]:"Funding Stream",
|
||||
public FIELDS_NAMES: { [key:string]:string } = {["relproject"]:"Project",["funderid"]:"Funder",["fundinglevel0_id"]:"Funding Stream",
|
||||
["fundinglevel1_id"]:"Funding Substream Level 1", ["fundinglevel2_id"]:"Funding Substream Level 2", ["relfunderid"]:"Funder",
|
||||
["relfundinglevel0_id"]:"Funding Stream",["relfundinglevel1_id"]:"Funding Substream Level 1", ["relfundinglevel2_id"]:"Funding Substream Level 2",
|
||||
["instancetypenameid"]:"Type",["resultlanguageid"]: "Language",["communityid"]: "Context",["resultacceptanceyear"]:"Year",
|
||||
["resultbestlicenseid"]:"Access Mode",["resulthostingdatasourceid"]:"Hosting Data provider",
|
||||
["collectedfromdatasourceid"]:"Collected from", ["datasourcetypeuiid"]:"Compatibility Type", ["datasourceodlanguages"]:"Language",
|
||||
["datasourceodcontenttypes"]: "Type", ["datasourcecompatibilityid"]:"Compatibility Type", ["organizationcountryid"]:"Country",
|
||||
["instancetypename"]:"Type",["resultlanguagename"]: "Language",["community"]: "Community",["resultacceptanceyear"]:"Year",
|
||||
["resultbestlicense"]:"Access Mode",["resulthostingdatasourceid"]:"Hosting Data provider",
|
||||
["collectedfrom"]:"Data Provider", ["datasourcetypeuiname"]:"Type", ["datasourceodlanguages"]:"Language",
|
||||
["datasourceodcontenttypes"]: "Content", ["datasourcecompatibilityname"]:"Compatibility Level", ["organizationcountryname"]:"Country",
|
||||
["organizationeclegalbody"]:"Type",["projectstartyear"]:"Start Year",["projectendyear"]:"End Year",["projectecsc39"]:"Special Clause 39"};
|
||||
|
||||
|
||||
|
|
|
@ -59,13 +59,13 @@ export class StaticAutoCompleteComponent {
|
|||
|
||||
@Input() public keyword = '';
|
||||
@Input() public type = 'search' //search, result, context, project
|
||||
private warningMessage = "";
|
||||
private infoMessage = "";
|
||||
private showLoading:boolean = false;
|
||||
private tries = 0;
|
||||
private showInput = true;
|
||||
private sub;
|
||||
private done = false;
|
||||
public warningMessage = "";
|
||||
public infoMessage = "";
|
||||
public showLoading:boolean = false;
|
||||
public tries = 0;
|
||||
public showInput = true;
|
||||
public sub;
|
||||
public done = false;
|
||||
constructor ( private _vocabulariesService: ISVocabulariesService,private _refineService: RefineFieldResultsService, private myElement: ElementRef) {
|
||||
}
|
||||
ngOnDestroy(){
|
||||
|
@ -93,6 +93,9 @@ export class StaticAutoCompleteComponent {
|
|||
this.warningMessage = "An Error occured..."
|
||||
}
|
||||
);
|
||||
}else{
|
||||
this.showLoading = false;
|
||||
|
||||
}
|
||||
}else{
|
||||
this.afterListFetchedActions();
|
||||
|
|
Loading…
Reference in New Issue