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