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