1
|
export class OpenaireProperties {
|
2
|
private static productionMode:boolean = false;
|
3
|
private static enablePiwikTrack:boolean = false;
|
4
|
private static enableHelper:boolean = false;
|
5
|
private static useCache:boolean = true;
|
6
|
|
7
|
private static csvLimit: number = 2000;
|
8
|
private static pagingLimit: number = 20;
|
9
|
private static resultsPerPage: number = 10;
|
10
|
|
11
|
//base url
|
12
|
private static baseLink = "https://demo.openaire.eu";
|
13
|
|
14
|
//landing Pages
|
15
|
private static baseSearchLink="/";
|
16
|
private static searchLinkToPublication = "search/publication?articleId=";
|
17
|
private static searchLinkToProject = "search/project?projectId=";
|
18
|
private static searchLinkToDataProvider = "search/dataprovider?datasourceId=";
|
19
|
private static searchLinkToDataset = "search/dataset?datasetId=";
|
20
|
private static searchLinkToOrganization = "search/organization?organizationId=";
|
21
|
//Search pages
|
22
|
private static searchLinkToPublications = "search/find/publications";
|
23
|
private static searchLinkToDataProviders = "search/find/dataproviders";
|
24
|
private static searchLinkToProjects = "search/find/projects";
|
25
|
private static searchLinkToDatasets = "search/find/datasets";
|
26
|
private static searchLinkToSoftware = "search/find/software";
|
27
|
private static searchLinkToOrganizations = "search/find/organizations";
|
28
|
private static searchLinkToPeople = "search/find/people";
|
29
|
public static searchLinkToCompatibleDataProviders = "search/content-providers";
|
30
|
public static searchLinkToCompatibleDataProvidersTable = "search/content-providers-table";
|
31
|
public static searchLinkToEntityRegistriesDataProviders = "search/entity-registries";
|
32
|
public static searchLinkToEntityRegistriesDataProvidersTable = "search/entity-registries-table";
|
33
|
public static searchLinkToJournals = "search/journals";
|
34
|
public static searchLinkToJournalsTable = "search/journals-table";
|
35
|
|
36
|
//Advanced Search for pages
|
37
|
public static searchLinkToAdvancedPublications = "search/advanced/publications";
|
38
|
public static searchLinkToAdvancedProjects = "search/advanced/projects";
|
39
|
public static searchLinkToAdvancedDatasets = "search/advanced/datasets";
|
40
|
public static searchLinkToAdvancedSoftware = "search/advanced/software";
|
41
|
public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders";
|
42
|
public static searchLinkToAdvancedOrganizations = "search/advanced/organizations";
|
43
|
public static searchLinkToAdvancedPeople = "search/advanced/people";
|
44
|
|
45
|
|
46
|
private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/";
|
47
|
private static framesAPIURL = "https://beta.openaire.eu/stats3/";
|
48
|
|
49
|
private static loginAPIURL = "http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates";
|
50
|
//"http://rudie.di.uoa.gr:8080/dnet%2Dopenaire%2Dusers%2D1.0.0%2DSNAPSHOT/api/users/authenticates"
|
51
|
//"http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates";
|
52
|
private static loginAPIURL_pm = "https://beta.services.openaire.eu/uoa-user-management/api/users/authenticates";
|
53
|
|
54
|
private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/";
|
55
|
private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/";
|
56
|
|
57
|
private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/";
|
58
|
private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/v2/api/";
|
59
|
// private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
|
60
|
|
61
|
private static searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources";
|
62
|
private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/v2/api/resources";
|
63
|
// private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources";
|
64
|
|
65
|
|
66
|
private static csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
|
67
|
// private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
|
68
|
|
69
|
//private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
|
70
|
private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports";
|
71
|
|
72
|
private static searchCrossrefAPIURL = "https://api.crossref.org/works";
|
73
|
// private static searchDataciteAPIURL = "https://search.datacite.org/api";
|
74
|
private static searchDataciteAPIURL = "https://api.datacite.org/works";
|
75
|
|
76
|
private static searchOrcidURL = "https://pub.orcid.org/";
|
77
|
|
78
|
// Identifiers
|
79
|
private static pmidURL = "http://www.ncbi.nlm.nih.gov/pubmed/";
|
80
|
private static doiURL = "https://dx.doi.org/";
|
81
|
private static cordisURL = "http://cordis.europa.eu/projects/";
|
82
|
private static pmcURL = "http://europepmc.org/articles/";
|
83
|
private static handleURL = "http://hdl.handle.net/";
|
84
|
|
85
|
// Zenodo's url
|
86
|
private static zenodo = "https://zenodo.org/";
|
87
|
// Open access link
|
88
|
private static openAccess = "https://www.openaire.eu/support/faq#article-id-234";
|
89
|
// Open access repository link
|
90
|
private static openAccessRepo = "https://www.openaire.eu/support/faq#article-id-310";
|
91
|
// FP7 link
|
92
|
private static fp7Guidlines = "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme";
|
93
|
// H2020 link
|
94
|
private static h2020Guidlines = "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020";
|
95
|
// ERC Guidlines
|
96
|
private static ercGuidlines = "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf";
|
97
|
// helpdesk link
|
98
|
private static helpdesk = "https://www.openaire.eu/support/helpdesk";
|
99
|
|
100
|
private static uploadService_pm = "https://demo.openaire.eu/upload";
|
101
|
private static uploadService = "http://scoobydoo.di.uoa.gr:8000/upload";
|
102
|
|
103
|
private static vocabulariesAPI ="https://beta.services.openaire.eu/provision/mvc/vocabularies/";
|
104
|
|
105
|
private static piwikBaseUrl =" https://analytics.openaire.eu/piwik.php?idsite=6";
|
106
|
|
107
|
|
108
|
private static loginUrl ="http://rudie.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
|
109
|
//"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
|
110
|
//"http://rudie.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
|
111
|
//
|
112
|
private static loginUrl_pm ="https://beta.services.openaire.eu/uoa-user-management/openid_connect_login";
|
113
|
|
114
|
private static logoutUrl ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
|
115
|
private static logoutUrl_pm ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
|
116
|
|
117
|
private static logoutOpenaireUrl ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
|
118
|
private static logoutOpenaireUrl_pm ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
|
119
|
|
120
|
|
121
|
|
122
|
private static cookieDomain =".di.uoa.gr";
|
123
|
private static cookieDomain_pm =".openaire.eu";
|
124
|
|
125
|
private static feedbackmail ="openaire.test@gmail.com";
|
126
|
|
127
|
private static helperPageUrl ="http://scoobydoo.di.uoa.gr:16000/api/page/route";
|
128
|
|
129
|
private static cache ="http://scoobydoo.di.uoa.gr:3000/get?url=";
|
130
|
private static cache_pm ="https://demo.openaire.eu/cache/get?url=";
|
131
|
|
132
|
|
133
|
|
134
|
public static getCsvLimit():number {
|
135
|
return this.csvLimit;
|
136
|
}
|
137
|
|
138
|
public static getPagingLimit():number {
|
139
|
return this.pagingLimit;
|
140
|
}
|
141
|
|
142
|
public static getResultsPerPage():number {
|
143
|
return this.resultsPerPage;
|
144
|
}
|
145
|
|
146
|
public static getBaseLink():string{
|
147
|
return this.baseLink;
|
148
|
}
|
149
|
|
150
|
//landing Pages' getters
|
151
|
public static getsearchLinkToPublication():string{
|
152
|
return this.baseSearchLink + this.searchLinkToPublication;
|
153
|
}
|
154
|
public static getsearchLinkToDataset():string{
|
155
|
return this.baseSearchLink + this.searchLinkToDataset;
|
156
|
}
|
157
|
public static getsearchLinkToProject():string{
|
158
|
return this.baseSearchLink + this.searchLinkToProject;
|
159
|
}
|
160
|
|
161
|
public static getsearchLinkToOrganization():string{
|
162
|
return this.searchLinkToOrganization;
|
163
|
}
|
164
|
public static getsearchLinkToDataProvider():string{
|
165
|
return this.searchLinkToDataProvider;
|
166
|
}
|
167
|
//searchPages
|
168
|
public static getLinkToSearchPublications():string{
|
169
|
return this.baseSearchLink + this.searchLinkToPublications;
|
170
|
}
|
171
|
public static getLinkToSearchProjects():string{
|
172
|
return this.baseSearchLink + this.searchLinkToProjects;
|
173
|
}
|
174
|
public static getLinkToSearchDataProviders():string{
|
175
|
return this.baseSearchLink + this.searchLinkToDataProviders;
|
176
|
}
|
177
|
public static getLinkToSearchCompatibleDataProviders():string{
|
178
|
return this.baseSearchLink + this.searchLinkToCompatibleDataProviders;
|
179
|
}
|
180
|
public static getLinkToSearchCompatibleDataProvidersTable():string{
|
181
|
return this.baseSearchLink + this.searchLinkToCompatibleDataProvidersTable;
|
182
|
}
|
183
|
public static getLinkToSearchEntityRegistries():string{
|
184
|
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProviders;
|
185
|
}
|
186
|
public static getLinkToSearchEntityRegistriesTable():string{
|
187
|
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProvidersTable;
|
188
|
}
|
189
|
public static getLinkToSearchJournals():string{
|
190
|
return this.baseSearchLink + this.searchLinkToJournals;
|
191
|
}
|
192
|
public static getLinkToSearchJournalsTable():string{
|
193
|
return this.baseSearchLink + this.searchLinkToJournalsTable;
|
194
|
}
|
195
|
public static getLinkToSearchDatasets():string{
|
196
|
return this.baseSearchLink + this.searchLinkToDatasets;
|
197
|
}
|
198
|
public static getLinkToSearchSoftware():string{
|
199
|
return this.baseSearchLink + this.searchLinkToSoftware;
|
200
|
}
|
201
|
public static getLinkToSearchOrganizations():string{
|
202
|
return this.baseSearchLink + this.searchLinkToOrganizations;
|
203
|
}
|
204
|
public static getLinkToSearchPeople():string{
|
205
|
return this.baseSearchLink + this.searchLinkToPeople;
|
206
|
}
|
207
|
|
208
|
//Advanced searchPages
|
209
|
public static getLinkToAdvancedSearchPublications():string{
|
210
|
return this.baseSearchLink + this.searchLinkToAdvancedPublications;
|
211
|
}
|
212
|
public static getLinkToAdvancedSearchProjects():string{
|
213
|
return this.baseSearchLink + this.searchLinkToAdvancedProjects;
|
214
|
}
|
215
|
public static getLinkToAdvancedSearchDataProviders():string{
|
216
|
return this.baseSearchLink + this.searchLinkToAdvancedDataProviders;
|
217
|
}
|
218
|
public static getLinkToAdvancedSearchDatasets():string{
|
219
|
return this.baseSearchLink + this.searchLinkToAdvancedDatasets;
|
220
|
}
|
221
|
public static getLinkToAdvancedSearchSoftware():string{
|
222
|
return this.baseSearchLink + this.searchLinkToAdvancedSoftware;
|
223
|
}
|
224
|
public static getLinkToAdvancedSearchOrganizations():string{
|
225
|
return this.baseSearchLink + this.searchLinkToAdvancedOrganizations;
|
226
|
}
|
227
|
public static getLinkToAdvancedSearchPeople():string{
|
228
|
return this.baseSearchLink + this.searchLinkToAdvancedPeople;
|
229
|
}
|
230
|
|
231
|
// Services - APIs' getters
|
232
|
// public static getSearchAPIURL():string{
|
233
|
// return this.searchAPIURL;
|
234
|
// }
|
235
|
// Services - APIs' getters
|
236
|
public static getCsvAPIURL(): string {
|
237
|
if(this.productionMode){
|
238
|
return this.csvAPIURL_pm;
|
239
|
}else{
|
240
|
return this.csvAPIURL;
|
241
|
}
|
242
|
// return this.csvAPIURL;
|
243
|
}
|
244
|
|
245
|
public static getFramesAPIURL(): string {
|
246
|
return this.framesAPIURL;
|
247
|
}
|
248
|
|
249
|
public static getMetricsAPIURL(): string {
|
250
|
return this.metricsAPIURL;
|
251
|
}
|
252
|
|
253
|
public static getLoginAPIURL(): string {
|
254
|
if(this.productionMode){
|
255
|
return this.loginAPIURL_pm;
|
256
|
}else{
|
257
|
return this.loginAPIURL;
|
258
|
}
|
259
|
// return this.loginAPIURL;
|
260
|
}
|
261
|
|
262
|
public static getSearchAPIURLLast():string{
|
263
|
if(this.productionMode){
|
264
|
return this.searchAPIURLLAst_pm;
|
265
|
}else{
|
266
|
return this.searchAPIURLLAst;
|
267
|
}
|
268
|
// return this.searchAPIURLLAst;
|
269
|
}
|
270
|
//query using full query:
|
271
|
//
|
272
|
public static getSearchResourcesAPIURL():string{
|
273
|
if(this.productionMode){
|
274
|
return this.searchResourcesAPIURL_pm;
|
275
|
}else{
|
276
|
return this.searchResourcesAPIURL;
|
277
|
}
|
278
|
// return this.searchResourcesAPIURL;
|
279
|
}
|
280
|
public static getSearchAPIURLForEntity(entityType:string):string{
|
281
|
var suffix = "";
|
282
|
if(entityType == "project"){
|
283
|
suffix="projects/";
|
284
|
}else if(entityType == "publication"){
|
285
|
suffix="publications/";
|
286
|
}else if(entityType == "dataset"){
|
287
|
suffix="datasets/";
|
288
|
} else if(entityType == "software"){
|
289
|
suffix="software/";
|
290
|
}else if(entityType == "organization"){
|
291
|
suffix="organizations/";
|
292
|
}else if(entityType == "dataprovider"){
|
293
|
suffix="datasources/";
|
294
|
}else if(entityType == "person"){
|
295
|
suffix="people/";
|
296
|
}
|
297
|
return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix;
|
298
|
}
|
299
|
|
300
|
public static getClaimsAPIURL():string{
|
301
|
if(this.productionMode){
|
302
|
return this.claimsAPIURL_pm;
|
303
|
}else{
|
304
|
return this.claimsAPIURL;
|
305
|
}
|
306
|
}
|
307
|
public static getSearchCrossrefAPIURL():string{
|
308
|
return this.searchCrossrefAPIURL;
|
309
|
}
|
310
|
public static getSearchDataciteAPIURL():string{
|
311
|
return this.searchDataciteAPIURL;
|
312
|
}
|
313
|
public static getSearchOrcidURL():string{
|
314
|
return this.searchOrcidURL;
|
315
|
}
|
316
|
|
317
|
// Identifiers' getters
|
318
|
public static getPmidURL():string{
|
319
|
return this.pmidURL;
|
320
|
}
|
321
|
public static getDoiURL():string{
|
322
|
return this.doiURL;
|
323
|
}
|
324
|
public static getCordisURL():string{
|
325
|
return this.cordisURL;
|
326
|
}
|
327
|
public static getPmcURL():string{
|
328
|
return this.pmcURL;
|
329
|
}
|
330
|
public static getHandleURL():string{
|
331
|
return this.handleURL;
|
332
|
}
|
333
|
|
334
|
// Zenodo's getter
|
335
|
public static getZenodoURL():string{
|
336
|
return this.zenodo;
|
337
|
}
|
338
|
// Open access getter
|
339
|
public static getOpenAccess():string{
|
340
|
return this.openAccess;
|
341
|
}
|
342
|
// Open access repository getter
|
343
|
public static getOpenAccessRepo():string{
|
344
|
return this.openAccessRepo;
|
345
|
}
|
346
|
// FP7 link getter
|
347
|
public static getFP7Guidlines():string{
|
348
|
return this.fp7Guidlines;
|
349
|
}
|
350
|
// H2020 link getter
|
351
|
public static getH2020Guidlines():string{
|
352
|
return this.h2020Guidlines;
|
353
|
}
|
354
|
// ERC Guidlines getter
|
355
|
public static getERCGuidlines():string{
|
356
|
return this.ercGuidlines;
|
357
|
}
|
358
|
// helpdesk link getter
|
359
|
public static getHelpdesk():string{
|
360
|
return this.helpdesk;
|
361
|
}
|
362
|
|
363
|
|
364
|
//upload service for bulk claim - upload csv file
|
365
|
public static getUploadServiceUrl():string{
|
366
|
if(this.productionMode){
|
367
|
return this.uploadService_pm;
|
368
|
}else{
|
369
|
return this.uploadService;
|
370
|
}
|
371
|
}
|
372
|
//vocabularies API
|
373
|
public static getVocabulariesAPI():string{
|
374
|
return this.vocabulariesAPI;
|
375
|
}
|
376
|
public static getPiwikBaseURL():string{
|
377
|
return this.piwikBaseUrl;
|
378
|
}
|
379
|
public static isPiwikTrackEnabled():boolean{
|
380
|
return this.enablePiwikTrack;
|
381
|
}
|
382
|
public static getLoginURL():string{
|
383
|
if(this.productionMode){
|
384
|
return this.loginUrl_pm;
|
385
|
}else{
|
386
|
return this.loginUrl;
|
387
|
}
|
388
|
}
|
389
|
public static getLogoutURL():string{
|
390
|
if(this.productionMode){
|
391
|
return this.logoutUrl_pm;
|
392
|
}else{
|
393
|
return this.logoutUrl;
|
394
|
}
|
395
|
}
|
396
|
public static getLogoutOpenaireURL():string{
|
397
|
if(this.productionMode){
|
398
|
return this.logoutOpenaireUrl_pm;
|
399
|
}else{
|
400
|
return this.logoutOpenaireUrl;
|
401
|
}
|
402
|
}
|
403
|
public static getCookieDomain():string{
|
404
|
if(this.productionMode){
|
405
|
return this.cookieDomain_pm;
|
406
|
}else{
|
407
|
return this.cookieDomain;
|
408
|
}
|
409
|
}
|
410
|
public static getFeedbackMail():string{
|
411
|
return this.feedbackmail;
|
412
|
}
|
413
|
public static getHelperPageUrl():string{
|
414
|
return this.helperPageUrl;
|
415
|
}
|
416
|
public static isHelperEnabled():boolean{
|
417
|
return this.enableHelper;
|
418
|
}
|
419
|
public static getCacheUrl():string{
|
420
|
if(this.productionMode){
|
421
|
return this.cache_pm;
|
422
|
}else{
|
423
|
return this.cache;
|
424
|
}
|
425
|
}
|
426
|
public static isCacheEnabled():boolean{
|
427
|
return this.useCache;
|
428
|
}
|
429
|
}
|
430
|
export class ErrorCodes {
|
431
|
public LOADING = 0;
|
432
|
public DONE = 1;
|
433
|
public NONE = 2;
|
434
|
public ERROR = 3;
|
435
|
public NOT_AVAILABLE = 4;
|
436
|
public OUT_OF_BOUND = 5;
|
437
|
public NOT_FOUND = 6;
|
438
|
}
|