put the divids- helper for linking views, Fix the links in advanced search page, remove openaireProperties class change error codes path, add the

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@50761 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-02-15 10:36:12 +00:00
parent 114c3b2004
commit 4fac0720b2
72 changed files with 186 additions and 958 deletions

View File

@ -15,39 +15,20 @@ import{EnvProperties} from '../../utils/properties/env-properties';
template: `
<div class=" uk-animation uk-card uk-card-default uk-padding uk-padding-large uk-padding-remove-left uk-margin-left" >
<button class="uk-button" type="button" uk-toggle="target: #toggle-hover; mode: hover">? Test Div Help Content</button>
<helper hidden id="toggle-hover" div="test2"></helper>
<!--div uk-grid="" >
<div class="uk-width-auto@m uk-first-column ">
<div>
<select [(ngModel)]="selectedCommunityId" (ngModelChange)="communityChanged()" class=" " name="select_funder" >
<option value="0" >Select community</option>
<option *ngFor="let community of communities" [value]="community.id" >{{community.label}}</option>
</select>
</div>
<div *ngIf="selectedCommunityId != '0' && categories.length > 0">
<select [(ngModel)]="selectedCategoryId" (ngModelChange)="categoryChanged()" class=" " name="select_funder" >
<option value="0" >Select category</option>
<option *ngFor="let category of categories" [value]="category.id" >{{category.label}}</option>
</select>
<div class="uk-grid">
<div class="uk-width-expand">
</div>
</div>
<div class="uk-width-expand@m">
<static-autocomplete [(properties)]=properties[(list)] = concepts [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Concept name'" title = "Concepts" [multipleSelections]=true (addItem) = "select($event)" > </static-autocomplete>
</div>
</div-->
<table class="uk-width-1-1 uk-table uk-table-responsive" ><tr>
<tr>
<td >
<select [(ngModel)]="selectedCommunityId" (ngModelChange)="communityChanged()" class=" " name="select_funder" >
<select [(ngModel)]="selectedCommunityId" (ngModelChange)="communityChanged()" class="uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select community</option>
<option *ngFor="let community of communities" [value]="community.id" >{{community.label}}</option>
</select>
</td>
<td *ngIf="selectedCommunityId != '0' && categories.length > 0">
<select [(ngModel)]="selectedCategoryId" (ngModelChange)="categoryChanged()" class=" " name="select_funder" >
<select [(ngModel)]="selectedCategoryId" (ngModelChange)="categoryChanged()" class="uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select category</option>
<option *ngFor="let category of categories" [value]="category.id" >{{category.label}}</option>
</select>
@ -123,6 +104,10 @@ import{EnvProperties} from '../../utils/properties/env-properties';
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>
</div>
<helper div="link-context-form" class="uk-width-medium"></helper>
</div>
</div>
`

View File

@ -12,25 +12,25 @@ import{EnvProperties} from '../../utils/properties/env-properties';
selector: 'claim-projects-search-form',
template: `
<div>
<button class="uk-button" type="button" uk-toggle="target: #toggle-hover; mode: hover">? Test Div Help Content</button>
<helper hidden id="toggle-hover" div="test"></helper>
<form class=" uk-animation uk-card uk-card-default uk-padding uk-padding-large uk-padding-remove-left uk-margin-left uk-grid" uk-grid="">
<div class="uk-width-auto@m uk-first-column">
<select class="" [(ngModel)]="selectedFunderId" name="select_funder" >
<option value="0" (click)="funderChanged('0','Select funder:')">Select funder:</option>
<option *ngFor="let funder of funders" [value]="funder.id" (click)="funderChanged(funder.id,funder.name)">{{(funder.name.split("||").length > 0)?(funder.name.split("||")[0]+" ("+funder.name.split("||")[1]+")"):(funder.name)}}</option>
</select>
<form class=" uk-animation uk-card uk-card-default uk-padding uk-padding-large uk-padding-remove-left uk-margin-left" >
<div class="uk-grid">
<div class="uk-grid uk-width-expand">
<div class="uk-width-auto@m uk-first-column">
<select class="uk-select uk-width-large" [(ngModel)]="selectedFunderId" name="select_funder" >
<option value="0" (click)="funderChanged('0','Select funder:')">Select funder:</option>
<option *ngFor="let funder of funders" [value]="funder.id" (click)="funderChanged(funder.id,funder.name)">{{(funder.name.split("||").length > 0)?(funder.name.split("||")[0]+" ("+funder.name.split("||")[1]+")"):(funder.name)}}</option>
</select>
</div>
<div class="uk-width-expand@m">
<entities-autocomplete [(properties)]=properties entityType="project" [funderId]="selectedFunderId" [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Project name or ID'" title = "Projects" [multipleSelections]=true (addItem) = "select($event)" ></entities-autocomplete>
</div>
</div>
<div class="uk-width-expand@m">
<helper div="link-project-form" class="uk-width-medium"></helper>
</div>
</form>
<entities-autocomplete [(properties)]=properties entityType="project" [funderId]="selectedFunderId" [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Project name or ID'" title = "Projects" [multipleSelections]=true (addItem) = "select($event)" ></entities-autocomplete>
</div>
</form>
</div>
`
})

View File

@ -1,6 +1,7 @@
<form class=" uk-padding uk-padding-large uk-padding-remove-left uk-margin-left uk-grid" uk-grid="">
<form class=" uk-padding uk-padding-large uk-padding-remove-left uk-margin-left" >
<div class="uk-grid">
<div class="uk-width-expand">
<select [(ngModel)]="searchSource" name="select_source" (ngModelChange)="searchSourceChanged(searchSource)" class="uk-select uk-width-1-4">
<option value="openaire">in OpenAIRE </option>
<option value="crossref">in Crossref </option>
@ -12,7 +13,10 @@
<span class="input-group-btn">
<button (click)="search(false)" type="submit" class=" uk-button uk-button-default">Search</button>
</span>
</form>
</div>
<helper div="link-result-form" class="uk-width-medium"></helper>
</div>
</form>
<div *ngIf="showSearchResults" class="uk-margin-top uk-animation">
<ul class="uk-tab" uk-tab="animation: uk-animation-fade">
<li *ngIf="searchSource == 'all' || searchSource == 'openaire'" (click)="clickTab('openairePub')" ><a>Publications <span class="uk-badge uk-badge-notification">{{ (openairePubsNum)?openairePubsNum:0 }}</span></a></li>

View File

@ -7,7 +7,7 @@ import { SearchDataciteService } from '../claim-utils/service/searchDatacite.ser
import {SearchDatasetsService} from '../../services/searchDatasets.service';
import {SearchSoftwareService} from '../../services/searchSoftware.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {ClaimResult} from '../claim-utils/claimEntities.class';
import{DOI} from '../../utils/string-utils.class';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -13,10 +13,11 @@ import {PublicationsServiceModule} from '../../services/publicationsService.modu
import {DatasetsServiceModule} from '../../services/datasetsService.module';
import {SoftwareServiceModule} from '../../services/softwareService.module';
import {PagingModule } from '../../utils/paging.module';
import {HelperModule} from '../../utils/helper/helper.module';
@NgModule({
imports: [SharedModule, CommonModule, PublicationsServiceModule, DatasetsServiceModule, PagingModule, SearchCrossrefServiceModule,
SearchDataciteServiceModule,SoftwareServiceModule],
SearchDataciteServiceModule,SoftwareServiceModule, HelperModule],
providers:[
SearchOrcidService
],

View File

@ -72,9 +72,9 @@ export class DirectLinkingComponent {
this.show = (this.linkTo != "result")?"claim":"result";
this.linkType = this.linkTo;
var isInlineResult:boolean = false; // is a link result - result
// if((this.type == "publication" || this.type == "dataset" || this.type == "software") && ((this.linkTo == "publication" || this.linkTo == "dataset" || this.linkTo == "software") || this.linkTo == "result" )){
// isInlineResult = true;
// }
if((this.type == "publication" || this.type == "dataset" || this.type == "software") && ((this.linkTo == "publication" || this.linkTo == "dataset" || this.linkTo == "software") || this.linkTo == "result" )){
isInlineResult = true;
}
if(this.type == "project"){
this.linkType = "project";
this.getProjectById(this.id);

View File

@ -15,36 +15,8 @@ import{EnvProperties} from '../../../utils/properties/env-properties';
<div class="uk-animation " style=" ">
<form class=" uk-padding ">
<div class="uk-clearfix">
<a class="uk-float-right" uk-toggle="target: #uploadInfo; animation: uk-animation-fade"><span class="uk-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span> What is upload mode? </a>
</div>
<div id="uploadInfo" class="uk-card uk-card-default uk-card-body uk-margin-small" hidden>
<a uk-toggle="target: #uploadInfo; animation: uk-animation-fade" class="uk-float-right"><span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
</span></a>
<div class="uk-text-bold"><span class="uk-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span> Upload information:</div>
Upload a csv file containing a list of DOIs. For each DOI found in the file, metadata will be fetched from CrossRef or Datacite.
Available results will be added to your selected resarch results list in order to be linked with the selected Projects and Contexts.
<div class="uk-article-meta">
CSV format:
<ul class="uk-list">
<li>The format of CSV file should be "DOI","ACCESS_MODE","DATE".</li>
<li>The value "DOI" is required </li>
<li>Access mode column should have values: "OPEN","CLOSED" or "EMBARGO".</li>
<li>Date column valid format is YYYY-MM-DD and is required when access mode has value EMBARGO.</li>
<li>In case access mode is not available default value is "OPEN".</li>
</ul>
</div>
</div>
<div class="uk-grid">
<div class="uk-width-expand">
<div for="exampleInputFile">Upload a DOI csv file:</div>
<label for="exampleInputFile">Select a file</label>
<input id="exampleInputFile" class="uk-width-1-2" type="file" (change)="fileChangeEvent($event)" placeholder="Upload file..." />
@ -69,7 +41,10 @@ import{EnvProperties} from '../../../utils/properties/env-properties';
</div>
<div *ngIf="errorMessage.length > 0 " class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<modal-loading [message]= "'Uploading, reading and fetching results from your document. Please give us a moment..'"></modal-loading>
</form>
</div>
<helper div="link-result-bulk" class="uk-width-medium"></helper>
</div>
</form>

View File

@ -5,10 +5,11 @@ import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
import {BulkClaimComponent} from './bulkClaim.component';
import {SearchCrossrefServiceModule} from '../../claim-utils/service/searchCrossrefService.module';
import {SearchDataciteServiceModule} from '../../claim-utils/service/searchDataciteService.module';
import {HelperModule} from '../../../utils/helper/helper.module';
@NgModule({
imports: [
SharedModule, LoadingModalModule, SearchCrossrefServiceModule
SharedModule, LoadingModalModule, SearchCrossrefServiceModule, HelperModule
],
declarations: [
BulkClaimComponent

View File

@ -172,7 +172,7 @@ private isertBulkClaims(claims){
private validate(){
this.warningMessage = "";
this.errorMessage = "";
if( this.results && this.results.length == 0){
if( this.results && this.results.length == 0 && ( this.inlineEntity == null)){
this.warningMessage = "There are no research results selected.";
}else if((!this.contexts|| this.contexts.length==0 )&&(!this.projects|| this.projects.length==0 )&& ( this.inlineEntity == null)){
this.warningMessage = "There are no projects or communities to link.";

View File

@ -20,6 +20,18 @@
<li [class]="(step==3)?'uk-active':' '" (click)="step=3;"><a [class]="(results.length == 0)?'uk-disabled':''" (click)="show='claim';" >3 Review metadata</a></li>
</ul>
<!--start-over [results]="results" [contexts]="contexts" [projects]="projects" ></start-over-->
<!-- add here pagination to be visible when results list is long -->
<ul *ngIf="step ==2" class=" uk-pagination uk-flex-center uk-margin-auto uk-text-center">
<li *ngIf="step !=1 " (click)="step=step-1;" class="uk-margin-left"><a><span class="uk-margin-small-right" uk-pagination-previous></span> Previous</a></li>
<li *ngIf="step !=3 " (click)="step=step + 1;" >
<a>Next <span uk-pagination-next></span></a>
</li>
<li *ngIf=" step == 3 " (click)="next()" >
<claim-insert [contexts]="contexts" [results]="results" [projects]="projects" [show] = "show"
(showChange)="showChange($event)" [(properties)] = properties></claim-insert>
</li>
</ul>
<ul uk-accordion>
<li>
<h3 class=" uk-text-right uk-margin-remove-vertical uk-width-small uk-margin-auto-left uk-accordion-title basket-title ">
@ -61,12 +73,10 @@
</ul>
</div>
<!--/div-->
<!--/div-->
<!--hr-->
<!-- Research Results -->
<div *ngIf="step==2 ">
<div class="uk-width-1-1 uk-card uk-card-default uk-padding ">
<div class=" uk-padding-small uk-padding-remove-bottom ">
<span *ngIf="bulkMode" class=" uk-animation uk-float-right">
@ -87,8 +97,13 @@
</div>
</div>
<div *ngIf="step==3" class="uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l">
<claim-selected-results title= "Selected Research Results" [results]="results" [bulkMode]="bulkMode" showSearch = false showAccessRights = true>
</claim-selected-results>
<div class=" uk-grid">
<div class="uk-width-expand">
<claim-selected-results title= "Selected Research Results" [results]="results" [bulkMode]="bulkMode" showSearch = false showAccessRights = true>
</claim-selected-results>
</div>
<helper div="link-metadata" class="uk-width-medium"></helper>
</div>
</div>

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import { Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
@ -65,7 +65,7 @@ export class DepositBySubjectResultComponent {
this.updateUrl(data.envSpecific.baseLink+this._router.url);
this.zenodo = this.properties.zenodo;
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("Deposit "+this.requestFor).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit "+this.requestFor).subscribe();
}
});

View File

@ -56,7 +56,7 @@ export class DepositComponent {
this.updateUrl(data.envSpecific.baseLink+this._router.url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("Deposit "+this.requestFor).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit "+this.requestFor).subscribe();
}
});
}

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {ErrorCodes} from '../utils/properties/openaireProperties';
import {ErrorCodes} from '../utils/properties/errorCodes';
import { Router, ActivatedRoute } from '@angular/router';
import { FetchDataproviders } from '../utils/fetchEntitiesClasses/fetchDataproviders.class';
import { SearchDataprovidersService } from '../services/searchDataproviders.service';
@ -177,7 +177,7 @@ export class DepositResultComponent {
this.updateUrl(data.envSpecific.baseLink+this._router.url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("Deposit "+this.requestFor).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit "+this.requestFor).subscribe();
}
});

View File

@ -13,7 +13,7 @@ import { SearchProjectsService } from '../../services/searchProjects.service';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
import { RelatedDatasourcesTabComponent } from './relatedDatasourcesTab.component';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class';
import {PiwikService} from '../../utils/piwik/piwik.service';
import{EnvProperties} from '../../utils/properties/env-properties';
@ -157,7 +157,7 @@ export class DataProviderComponent {
this.updateTitle(this.dataProviderInfo.title.name);
this.updateDescription("Content provider, search, repositories, open access,"+this.dataProviderInfo.title.name);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.dataProviderInfo.title.name).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.dataProviderInfo.title.name).subscribe();
}
this.showLoading = false;

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import{EnvProperties} from '../../utils/properties/env-properties';
@Component({

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import{EnvProperties} from '../../utils/properties/env-properties';
@Component({

View File

@ -2,7 +2,7 @@ import {Component, Input} from '@angular/core';
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import{EnvProperties} from '../../utils/properties/env-properties';
@Component({

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import{EnvProperties} from '../../utils/properties/env-properties';
@Component({

View File

@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class';
import { Observable } from 'rxjs/Observable';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
@Component({
selector: 'statisticsTab',

View File

@ -114,7 +114,7 @@ export class DatasetComponent {
this.updateTitle(this.datasetInfo.title.name);
this.updateDescription("Dataset, search, repositories, open access,"+this.datasetInfo.title.name);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.datasetInfo.title.name).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.datasetInfo.title.name).subscribe();
}
this.result = []

View File

@ -134,7 +134,7 @@ export class HtmlProjectReportComponent{
this.updateTitle(data.title+" "+this.resultsType+" report");
}
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(((data.acronym)?data.acronym:data.title)+" "+this.resultsType+" report").subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, ((data.acronym)?data.acronym:data.title)+" "+this.resultsType+" report").subscribe();
}
},
err => {

View File

@ -1,7 +1,7 @@
import {Component, Input, Output, EventEmitter} from '@angular/core';
import {Metrics} from '../../utils/entities/metrics';
import {MetricsService } from '../../services/metrics.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import { Subscription } from 'rxjs/Subscription';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -4,7 +4,7 @@ import {ActivatedRoute} from '@angular/router';
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
import { SearchProjectsService } from '../../services/searchProjects.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {StringUtils} from '../../utils/string-utils.class';
import {RouterHelper} from '../../utils/routerHelper.class';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -13,7 +13,7 @@ import {SearchPublicationsService} from '../../services/searchPublications.servi
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchProjectsService} from '../../services/searchProjects.service';
import { Meta} from '../../sharedComponents/metaService';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchingProjectsTabComponent} from '../landing-utils/searchingProjectsInTab.component';
import {RouterHelper} from '../../utils/routerHelper.class';
@ -188,7 +188,7 @@ export class OrganizationComponent {
this.updateTitle(this.organizationInfo.title.name);
this.updateDescription("Organization, country, projects, search, repositories, open access"+this.organizationInfo.title.name);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.organizationInfo.title.name).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.organizationInfo.title.name).subscribe();
}
var refineFields:string [] = ["funder"];
@ -288,7 +288,7 @@ export class OrganizationComponent {
this.closeLoading();
window.open(window.URL.createObjectURL(data));
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.downloadFilePiwikSub = this._piwikService.trackDownload(url).subscribe();
this.downloadFilePiwikSub = this._piwikService.trackDownload(this.properties, url).subscribe();
}
},
err => {
@ -343,7 +343,7 @@ export class OrganizationComponent {
this.closeLoading();
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
// if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
// this._piwikService.trackDownload(url).subscribe();
// this._piwikService.trackDownload(this.properties, url).subscribe();
// }
}
} else {
@ -364,7 +364,7 @@ export class OrganizationComponent {
this.closeLoading();
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
// if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
// this._piwikService.trackDownload(url).subscribe();
// this._piwikService.trackDownload(this.properties, url).subscribe();
// }
}
},

View File

@ -15,7 +15,7 @@ import { SearchSoftwareService } from '../../services/searchSoftware.service';
import {ModalLoading} from '../../utils/modal/loading.component';
import {ReportsService} from '../../services/reports.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import { Meta} from '../../sharedComponents/metaService';
import {PiwikService} from '../../utils/piwik/piwik.service';
@ -251,7 +251,7 @@ properties:EnvProperties;
this.updateTitle(this.projectName);
this.updateDescription("project, funding, open access, publications, research data, "+this.projectName+ ","+this.projectInfo.funder);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.projectName).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.projectName).subscribe();
}
this.project= { funderId: "", funderName: this.projectInfo.funder, projectId: this.projectId, projectName: this.projectInfo.title, projectAcronym: this.projectInfo.acronym, startDate: this.projectInfo.startDate, endDate: this.projectInfo.endDate };
@ -284,7 +284,7 @@ properties:EnvProperties;
this.closeLoading();
window.open(window.URL.createObjectURL(data));
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.downloadFilePiwikSub = this._piwikService.trackDownload(url).subscribe();
this.downloadFilePiwikSub = this._piwikService.trackDownload(this.properties, url).subscribe();
}
},
error => {

View File

@ -132,7 +132,7 @@ export class PublicationComponent {
this.updateTitle(this.publicationInfo.title.name);
this.updateDescription("Dataset, search, repositories, open access,"+this.publicationInfo.title.name);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.publicationInfo.title.name).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.publicationInfo.title.name).subscribe();
}
let bioentitiesNum = 0;

View File

@ -114,7 +114,7 @@ export class SoftwareComponent {
this.updateTitle(this.softwareInfo.title.name);
this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title.name);
if( this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.softwareInfo.title.name).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.softwareInfo.title.name).subscribe();
}
this.result = []

View File

@ -3,7 +3,7 @@ import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common';
import {ErrorCodes} from '../utils/properties/openaireProperties';
import {ErrorCodes} from '../utils/properties/errorCodes';
import {RouterHelper} from '../utils/routerHelper.class';
import {Session} from '../login/utils/helper.class';

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchDatasetsService} from '../../services/searchDatasets.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
@ -63,7 +63,7 @@ export class AdvancedSearchDatasetsComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties= data.envSpecific;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDataProviders;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDatasets;
this.pagingLimit = data.envSpecific.pagingLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
@ -63,7 +63,7 @@ public resourcesQuery = "(oaftype exact organization)";
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties= data.envSpecific;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDataProviders;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedOrganizations;
this.pagingLimit = data.envSpecific.pagingLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchProjectsService} from '../../services/searchProjects.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
@ -65,7 +65,7 @@ export class AdvancedSearchProjectsComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties= data.envSpecific;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDataProviders;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedProjects;
this.pagingLimit = data.envSpecific.pagingLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchPublicationsService} from '../../services/searchPublications.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
@ -69,7 +69,7 @@ export class AdvancedSearchPublicationsComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties= data.envSpecific;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDataProviders;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedPublications;
this.pagingLimit = data.envSpecific.pagingLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute} from '@angular/router';
import {Filter, Value,AdvancedField} from '../searchUtils/searchHelperClasses.class';
import {SearchSoftwareService} from '../../services/searchSoftware.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
@ -64,7 +64,7 @@ export class AdvancedSearchSoftwareComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties= data.envSpecific;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedDataProviders;
this.searchUtils.baseUrl = data.envSpecific.searchLinkToAdvancedSoftware;
this.pagingLimit = data.envSpecific.pagingLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;

View File

@ -4,7 +4,7 @@ import { ActivatedRoute} from '@angular/router';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -4,7 +4,7 @@ import { ActivatedRoute} from '@angular/router';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -3,7 +3,7 @@ import { ActivatedRoute} from '@angular/router';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -3,7 +3,7 @@ import { ActivatedRoute} from '@angular/router';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -5,7 +5,7 @@ import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -5,7 +5,7 @@ import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -20,7 +20,7 @@ import {SearchSoftwareService} from '../../services/searchSoftware.service';
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class';
import {RefineFieldResultsService} from '../../services/refineFieldResults.service';
import {PiwikService} from '../../utils/piwik/piwik.service';
@ -127,7 +127,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
this._meta.updateProperty("og:title", title);
this._meta.updateProperty("og:url", url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE |Search publications, research data, projects...").subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...").subscribe();
}

View File

@ -63,7 +63,7 @@ export class AdvancedSearchPageComponent {
this.updateUrl(data.envSpecific.baseLink+location.pathname);
}
if(typeof document !== 'undefined' && this.isPiwikEnabled){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle).subscribe();
}
});
@ -239,7 +239,7 @@ export class AdvancedSearchPageComponent {
localStorage.setItem('previousRoute', this.router.url);
}
if(this.isPiwikEnabled && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle).subscribe();
}
/* End Piwik Code */
}

View File

@ -5,7 +5,7 @@ import {Location} from '@angular/common';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {RefineFieldResultsService} from '../../services/refineFieldResults.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass} from '../searchUtils/searchUtils.class';

View File

@ -5,7 +5,7 @@ import {Location} from '@angular/common';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {RefineFieldResultsService} from '../../services/refineFieldResults.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass} from '../searchUtils/searchUtils.class';

View File

@ -39,7 +39,7 @@ export class SearchDownloadComponent {
// Alert box when something is wrong with CSV requests
@ViewChild('AlertModalCsvError') alertCsvError;
public isPiwikEnabled;
public properties:EnvProperties;
constructor (private route: ActivatedRoute, private _reportsService: ReportsService, private _piwikService:PiwikService) {}
ngOnInit() {
@ -82,7 +82,7 @@ export class SearchDownloadComponent {
this.closeLoading();
window.open(window.URL.createObjectURL(data),filename+".csv");
if(this.isPiwikEnabled && (typeof document !== 'undefined')){
this.downloadFilePiwikSub = this._piwikService.trackDownload(url).subscribe();
this.downloadFilePiwikSub = this._piwikService.trackDownload(this.properties, url).subscribe();
}
},
error => {

View File

@ -12,7 +12,7 @@ import {ModalLoading} from '../../utils/modal/loading.component';
import { Meta} from '../../sharedComponents/metaService';
import{SearchFilterComponent} from './searchFilter.component';
import {SearchFilterModalComponent} from './searchFilterModal.component';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {PiwikService} from '../../utils/piwik/piwik.service';
import{EnvProperties} from '../../utils/properties/env-properties';
@ -81,7 +81,7 @@ export class SearchPageComponent {
this.updateUrl(data.envSpecific.baseLink+location.pathname);
}
if(typeof document !== 'undefined' && this.isPiwikEnabled){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle).subscribe();
}
});
if (typeof document !== 'undefined') {
@ -483,7 +483,7 @@ export class SearchPageComponent {
localStorage.setItem('previousRoute', this.router.url);
}
if(this.isPiwikEnabled && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle).subscribe();
}
/* End Piwik Code */
this.queryChange.emit({

View File

@ -13,7 +13,7 @@ import {ModalLoading} from '../../utils/modal/loading.component';
import { Meta} from '../../sharedComponents/metaService';
import{SearchFilterComponent} from './searchFilter.component';
import {SearchFilterModalComponent} from './searchFilterModal.component';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {PiwikService} from '../../utils/piwik/piwik.service';
import { DataTableDirective } from 'angular-datatables';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
@ -79,7 +79,7 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
this.updateUrl(data.envSpecific.baseLink+location.pathname);
}
if(typeof document !== 'undefined' && this.isPiwikEnabled){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
this.piwiksub = this._piwikService.trackView(data.envSpecific, this.pageTitle).subscribe();
}
});
this.dtOptions = {
@ -90,7 +90,7 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
};
this.updateTitle(this.pageTitle);
this.updateDescription("Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle);
}
ngOnDestroy() {
if(this.piwiksub){

View File

@ -1,6 +1,6 @@
import {Component, Input, Output, EventEmitter} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
@Component({
selector: 'search-paging',

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class';
import{EnvProperties} from '../../utils/properties/env-properties';
@Component({

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class';
@Component({

View File

@ -4,7 +4,7 @@ import {Location} from '@angular/common';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchResult} from '../../utils/entities/searchResult';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -5,7 +5,7 @@ import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchDatasetsService} from '../../services/searchDatasets.service';
import {SearchResult} from '../../utils/entities/searchResult';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -4,7 +4,7 @@ import {Location} from '@angular/common';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -4,7 +4,7 @@ import {Location} from '@angular/common';
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchProjectsService} from '../../services/searchProjects.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -6,7 +6,7 @@ import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchPublicationsService} from '../../services/searchPublications.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass} from '../searchUtils/searchUtils.class';

View File

@ -5,7 +5,7 @@ import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
import {SearchSoftwareService} from '../../services/searchSoftware.service';
import {SearchResult} from '../../utils/entities/searchResult';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchPageComponent } from '../searchUtils/searchPage.component';
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';

View File

@ -1,5 +1,5 @@
import {Component, Input} from '@angular/core';
import {ErrorCodes} from './properties/openaireProperties';
import {ErrorCodes} from './properties/errorCodes';
@Component({
selector: 'errorMessages',

View File

@ -1,5 +1,5 @@
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -1,5 +1,5 @@
import {SearchDatasetsService} from '../../services/searchDatasets.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import {DOI} from '../../utils/string-utils.class';
import {Subject} from 'rxjs/Subject';

View File

@ -1,5 +1,5 @@
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -1,5 +1,5 @@
import {SearchProjectsService} from '../../services/searchProjects.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import{EnvProperties} from '../../utils/properties/env-properties';

View File

@ -1,6 +1,6 @@
import {SearchPublicationsService} from '../../services/searchPublications.service';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import {DOI} from '../../utils/string-utils.class';

View File

@ -1,5 +1,5 @@
import {SearchSoftwareService} from '../../services/searchSoftware.service';
import { ErrorCodes} from '../../utils/properties/openaireProperties';
import { ErrorCodes} from '../../utils/properties/errorCodes';
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
import {DOI} from '../../utils/string-utils.class';
import {Subject} from 'rxjs/Subject';

View File

@ -6,8 +6,6 @@ import 'rxjs/add/operator/do';
import 'rxjs/add/operator/share';
import{EnvProperties} from '../properties/env-properties';
import { OpenaireProperties } from '../../utils/properties/openaireProperties';
@Injectable()
export class HelperService {
constructor(private http: Http) {}

View File

@ -3,7 +3,6 @@ import {Router} from '@angular/router';
import {DomSanitizer} from '@angular/platform-browser';
//Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging>
import {RouterHelper} from './routerHelper.class';
import {OpenaireProperties} from './properties/openaireProperties';
@Component({
selector: 'paging',
@ -55,7 +54,7 @@ export class PagingFormatter {
}
getTotalPages(){
let total: number = 0;
let limit: number = OpenaireProperties.getPagingLimit();
let limit: number = 20;//OpenaireProperties.getPagingLimit();
var i:number =parseInt(''+(this.totalResults/this.size));
total = (((this.totalResults/this.size) == i )? i :(i+1)) ;

View File

@ -6,8 +6,8 @@ import 'rxjs/add/operator/do';
import 'rxjs/add/operator/share';
import {Location} from '@angular/common';
import {OpenaireProperties} from '../properties/openaireProperties';
import {StringUtils} from '../string-utils.class';
import {EnvProperties} from '../properties/env-properties';
@Injectable()
@ -15,12 +15,12 @@ export class PiwikService {
private piwikbaseUrl:string = "";
constructor(private http: Http, private location: Location ) {}
trackView (title):any {
trackView (properties:EnvProperties, title):any {
var ua = this.getUserAgent();
var referrer = this.getReferrer();
if(typeof location !== 'undefined'){
var url = OpenaireProperties.getPiwikBaseURL()+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+
var url = properties.piwikBaseUrl+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
console.log("Piwik - View: " + url);
@ -30,10 +30,10 @@ export class PiwikService {
}
}
trackDownload (downloadURL):any {
trackDownload (properties:EnvProperties, downloadURL):any {
var ua = this.getUserAgent();
var referrer = this.getReferrer();
var url = OpenaireProperties.getPiwikBaseURL()+"&rec=1&url="+StringUtils.URIEncode(downloadURL)+"&download="+StringUtils.URIEncode(downloadURL)+
var url = properties.piwikBaseUrl+"&rec=1&url="+StringUtils.URIEncode(downloadURL)+"&download="+StringUtils.URIEncode(downloadURL)+
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
console.log("Piwik - trackDownload: "+url);

View File

@ -1,4 +1,5 @@
import { Injectable, OnInit } from '@angular/core';
import { Injectable, OnInit, PLATFORM_ID, Inject } from '@angular/core';
import { isPlatformBrowser} from '@angular/common';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable, Subscription, BehaviorSubject } from 'rxjs/Rx';
import 'rxjs/add/operator/map';
@ -12,10 +13,34 @@ export class EnvironmentSpecificService {
public envSpecific: EnvProperties;
public envSpecificNull: EnvProperties = null;
testBrowser: boolean;
private envSpecificSubject: BehaviorSubject<EnvProperties> = new BehaviorSubject<EnvProperties>(null);
private propertiesUrl = (process.env.PROP_URL)?process.env.PROP_URL:"./assets/env-properties.json";
constructor(private http: Http,@Inject(PLATFORM_ID) platformId: string) {
this.testBrowser = isPlatformBrowser(platformId);
if (this.testBrowser) {
//this is only executed on the browser
}
console.log('EnvironmentSpecificService created ' +this.testBrowser);
/*
constructor(private http: Http) {
console.log('EnvironmentSpecificService created');
down vote
import { PLATFORM_ID, Inject } from '@angular/core';
import { isPlatformBrowser} from '@angular/common';
...
export class MyComponent {
...
testBrowser: boolean;
constructor(
@Inject(PLATFORM_ID) platformId: string) {
this.testBrowser = isPlatformBrowser(platformId);
if (this.testBrowser) {
//this is only executed on the browser
}
}
*/
}
public loadEnvironment() {
@ -23,7 +48,7 @@ export class EnvironmentSpecificService {
if (this.envSpecific === null || this.envSpecific === undefined) {
console.log('Loading env-properties.json');
return this.http.get('./assets/env-properties.json')
return this.http.get(this.propertiesUrl)
.map((data) => data.json())
.toPromise<EnvProperties>();
}

View File

@ -0,0 +1,9 @@
export class ErrorCodes {
public LOADING = 0;
public DONE = 1;
public NONE = 2;
public ERROR = 3;
public NOT_AVAILABLE = 4;
public OUT_OF_BOUND = 5;
public NOT_FOUND = 6;
}

View File

@ -1,456 +0,0 @@
export class OpenaireProperties {
private static productionMode:boolean = false;
private static enablePiwikTrack:boolean = false;
private static enableHelper:boolean = false;
private static useCache:boolean = true;
private static csvLimit: number = 2000;
private static pagingLimit: number = 20;
private static resultsPerPage: number = 10;
//base url
private static baseLink = "https://demo.openaire.eu";
//landing Pages
private static baseSearchLink="/";
private static searchLinkToPublication = "search/publication?articleId=";
private static searchLinkToProject = "search/project?projectId=";
private static searchLinkToDataProvider = "search/dataprovider?datasourceId=";
private static searchLinkToDataset = "search/dataset?datasetId=";
private static searchLinkToOrganization = "search/organization?organizationId=";
//Search pages
private static searchLinkToPublications = "search/find/publications";
private static searchLinkToDataProviders = "search/find/dataproviders";
private static searchLinkToProjects = "search/find/projects";
private static searchLinkToDatasets = "search/find/datasets";
private static searchLinkToSoftware = "search/find/software";
private static searchLinkToOrganizations = "search/find/organizations";
private static searchLinkToPeople = "search/find/people";
public static searchLinkToCompatibleDataProviders = "search/content-providers";
public static searchLinkToCompatibleDataProvidersTable = "search/content-providers-table";
public static searchLinkToEntityRegistriesDataProviders = "search/entity-registries";
public static searchLinkToEntityRegistriesDataProvidersTable = "search/entity-registries-table";
public static searchLinkToJournals = "search/journals";
public static searchLinkToJournalsTable = "search/journals-table";
//Advanced Search for pages
public static searchLinkToAdvancedPublications = "search/advanced/publications";
public static searchLinkToAdvancedProjects = "search/advanced/projects";
public static searchLinkToAdvancedDatasets = "search/advanced/datasets";
public static searchLinkToAdvancedSoftware = "search/advanced/software";
public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders";
public static searchLinkToAdvancedOrganizations = "search/advanced/organizations";
public static searchLinkToAdvancedPeople = "search/advanced/people";
private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/";
private static framesAPIURL = "https://beta.openaire.eu/stats3/";
private static loginAPIURL = "http://rudie.di.uoa.gr:8080/dnet%2Dopenaire%2Dusers%2D1.0.0%2DSNAPSHOT/api/users/authenticates"
//"http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates";
private static loginAPIURL_pm = "https://beta.services.openaire.eu/uoa-user-management/api/users/authenticates";
private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/";
private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/";
private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/";
private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/v2/api/";
// private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
private static searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources";
private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/v2/api/resources";
// private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources";
private static csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
// private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
//private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports";
private static searchCrossrefAPIURL = "https://api.crossref.org/works";
// private static searchDataciteAPIURL = "https://search.datacite.org/api";
private static searchDataciteAPIURL = "https://api.datacite.org/works";
private static searchOrcidURL = "https://pub.orcid.org/";
// Identifiers
private static pmidURL = "http://www.ncbi.nlm.nih.gov/pubmed/";
private static doiURL = "https://dx.doi.org/";
private static cordisURL = "http://cordis.europa.eu/projects/";
private static pmcURL = "http://europepmc.org/articles/";
private static handleURL = "http://hdl.handle.net/";
// Zenodo's url
private static zenodo = "https://zenodo.org/";
// Open access link
private static openAccess = "https://www.openaire.eu/support/faq#article-id-234";
// Open access repository link
private static openAccessRepo = "https://www.openaire.eu/support/faq#article-id-310";
// FP7 link
private static fp7Guidlines = "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme";
// H2020 link
private static h2020Guidlines = "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020";
// ERC Guidlines
private static ercGuidlines = "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf";
// helpdesk link
private static helpdesk = "https://www.openaire.eu/support/helpdesk";
private static uploadService_pm = "https://demo.openaire.eu/upload";
private static uploadService = "http://scoobydoo.di.uoa.gr:8000/upload";
private static vocabulariesAPI ="https://beta.services.openaire.eu/provision/mvc/vocabularies/";
private static piwikBaseUrl =" https://analytics.openaire.eu/piwik.php?idsite=6";
private static loginUrl ="http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
//"http://rudie.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
//
private static loginUrl_pm ="https://beta.services.openaire.eu/uoa-user-management/openid_connect_login";
private static logoutUrl ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
private static logoutUrl_pm ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
private static logoutOpenaireUrl ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
private static logoutOpenaireUrl_pm ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
private static cookieDomain =".di.uoa.gr";
private static cookieDomain_pm =".openaire.eu";
private static feedbackmail ="openaire.test@gmail.com";
private static helperPageUrl ="http://scoobydoo.di.uoa.gr:16000/api/page/route";
private static cache ="http://scoobydoo.di.uoa.gr:3000/get?url=";
private static cache_pm ="https://demo.openaire.eu/cache/get?url=";
private static adminToolsAPIURL ="http://duffy.di.uoa.gr:8080/uoa-admin-tools";
private static adminToolsAPIURL_pm ="http://duffy.di.uoa.gr:8080/uoa-admin-tools";
private static adminToolsCommunity ="5a393cf8c97a7d74b0b8a181";
private static adminToolsCommunity_pm ="5a393cf8c97a7d74b0b8a181";
public static getCsvLimit():number {
return this.csvLimit;
}
public static getPagingLimit():number {
return this.pagingLimit;
}
public static getResultsPerPage():number {
return this.resultsPerPage;
}
public static getBaseLink():string{
return this.baseLink;
}
//landing Pages' getters
public static getsearchLinkToPublication():string{
return this.baseSearchLink + this.searchLinkToPublication;
}
public static getsearchLinkToDataset():string{
return this.baseSearchLink + this.searchLinkToDataset;
}
public static getsearchLinkToProject():string{
return this.baseSearchLink + this.searchLinkToProject;
}
public static getsearchLinkToOrganization():string{
return this.searchLinkToOrganization;
}
public static getsearchLinkToDataProvider():string{
return this.searchLinkToDataProvider;
}
//searchPages
public static getLinkToSearchPublications():string{
return this.baseSearchLink + this.searchLinkToPublications;
}
public static getLinkToSearchProjects():string{
return this.baseSearchLink + this.searchLinkToProjects;
}
public static getLinkToSearchDataProviders():string{
return this.baseSearchLink + this.searchLinkToDataProviders;
}
public static getLinkToSearchCompatibleDataProviders():string{
return this.baseSearchLink + this.searchLinkToCompatibleDataProviders;
}
public static getLinkToSearchCompatibleDataProvidersTable():string{
return this.baseSearchLink + this.searchLinkToCompatibleDataProvidersTable;
}
public static getLinkToSearchEntityRegistries():string{
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProviders;
}
public static getLinkToSearchEntityRegistriesTable():string{
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProvidersTable;
}
public static getLinkToSearchJournals():string{
return this.baseSearchLink + this.searchLinkToJournals;
}
public static getLinkToSearchJournalsTable():string{
return this.baseSearchLink + this.searchLinkToJournalsTable;
}
public static getLinkToSearchDatasets():string{
return this.baseSearchLink + this.searchLinkToDatasets;
}
public static getLinkToSearchSoftware():string{
return this.baseSearchLink + this.searchLinkToSoftware;
}
public static getLinkToSearchOrganizations():string{
return this.baseSearchLink + this.searchLinkToOrganizations;
}
public static getLinkToSearchPeople():string{
return this.baseSearchLink + this.searchLinkToPeople;
}
//Advanced searchPages
public static getLinkToAdvancedSearchPublications():string{
return this.baseSearchLink + this.searchLinkToAdvancedPublications;
}
public static getLinkToAdvancedSearchProjects():string{
return this.baseSearchLink + this.searchLinkToAdvancedProjects;
}
public static getLinkToAdvancedSearchDataProviders():string{
return this.baseSearchLink + this.searchLinkToAdvancedDataProviders;
}
public static getLinkToAdvancedSearchDatasets():string{
return this.baseSearchLink + this.searchLinkToAdvancedDatasets;
}
public static getLinkToAdvancedSearchSoftware():string{
return this.baseSearchLink + this.searchLinkToAdvancedSoftware;
}
public static getLinkToAdvancedSearchOrganizations():string{
return this.baseSearchLink + this.searchLinkToAdvancedOrganizations;
}
public static getLinkToAdvancedSearchPeople():string{
return this.baseSearchLink + this.searchLinkToAdvancedPeople;
}
// Services - APIs' getters
// public static getSearchAPIURL():string{
// return this.searchAPIURL;
// }
// Services - APIs' getters
public static getCsvAPIURL(): string {
if(this.productionMode){
return this.csvAPIURL_pm;
}else{
return this.csvAPIURL;
}
// return this.csvAPIURL;
}
public static getFramesAPIURL(): string {
return this.framesAPIURL;
}
public static getMetricsAPIURL(): string {
return this.metricsAPIURL;
}
public static getLoginAPIURL(): string {
if(this.productionMode){
return this.loginAPIURL_pm;
}else{
return this.loginAPIURL;
}
// return this.loginAPIURL;
}
public static getSearchAPIURLLast():string{
if(this.productionMode){
return this.searchAPIURLLAst_pm;
}else{
return this.searchAPIURLLAst;
}
// return this.searchAPIURLLAst;
}
//query using full query:
//
public static getSearchResourcesAPIURL():string{
if(this.productionMode){
return this.searchResourcesAPIURL_pm;
}else{
return this.searchResourcesAPIURL;
}
// return this.searchResourcesAPIURL;
}
public static getSearchAPIURLForEntity(entityType:string):string{
var suffix = "";
if(entityType == "project"){
suffix="projects/";
}else if(entityType == "publication"){
suffix="publications/";
}else if(entityType == "dataset"){
suffix="datasets/";
} else if(entityType == "software"){
suffix="software/";
}else if(entityType == "organization"){
suffix="organizations/";
}else if(entityType == "dataprovider"){
suffix="datasources/";
}else if(entityType == "person"){
suffix="people/";
}
return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix;
}
public static getClaimsAPIURL():string{
if(this.productionMode){
return this.claimsAPIURL_pm;
}else{
return this.claimsAPIURL;
}
}
public static getSearchCrossrefAPIURL():string{
return this.searchCrossrefAPIURL;
}
public static getSearchDataciteAPIURL():string{
return this.searchDataciteAPIURL;
}
public static getSearchOrcidURL():string{
return this.searchOrcidURL;
}
// Identifiers' getters
public static getPmidURL():string{
return this.pmidURL;
}
public static getDoiURL():string{
return this.doiURL;
}
public static getCordisURL():string{
return this.cordisURL;
}
public static getPmcURL():string{
return this.pmcURL;
}
public static getHandleURL():string{
return this.handleURL;
}
// Zenodo's getter
public static getZenodoURL():string{
return this.zenodo;
}
// Open access getter
public static getOpenAccess():string{
return this.openAccess;
}
// Open access repository getter
public static getOpenAccessRepo():string{
return this.openAccessRepo;
}
// FP7 link getter
public static getFP7Guidlines():string{
return this.fp7Guidlines;
}
// H2020 link getter
public static getH2020Guidlines():string{
return this.h2020Guidlines;
}
// ERC Guidlines getter
public static getERCGuidlines():string{
return this.ercGuidlines;
}
// helpdesk link getter
public static getHelpdesk():string{
return this.helpdesk;
}
//upload service for bulk claim - upload csv file
public static getUploadServiceUrl():string{
if(this.productionMode){
return this.uploadService_pm;
}else{
return this.uploadService;
}
}
//vocabularies API
public static getVocabulariesAPI():string{
return this.vocabulariesAPI;
}
public static getPiwikBaseURL():string{
return this.piwikBaseUrl;
}
public static isPiwikTrackEnabled():boolean{
return this.enablePiwikTrack;
}
public static getLoginURL():string{
if(this.productionMode){
return this.loginUrl_pm;
}else{
return this.loginUrl;
}
}
public static getLogoutURL():string{
if(this.productionMode){
return this.logoutUrl_pm;
}else{
return this.logoutUrl;
}
}
public static getLogoutOpenaireURL():string{
if(this.productionMode){
return this.logoutOpenaireUrl_pm;
}else{
return this.logoutOpenaireUrl;
}
}
public static getCookieDomain():string{
if(this.productionMode){
return this.cookieDomain_pm;
}else{
return this.cookieDomain;
}
}
public static getFeedbackMail():string{
return this.feedbackmail;
}
public static getHelperPageUrl():string{
return this.helperPageUrl;
}
public static isHelperEnabled():boolean{
return this.enableHelper;
}
public static getCacheUrl():string{
if(this.productionMode){
return this.cache_pm;
}else{
return this.cache;
}
}
public static getAdminToolsAPIUrl():string{
if(this.productionMode){
return this.adminToolsAPIURL_pm;
}else{
return this.adminToolsAPIURL;
}
}
public static getAdminToolsCommunity():string{
if(this.productionMode){
return this.adminToolsCommunity_pm;
}else{
return this.adminToolsCommunity;
}
}
public static isCacheEnabled():boolean{
return this.useCache;
}
}
export class ErrorCodes {
public LOADING = 0;
public DONE = 1;
public NONE = 2;
public ERROR = 3;
public NOT_AVAILABLE = 4;
public OUT_OF_BOUND = 5;
public NOT_FOUND = 6;
}

View File

@ -1,164 +0,0 @@
export class SearchFields {
//main Entities
//RESULTS
//Used for datasets and publications
//In case Datasets should display different fields, use seperate tables for fields
public RESULT_REFINE_FIELDS = ["instancetypename", "resultlanguagename", "community","relproject", "relfunder",
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicense"];//,"collectedfrom"];
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","relperson","resultpublisher","instancetypenameid",
"resultlanguageid", "community","relprojectid", "relfunder",
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicenseid","pid","resulthostingdatasourceid","collectedfromdatasourceid","relpersonid"];
public RESULT_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["resulttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
["relperson"]:{name:"Author", type:"keyword", param:"author", equalityOperator: "="},
["resultpublisher"]:{name:"Publisher", type:"keyword", param:"publisher", equalityOperator: "="},
["pid"]:{name:"PID", type:"keyword", param:"pid", equalityOperator: " = "},
["resulthostingdatasourceid"]:{name:"Hosting Data Provider", type:"entity", param:"hostedBy", equalityOperator: " exact "},
["relpersonid"]:{name:"Person", type:"entity", param:"person", equalityOperator: " exact "},
["instancetypename"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["instancetypenameid"]:{name:"Type", type:"vocabulary", param:"type", equalityOperator: " exact "},
["resultlanguagename"]:{name:"Language", type:"refine", param:"lang", equalityOperator: " exact "},
["resultlanguageid"]:{name:"Language", type:"vocabulary", param:"lang", equalityOperator: " exact "},
["community"]:{name:"Community", type:"refine", param:"community", equalityOperator: " exact "},
["relproject"]:{name:"Project", type:"refine", param:"project", equalityOperator: " exact "},
["relprojectid"]:{name:"Project", type:"entity", param:"project", equalityOperator: " exact "},
["relfunder"]:{name:"Funder", type:"refine", param:"funder", equalityOperator: " exact "},
["relfundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", equalityOperator: " exact "},
["relfundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", equalityOperator: " exact "},
["relfundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
["resultacceptanceyear"]:{name:"Year", type:"year", param:"year", equalityOperator: " exact "},
["resultbestlicense"]:{name:"Access Mode", type:"refine", param:"access", equalityOperator: " exact "},
["resultbestlicenseid"]:{name:"Access Mode", type:"vocabulary", param:"access", equalityOperator: " exact "},
["collectedfrom"]:{name:"Content Provider", type:"refine", param:"datasource", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
//PROJECT
public PROJECT_REFINE_FIELDS:string[] = ["funder","fundinglevel0_id","fundinglevel1_id",
"fundinglevel2_id","projectstartyear","projectendyear","projectecsc39"];
public PROJECT_ADVANCED_FIELDS:string[] = ["q","projectacronym","projecttitle","projectkeywords",
"funder", "fundinglevel0_id","fundinglevel1_id", "fundinglevel2_id",
"projectstartyear","projectendyear","projectecsc39",
"projectcode","relorganizationid", "collectedfromdatasourceid"];
public PROJECT_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["projectacronym"]:{name:"Acronym", type:"keyword", param:"acronym", equalityOperator: "="},
["projecttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
["projectkeywords"]:{name:"Keywords", type:"keyword", param:"keywords", equalityOperator: "="},
["funder"]:{name:"Funder", type:"refine", param:"funder", equalityOperator: " exact "},
["fundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", equalityOperator: " exact "},
["fundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", equalityOperator: " exact "},
["fundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
["projectstartyear"]:{name:"Start Year", type:"year", param:"startyear", equalityOperator: " exact "},
["projectendyear"]:{name:"End Year", type:"year", param:"endyear", equalityOperator: " exact "},
["projectecsc39"]:{name:"Special Clause 39", type:"boolean", param:"sc39", equalityOperator: " exact "},
["projectcode"]:{name:"Project Code", type:"keyword", param:"code", equalityOperator: " exact "},
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
//DATAPROVIDERS
public DATASOURCE_REFINE_FIELDS:string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname"];
public DATASOURCE_ADVANCED_FIELDS:string[] = ["q", "datasourceofficialname",
"datasourceenglishname","datasourceodsubjects", "datasourcetypeid","datasourceodlanguages",
"datasourceodcontenttypes", "datasourcecompatibilityid","relorganizationid", "collectedfromdatasourceid"];
public DATASOURCE_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["datasourceofficialname"]:{name:"English name", type:"keyword", param:"officialname", equalityOperator: "="},
["datasourceenglishname"]:{name:"Title", type:"keyword", param:"engname", equalityOperator: "="},
["datasourceodsubjects"]:{name:"Subject", type:"keyword", param:"subjects", equalityOperator: "="},
["datasourcetypeuiid"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["datasourcetypeuiname"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["datasourcetypeid"]:{name:"Type", type:"vocabulary", param:"type", equalityOperator: " exact "},
["datasourceodlanguages"]:{name:"Language", type:"vocabulary", param:"lang", equalityOperator: " exact "},
["datasourceodcontenttypes"]:{name:"Content", type:"refine", param:"content", equalityOperator: " exact "},
["datasourcecompatibilityid"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", equalityOperator: " exact "},
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"refine", param:"compatibility", equalityOperator: " exact "},
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiid","datasourcecompatibilityid"];
public ENTITY_REGISTRIES_FIELDS:string[] = ["datasourcetypeid","datasourcecompatibilityid"];
//ORGANIZATION
public ORGANIZATION_REFINE_FIELDS:string[] = ["organizationcountryname"]
public ORGANIZATION_ADVANCED_FIELDS:string[] = ["q",
"organizationlegalname","organizationlegalshortname","organizationcountryid"];
public ORGANIZATION_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["organizationlegalname"]:{name:"Legal Name", type:"keyword", param:"name", equalityOperator: "="},
["organizationlegalshortname"]:{name:"Legal Short Name", type:"keyword", param:"shortname", equalityOperator: "="},
["organizationcountryid"]:{name:"Country", type:"vocabulary", param:"country", equalityOperator: "="},
["organizationcountryname"]:{name:"Country", type:"refine", param:"country", equalityOperator: "="}
};
public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
public ORGANIZATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["organizationlegalname"]:"contenttype", ["organizationlegalshortname"]:"type",
["organizationcountryname"]:"country"};//,["organizationeclegalbody"]:"type"};
public ORGANIZATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string , equalityOperator:string}} ={
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator: "="},
["contenttype"]:{name:"Legal Name",operator:"cn", type:"keyword" , indexField:"organizationlegalname", equalityOperator: "="},
["compatibility"]:{name:"Legal Short Name",operator:"cm", type:"keyword", indexField:"organizationlegalshortname", equalityOperator: "="},
["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryname", equalityOperator: " exact "},
["type"]:{name:"Type",operator:"tp", type:"refine", indexField:"organizationeclegalbody", equalityOperator: " exact "},
};
//PERSON
public PERSON_REFINE_FIELDS:string[] = [];
public PERSON_ADVANCED_FIELDS:string[] = ["q","personsecondnames","personfirstname","personfullname"];
public PERSON_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["personsecondnames"]:{name:"Surname", type:"keyword", param:"surname", equalityOperator: "="},
["personfirstname"]:{name:"First Name",type:"keyword", param:"name", equalityOperator: "="},
["personfullname"]:{name:"Full name", type:"keyword", param:"fullname", equalityOperator: "="}
};
public HIDDEN_FIELDS:string[] = ["fundinglevel0_id","fundinglevel1_id","fundinglevel2_id",
"relfundinglevel0_id","relfundinglevel1_id,relfundinglevel2_id"];
public DEPENDENT_FIELDS: { [key:string]:string } = {["fundinglevel0_id"]:"funder",
["fundinglevel1_id"]:"fundinglevel0_id", ["fundinglevel2_id"]:"fundinglevel1_id", ["relfundinglevel0_id"]:"relfunder",
["relfundinglevel1_id"]:"relfundinglevel0_id", ["relfundinglevel2_id"]:"relfundinglevel1_id"};
public ADVANCED_SEARCH_OPERATORS:[{name:string, id:string}] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}];
constructor (){
}
getFieldName(fieldId:string,fieldType:string):string{
if(fieldType == "publication" || fieldType == "dataset"){
return this.RESULT_FIELDS[fieldId].name;
}else if(fieldType == "project"){
return this.PROJECT_FIELDS[fieldId].name;
}else if(fieldType == "organization"){
return this.ORGANIZATION_FIELDS[fieldId].name;
}else if(fieldType == "datasource"){
return this.DATASOURCE_FIELDS[fieldId].name;
}else{
return "UNDEFINED";
}
}
}
export class FieldDetails{
name:string;
type:string;
param:string;
equalityOperator:string;
}

View File

@ -1,164 +0,0 @@
export class SearchFields {
//main Entities
//RESULTS
//Used for datasets and publications
//In case Datasets should display different fields, use seperate tables for fields
public RESULT_REFINE_FIELDS = ["instancetypename", "resultlanguagename", "community","relproject", "relfunderid",
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicense"];//,"collectedfrom"];
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","relperson","resultpublisher","instancetypenameid",
"resultlanguageid", "community","relprojectid", "relfunderid",
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicenseid","pid","resulthostingdatasourceid","collectedfromdatasourceid","relpersonid"];
public RESULT_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["resulttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
["relperson"]:{name:"Author", type:"keyword", param:"author", equalityOperator: "="},
["resultpublisher"]:{name:"Publisher", type:"keyword", param:"publisher", equalityOperator: "="},
["pid"]:{name:"PID", type:"keyword", param:"pid", equalityOperator: " = "},
["resulthostingdatasourceid"]:{name:"Hosting Data Provider", type:"entity", param:"hostedBy", equalityOperator: " exact "},
["relpersonid"]:{name:"Person", type:"entity", param:"person", equalityOperator: " exact "},
["instancetypename"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["instancetypenameid"]:{name:"Type", type:"vocabulary", param:"type", equalityOperator: " exact "},
["resultlanguagename"]:{name:"Language", type:"refine", param:"lang", equalityOperator: " exact "},
["resultlanguageid"]:{name:"Language", type:"vocabulary", param:"lang", equalityOperator: " exact "},
["community"]:{name:"Community", type:"refine", param:"community", equalityOperator: " exact "},
["relproject"]:{name:"Project", type:"refine", param:"project", equalityOperator: " exact "},
["relprojectid"]:{name:"Project", type:"entity", param:"project", equalityOperator: " exact "},
["relfunderid"]:{name:"Funder", type:"refine", param:"funder", equalityOperator: " exact "},
["relfundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", equalityOperator: " exact "},
["relfundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", equalityOperator: " exact "},
["relfundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
["resultacceptanceyear"]:{name:"Year", type:"year", param:"year", equalityOperator: " exact "},
["resultbestlicense"]:{name:"Access Mode", type:"refine", param:"access", equalityOperator: " exact "},
["resultbestlicenseid"]:{name:"Access Mode", type:"vocabulary", param:"access", equalityOperator: " exact "},
["collectedfrom"]:{name:"Content Provider", type:"refine", param:"datasource", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
//PROJECT
public PROJECT_REFINE_FIELDS:string[] = ["funderid","fundinglevel0_id","fundinglevel1_id",
"fundinglevel2_id","projectstartyear","projectendyear","projectecsc39"];
public PROJECT_ADVANCED_FIELDS:string[] = ["q","projectacronym","projecttitle","projectkeywords",
"funderid", "fundinglevel0_id","fundinglevel1_id", "fundinglevel2_id",
"projectstartyear","projectendyear","projectecsc39",
"projectcode","relorganizationid", "collectedfromdatasourceid"];
public PROJECT_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["projectacronym"]:{name:"Acronym", type:"keyword", param:"acronym", equalityOperator: "="},
["projecttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
["projectkeywords"]:{name:"Keywords", type:"keyword", param:"keywords", equalityOperator: "="},
["funderid"]:{name:"Funder", type:"refine", param:"funder", equalityOperator: " exact "},
["fundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", equalityOperator: " exact "},
["fundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", equalityOperator: " exact "},
["fundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
["projectstartyear"]:{name:"Start Year", type:"year", param:"startyear", equalityOperator: " exact "},
["projectendyear"]:{name:"End Year", type:"year", param:"endyear", equalityOperator: " exact "},
["projectecsc39"]:{name:"Special Clause 39", type:"boolean", param:"sc39", equalityOperator: " exact "},
["projectcode"]:{name:"Project Code", type:"keyword", param:"code", equalityOperator: " exact "},
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
//DATAPROVIDERS
public DATASOURCE_REFINE_FIELDS:string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname"];
public DATASOURCE_ADVANCED_FIELDS:string[] = ["q", "datasourceofficialname",
"datasourceenglishname","datasourceodsubjects", "datasourcetypeid","datasourceodlanguages",
"datasourceodcontenttypes", "datasourcecompatibilityid","relorganizationid", "collectedfromdatasourceid"];
public DATASOURCE_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["datasourceofficialname"]:{name:"English name", type:"keyword", param:"officialname", equalityOperator: "="},
["datasourceenglishname"]:{name:"Title", type:"keyword", param:"engname", equalityOperator: "="},
["datasourceodsubjects"]:{name:"Subject", type:"keyword", param:"subjects", equalityOperator: "="},
["datasourcetypeuiid"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["datasourcetypeuiname"]:{name:"Type", type:"refine", param:"type", equalityOperator: " exact "},
["datasourcetypeid"]:{name:"Type", type:"vocabulary", param:"type", equalityOperator: " exact "},
["datasourceodlanguages"]:{name:"Language", type:"vocabulary", param:"lang", equalityOperator: " exact "},
["datasourceodcontenttypes"]:{name:"Content", type:"refine", param:"content", equalityOperator: " exact "},
["datasourcecompatibilityid"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", equalityOperator: " exact "},
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"refine", param:"compatibility", equalityOperator: " exact "},
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
};
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiid","datasourcecompatibilityid"];
public ENTITY_REGISTRIES_FIELDS:string[] = ["datasourcetypeid","datasourcecompatibilityid"];
//ORGANIZATION
public ORGANIZATION_REFINE_FIELDS:string[] = ["organizationcountryname"]
public ORGANIZATION_ADVANCED_FIELDS:string[] = ["q",
"organizationlegalname","organizationlegalshortname","organizationcountryid"];
public ORGANIZATION_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["organizationlegalname"]:{name:"Legal Name", type:"keyword", param:"name", equalityOperator: "="},
["organizationlegalshortname"]:{name:"Legal Short Name", type:"keyword", param:"shortname", equalityOperator: "="},
["organizationcountryid"]:{name:"Country", type:"vocabulary", param:"country", equalityOperator: "="},
["organizationcountryname"]:{name:"Country", type:"refine", param:"country", equalityOperator: "="}
};
public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
public ORGANIZATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["organizationlegalname"]:"contenttype", ["organizationlegalshortname"]:"type",
["organizationcountryname"]:"country"};//,["organizationeclegalbody"]:"type"};
public ORGANIZATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string , equalityOperator:string}} ={
["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, equalityOperator: "="},
["contenttype"]:{name:"Legal Name",operator:"cn", type:"keyword" , indexField:"organizationlegalname", equalityOperator: "="},
["compatibility"]:{name:"Legal Short Name",operator:"cm", type:"keyword", indexField:"organizationlegalshortname", equalityOperator: "="},
["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryname", equalityOperator: " exact "},
["type"]:{name:"Type",operator:"tp", type:"refine", indexField:"organizationeclegalbody", equalityOperator: " exact "},
};
//PERSON
public PERSON_REFINE_FIELDS:string[] = [];
public PERSON_ADVANCED_FIELDS:string[] = ["q","personsecondnames","personfirstname","personfullname"];
public PERSON_FIELDS: { [key:string]:FieldDetails}={
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
["personsecondnames"]:{name:"Surname", type:"keyword", param:"surname", equalityOperator: "="},
["personfirstname"]:{name:"First Name",type:"keyword", param:"name", equalityOperator: "="},
["personfullname"]:{name:"Full name", type:"keyword", param:"fullname", equalityOperator: "="}
};
public HIDDEN_FIELDS:string[] = ["fundinglevel0_id","fundinglevel1_id","fundinglevel2_id",
"relfundinglevel0_id","relfundinglevel1_id,relfundinglevel2_id"];
public DEPENDENT_FIELDS: { [key:string]:string } = {["fundinglevel0_id"]:"funderid",
["fundinglevel1_id"]:"fundinglevel0_id", ["fundinglevel2_id"]:"fundinglevel1_id", ["relfundinglevel0_id"]:"relfunderid",
["relfundinglevel1_id"]:"relfundinglevel0_id", ["relfundinglevel2_id"]:"relfundinglevel1_id"};
public ADVANCED_SEARCH_OPERATORS:[{name:string, id:string}] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}];
constructor (){
}
getFieldName(fieldId:string,fieldType:string):string{
if(fieldType == "publication" || fieldType == "dataset"){
return this.RESULT_FIELDS[fieldId].name;
}else if(fieldType == "project"){
return this.PROJECT_FIELDS[fieldId].name;
}else if(fieldType == "organization"){
return this.ORGANIZATION_FIELDS[fieldId].name;
}else if(fieldType == "datasource"){
return this.DATASOURCE_FIELDS[fieldId].name;
}else{
return "UNDEFINED";
}
}
}
class FieldDetails{
name:string;
type:string;
param:string;
equalityOperator:string;
}