1
|
export class SearchFields {
|
2
|
|
3
|
//main Entities
|
4
|
//RESULTS
|
5
|
//Used for datasets and publications and software and orp
|
6
|
//In case Datasets or Software should display different fields, use seperate tables for fields
|
7
|
// "resultacceptanceyear",
|
8
|
public RESULT_RANGE_FIELDS = [
|
9
|
["resultacceptanceyear", "resultacceptanceyear"]
|
10
|
];
|
11
|
|
12
|
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
13
|
public RESULT_REFINE_FIELDS = [
|
14
|
"resultbestaccessright", "relfunder",
|
15
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
16
|
"relproject",
|
17
|
"instancetypename", "resultlanguagename", "community", "resulthostingdatasource"];
|
18
|
|
19
|
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "resultpublisher",
|
20
|
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
21
|
"relfunder",
|
22
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
23
|
"resultlanguagename", "relorganizationid", "pid", "relprojectid", "instancetypename"];
|
24
|
public RESULT_FIELDS: { [key: string]: FieldDetails } = {
|
25
|
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
26
|
["resulttitle"]: {
|
27
|
name: "Title",
|
28
|
type: "keyword",
|
29
|
param: "title",
|
30
|
operator: "tt",
|
31
|
equalityOperator: "=",
|
32
|
filterType: null
|
33
|
},
|
34
|
["resultauthor"]: {
|
35
|
name: "Author",
|
36
|
type: "keyword",
|
37
|
param: "author",
|
38
|
operator: "at",
|
39
|
equalityOperator: "=",
|
40
|
filterType: null
|
41
|
},
|
42
|
["authorid"]: {
|
43
|
name: "Author ORCID",
|
44
|
type: "keyword",
|
45
|
param: "orcid",
|
46
|
operator: "oc",
|
47
|
equalityOperator: " exact ",
|
48
|
filterType: null
|
49
|
},
|
50
|
["resultsubject"]: {
|
51
|
name: "Subject",
|
52
|
type: "keyword",
|
53
|
param: "subject",
|
54
|
operator: "sb",
|
55
|
equalityOperator: "=",
|
56
|
filterType: null
|
57
|
},
|
58
|
["resultdescription"]: {
|
59
|
name: "Description",
|
60
|
type: "keyword",
|
61
|
param: "description",
|
62
|
operator: "ds",
|
63
|
equalityOperator: "=",
|
64
|
filterType: null
|
65
|
},
|
66
|
["resultpublisher"]: {
|
67
|
name: "Publisher",
|
68
|
type: "keyword",
|
69
|
param: "publisher",
|
70
|
operator: "pb",
|
71
|
equalityOperator: "=",
|
72
|
filterType: null
|
73
|
},
|
74
|
["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " = ", filterType: null},
|
75
|
["resulthostingdatasourceid"]: {
|
76
|
name: "Hosting Content Provider",
|
77
|
type: "entity",
|
78
|
param: "hostedBy",
|
79
|
operator: "hs",
|
80
|
equalityOperator: " exact ",
|
81
|
filterType: null
|
82
|
},
|
83
|
["resulthostingdatasource"]: {
|
84
|
name: "Content Provider",
|
85
|
type: "refine",
|
86
|
param: "hostedBy",
|
87
|
operator: "hs",
|
88
|
equalityOperator: " exact ",
|
89
|
filterType: "checkbox"
|
90
|
},
|
91
|
["instancetypename"]: {
|
92
|
name: "Type",
|
93
|
type: "vocabulary",
|
94
|
param: "type",
|
95
|
operator: "tp",
|
96
|
equalityOperator: " exact ",
|
97
|
filterType: "checkbox"
|
98
|
},
|
99
|
["resultlanguagename"]: {
|
100
|
name: "Language",
|
101
|
type: "vocabulary",
|
102
|
param: "lang",
|
103
|
operator: "ln",
|
104
|
equalityOperator: " exact ",
|
105
|
filterType: "checkbox"
|
106
|
},
|
107
|
["community"]: {
|
108
|
name: "Community",
|
109
|
type: "refine",
|
110
|
param: "community",
|
111
|
operator: "cm",
|
112
|
equalityOperator: " exact ",
|
113
|
filterType: "checkbox"
|
114
|
},
|
115
|
["relproject"]: {
|
116
|
name: "Project",
|
117
|
type: "refine",
|
118
|
param: "project",
|
119
|
operator: "po",
|
120
|
equalityOperator: " exact ",
|
121
|
filterType: "checkbox"
|
122
|
},
|
123
|
["relprojectid"]: {
|
124
|
name: "Project",
|
125
|
type: "entity",
|
126
|
param: "project",
|
127
|
operator: "po",
|
128
|
equalityOperator: " exact ",
|
129
|
filterType: null
|
130
|
},
|
131
|
["relfunder"]: {
|
132
|
name: "Funder",
|
133
|
type: "refine",
|
134
|
param: "funder",
|
135
|
operator: "fn",
|
136
|
equalityOperator: " exact ",
|
137
|
filterType: "checkbox"
|
138
|
},
|
139
|
["relfundinglevel0_id"]: {
|
140
|
name: "Funding Stream",
|
141
|
type: "refine",
|
142
|
param: "funderlv0",
|
143
|
operator: "fn0",
|
144
|
equalityOperator: " exact ",
|
145
|
filterType: "checkbox"
|
146
|
},
|
147
|
["relfundinglevel1_id"]: {
|
148
|
name: "Funding Substream level 1",
|
149
|
type: "refine",
|
150
|
param: "funderlv1",
|
151
|
operator: "fn1",
|
152
|
equalityOperator: " exact ",
|
153
|
filterType: "checkbox"
|
154
|
},
|
155
|
["relfundinglevel2_id"]: {
|
156
|
name: "Funding Substream level 2",
|
157
|
type: "refine",
|
158
|
param: "funderlv2",
|
159
|
operator: "fn0",
|
160
|
equalityOperator: " exact ",
|
161
|
filterType: "checkbox"
|
162
|
},
|
163
|
["resultacceptanceyear"]: {
|
164
|
name: "Publication Date",
|
165
|
type: "keyword",
|
166
|
param: "year",
|
167
|
operator: "ya",
|
168
|
equalityOperator: " = ",
|
169
|
filterType: null
|
170
|
},
|
171
|
["resultdateofacceptance"]: {
|
172
|
name: "Publication Date",
|
173
|
type: "date",
|
174
|
param: "date",
|
175
|
operator: "dt",
|
176
|
equalityOperator: " within ",
|
177
|
filterType: null
|
178
|
},
|
179
|
["resultacceptanceyear-range-resultacceptanceyear"]: {
|
180
|
name: "Year range",
|
181
|
type: "keyword",
|
182
|
param: "year",
|
183
|
operator: "ya",
|
184
|
equalityOperator: " within ",
|
185
|
filterType: "range"
|
186
|
},
|
187
|
["resultbestaccessright"]: {
|
188
|
name: "Access Mode",
|
189
|
type: "vocabulary",
|
190
|
param: "access",
|
191
|
operator: "ac",
|
192
|
equalityOperator: " exact ",
|
193
|
filterType: "radio"
|
194
|
},
|
195
|
["collectedfrom"]: {
|
196
|
name: "Collected From",
|
197
|
type: "refine",
|
198
|
param: "datasource",
|
199
|
operator: "cl",
|
200
|
equalityOperator: " exact ",
|
201
|
filterType: "checkbox"
|
202
|
},
|
203
|
["relorganizationid"]: {
|
204
|
name: "Organization",
|
205
|
type: "entity",
|
206
|
param: "organization",
|
207
|
operator: "og",
|
208
|
equalityOperator: " exact ",
|
209
|
filterType: null
|
210
|
},
|
211
|
["collectedfromdatasourceid"]: {
|
212
|
name: "Collected from Content Provider",
|
213
|
type: "entity",
|
214
|
param: "collectedFrom",
|
215
|
operator: "cl",
|
216
|
equalityOperator: " exact ",
|
217
|
filterType: null
|
218
|
},
|
219
|
["resulttypeid"]: {
|
220
|
name: "Result type",
|
221
|
type: "refine",
|
222
|
param: "types",
|
223
|
operator: "tp",
|
224
|
equalityOperator: " exact ",
|
225
|
filterType: "radio"
|
226
|
}
|
227
|
};
|
228
|
|
229
|
//PROJECT
|
230
|
public PROJECT_RANGE_FIELDS = [
|
231
|
["projectendyear", "projectstartyear"]
|
232
|
];
|
233
|
public PROJECT_REFINE_FIELDS: string[] = ["funder", "fundinglevel0_id", "fundinglevel1_id",
|
234
|
"fundinglevel2_id", "projectstartyear", "projectendyear", "projectecsc39"];
|
235
|
public PROJECT_ADVANCED_FIELDS: string[] = ["q", "projectacronym", "projecttitle", "projectkeywords",
|
236
|
"funder", "fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
237
|
"projectstartdate", "projectenddate", "projectecsc39",
|
238
|
"projectcode_nt", "relorganizationid", "collectedfromdatasourceid"];
|
239
|
public PROJECT_FIELDS: { [key: string]: FieldDetails } = {
|
240
|
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
241
|
["projectacronym"]: {
|
242
|
name: "Acronym",
|
243
|
type: "keyword",
|
244
|
param: "acronym",
|
245
|
operator: "ar",
|
246
|
equalityOperator: "=",
|
247
|
filterType: null
|
248
|
},
|
249
|
["projecttitle"]: {
|
250
|
name: "Title",
|
251
|
type: "keyword",
|
252
|
param: "title",
|
253
|
operator: "tt",
|
254
|
equalityOperator: "=",
|
255
|
filterType: null
|
256
|
},
|
257
|
["projectkeywords"]: {
|
258
|
name: "Keywords",
|
259
|
type: "keyword",
|
260
|
param: "keywords",
|
261
|
operator: "ky",
|
262
|
equalityOperator: "=",
|
263
|
filterType: null
|
264
|
},
|
265
|
|
266
|
["funder"]: {
|
267
|
name: "Funder",
|
268
|
type: "refine",
|
269
|
param: "funder",
|
270
|
operator: "fn",
|
271
|
equalityOperator: " exact ",
|
272
|
filterType: "checkbox"
|
273
|
},
|
274
|
["fundinglevel0_id"]: {
|
275
|
name: "Funding Stream",
|
276
|
type: "refine",
|
277
|
param: "funderlv0",
|
278
|
operator: "fn0",
|
279
|
equalityOperator: " exact ",
|
280
|
filterType: "checkbox"
|
281
|
},
|
282
|
["fundinglevel1_id"]: {
|
283
|
name: "Funding Substream level 1",
|
284
|
type: "refine",
|
285
|
param: "funderlv1",
|
286
|
operator: "fn1",
|
287
|
equalityOperator: " exact ",
|
288
|
filterType: "checkbox"
|
289
|
},
|
290
|
["fundinglevel2_id"]: {
|
291
|
name: "Funding Substream level 2",
|
292
|
type: "refine",
|
293
|
param: "funderlv2",
|
294
|
operator: "fn2",
|
295
|
equalityOperator: " exact ",
|
296
|
filterType: "checkbox"
|
297
|
},
|
298
|
["projectstartyear"]: {
|
299
|
name: "Start Year",
|
300
|
type: "year",
|
301
|
param: "startyear",
|
302
|
operator: "sy",
|
303
|
equalityOperator: " <= ",
|
304
|
filterType: "checkbox"
|
305
|
},
|
306
|
["projectendyear"]: {
|
307
|
name: "End Year",
|
308
|
type: "year",
|
309
|
param: "endyear",
|
310
|
operator: "ey",
|
311
|
equalityOperator: " >= ",
|
312
|
filterType: "checkbox"
|
313
|
},
|
314
|
["projectendyear-range-projectstartyear"]: {
|
315
|
name: "Active within",
|
316
|
type: "year",
|
317
|
param: "year",
|
318
|
operator: "ya",
|
319
|
equalityOperator: " = ",
|
320
|
filterType: "range"
|
321
|
},
|
322
|
["projectstartdate"]: {
|
323
|
name: "Start Date",
|
324
|
type: "date",
|
325
|
param: "startdate",
|
326
|
operator: "sd",
|
327
|
equalityOperator: " within ",
|
328
|
filterType: null
|
329
|
},
|
330
|
["projectenddate"]: {
|
331
|
name: "End Date",
|
332
|
type: "date",
|
333
|
param: "enddate",
|
334
|
operator: "ed",
|
335
|
equalityOperator: " within ",
|
336
|
filterType: null
|
337
|
},
|
338
|
["projectecsc39"]: {
|
339
|
name: "Special Clause 39",
|
340
|
type: "boolean",
|
341
|
param: "sc39",
|
342
|
operator: "sc",
|
343
|
equalityOperator: " exact ",
|
344
|
filterType: "radio"
|
345
|
},
|
346
|
["projectcode_nt"]: {
|
347
|
name: "Project Code",
|
348
|
type: "keyword",
|
349
|
param: "code",
|
350
|
operator: "cd",
|
351
|
equalityOperator: " exact ",
|
352
|
filterType: null
|
353
|
},
|
354
|
["relorganizationid"]: {
|
355
|
name: "Organization",
|
356
|
type: "entity",
|
357
|
param: "organization",
|
358
|
operator: "og",
|
359
|
equalityOperator: " exact ",
|
360
|
filterType: null
|
361
|
},
|
362
|
["collectedfromdatasourceid"]: {
|
363
|
name: "Collected from Content Provider",
|
364
|
type: "entity",
|
365
|
param: "collectedFrom",
|
366
|
operator: "cl",
|
367
|
equalityOperator: " exact ",
|
368
|
filterType: null
|
369
|
}
|
370
|
|
371
|
};
|
372
|
|
373
|
//DATAPROVIDERS
|
374
|
// add Collected From Filter "collectedfromname"
|
375
|
public DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
|
376
|
"datasourcecompatibilityname", "country", "collectedfromname"];
|
377
|
public DATASOURCE_ADVANCED_FIELDS: string[] = ["q", "datasourceofficialname",
|
378
|
"datasourceenglishname", "datasourceodsubjects", "datasourcetypename", "datasourceodlanguages",
|
379
|
"datasourceodcontenttypes", "datasourcecompatibilityname", "relorganizationid", "collectedfromdatasourceid"];
|
380
|
|
381
|
public DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
382
|
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
383
|
["datasourceofficialname"]: {
|
384
|
name: "English name",
|
385
|
type: "keyword",
|
386
|
param: "officialname",
|
387
|
operator: "of",
|
388
|
equalityOperator: "=",
|
389
|
filterType: null
|
390
|
},
|
391
|
["datasourceenglishname"]: {
|
392
|
name: "Title",
|
393
|
type: "keyword",
|
394
|
param: "engname",
|
395
|
operator: "eg",
|
396
|
equalityOperator: "=",
|
397
|
filterType: null
|
398
|
},
|
399
|
["datasourceodsubjects"]: {
|
400
|
name: "Subject",
|
401
|
type: "keyword",
|
402
|
param: "subjects",
|
403
|
operator: "sb",
|
404
|
equalityOperator: "=",
|
405
|
filterType: null
|
406
|
},
|
407
|
["datasourcetypeuiid"]: {
|
408
|
name: "Type",
|
409
|
type: "refine",
|
410
|
param: "type",
|
411
|
operator: "tp",
|
412
|
equalityOperator: " exact ",
|
413
|
filterType: null
|
414
|
},
|
415
|
["datasourcetypeuiname"]: {
|
416
|
name: "Type",
|
417
|
type: "refine",
|
418
|
param: "type",
|
419
|
operator: "tp",
|
420
|
equalityOperator: " exact ",
|
421
|
filterType: "checkbox"
|
422
|
},
|
423
|
["datasourcetypename"]: {
|
424
|
name: "Type",
|
425
|
type: "vocabulary",
|
426
|
param: "type",
|
427
|
operator: "tp",
|
428
|
equalityOperator: " exact ",
|
429
|
filterType: null
|
430
|
},
|
431
|
["datasourceodlanguages"]: {
|
432
|
name: "Language",
|
433
|
type: "vocabulary",
|
434
|
param: "lang",
|
435
|
operator: "ln",
|
436
|
equalityOperator: " exact ",
|
437
|
filterType: "checkbox"
|
438
|
},
|
439
|
["datasourceodcontenttypes"]: {
|
440
|
name: "Content",
|
441
|
type: "refine",
|
442
|
param: "content",
|
443
|
operator: "cn",
|
444
|
equalityOperator: " exact ",
|
445
|
filterType: "checkbox"
|
446
|
},
|
447
|
["datasourcecompatibilityid"]: {
|
448
|
name: "Compatibility Level",
|
449
|
type: "refine",
|
450
|
param: "compatibility",
|
451
|
operator: "cm",
|
452
|
equalityOperator: " exact ",
|
453
|
filterType: null
|
454
|
},
|
455
|
["datasourcecompatibilityname"]: {
|
456
|
name: "Compatibility Level",
|
457
|
type: "vocabulary",
|
458
|
param: "compatibility",
|
459
|
operator: "cm",
|
460
|
equalityOperator: " exact ",
|
461
|
filterType: "checkbox"
|
462
|
},
|
463
|
["relorganizationid"]: {
|
464
|
name: "Organization",
|
465
|
type: "entity",
|
466
|
param: "organization",
|
467
|
operator: "og",
|
468
|
equalityOperator: " exact ",
|
469
|
filterType: null
|
470
|
},
|
471
|
["collectedfromname"]: {
|
472
|
name: "Collected from",
|
473
|
type: "entity",
|
474
|
param: "collectedFrom",
|
475
|
operator: "cl",
|
476
|
equalityOperator: " exact ",
|
477
|
filterType: "checkbox"
|
478
|
},
|
479
|
["collectedfromdatasourceid"]: {
|
480
|
name: "Collected from Content Provider",
|
481
|
type: "entity",
|
482
|
param: "collectedFrom",
|
483
|
operator: "cl",
|
484
|
equalityOperator: " exact ",
|
485
|
filterType: null
|
486
|
},
|
487
|
["country"]: {
|
488
|
name: "Country",
|
489
|
type: "vocabulary",
|
490
|
param: "country",
|
491
|
operator: "cu",
|
492
|
equalityOperator: "=",
|
493
|
filterType: "checkbox"
|
494
|
}
|
495
|
};
|
496
|
|
497
|
public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string } [] = [
|
498
|
{"name": "relorganizationname", "equalityOperator": "="},
|
499
|
{"name": "relorganizationshortname", "equalityOperator": "="},
|
500
|
{"name": "datasourceofficialname", "equalityOperator": "="},
|
501
|
{"name": "datasourceenglishname", "equalityOperator": "="},
|
502
|
{"name": "datasourcetypeuiname", "equalityOperator": " exact "},
|
503
|
{"name": "country", "equalityOperator": " exact "},
|
504
|
{"name": "datasourcesubject", "equalityOperator": " all "}
|
505
|
];
|
506
|
public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypeuiname", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname"];
|
507
|
|
508
|
public DEPOSIT_DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
509
|
["datasourcetypeuiname"]: {
|
510
|
name: "Repository type",
|
511
|
type: "refine",
|
512
|
param: "type",
|
513
|
operator: "tp",
|
514
|
equalityOperator: " exact ",
|
515
|
filterType: "radio"
|
516
|
},
|
517
|
["country"]: {
|
518
|
name: "Countries",
|
519
|
type: "vocabulary",
|
520
|
param: "country",
|
521
|
operator: "cu",
|
522
|
equalityOperator: "=",
|
523
|
filterType: "checkbox"
|
524
|
},
|
525
|
["datasourceodsubjects"]: {
|
526
|
name: "Subjects",
|
527
|
type: "keyword",
|
528
|
param: "subjects",
|
529
|
operator: "sb",
|
530
|
equalityOperator: "=",
|
531
|
filterType: "checkbox"
|
532
|
},
|
533
|
["datasourceodcontenttypes"]: {
|
534
|
name: "Content type",
|
535
|
type: "refine",
|
536
|
param: "content",
|
537
|
operator: "cn",
|
538
|
equalityOperator: " exact ",
|
539
|
filterType: "checkbox"
|
540
|
},
|
541
|
["datasourcecompatibilityname"]: {
|
542
|
name: "Compatibility Level",
|
543
|
type: "vocabulary",
|
544
|
param: "compatibility",
|
545
|
operator: "cm",
|
546
|
equalityOperator: " exact ",
|
547
|
filterType: "checkbox"
|
548
|
},
|
549
|
};
|
550
|
|
551
|
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypeuiid", "datasourcecompatibilityname"];
|
552
|
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
553
|
public JOURNAL_FIELDS: string[] = ["datasourcetypeuiid", "datasourcecompatibilityname"];
|
554
|
|
555
|
//ORGANIZATION
|
556
|
|
557
|
public ORGANIZATION_REFINE_FIELDS: string[] = ["country"]
|
558
|
public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"];
|
559
|
|
560
|
public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = {
|
561
|
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
562
|
["organizationlegalname"]: {
|
563
|
name: "Legal Name",
|
564
|
type: "keyword",
|
565
|
param: "name",
|
566
|
operator: "nm",
|
567
|
equalityOperator: "=",
|
568
|
filterType: null
|
569
|
},
|
570
|
["organizationlegalshortname"]: {
|
571
|
name: "Legal Short Name",
|
572
|
type: "keyword",
|
573
|
param: "shortname",
|
574
|
operator: "so",
|
575
|
equalityOperator: "=",
|
576
|
filterType: null
|
577
|
},
|
578
|
["country"]: {
|
579
|
name: "Country",
|
580
|
type: "vocabulary",
|
581
|
param: "country",
|
582
|
operator: "cu",
|
583
|
equalityOperator: "=",
|
584
|
filterType: "checkbox"
|
585
|
},
|
586
|
};
|
587
|
// public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
|
588
|
// public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
|
589
|
// public ORGANIZATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["organizationlegalname"]:"contenttype", ["organizationlegalshortname"]:"type",
|
590
|
// ["organizationcountryname"]:"country"};//,["organizationeclegalbody"]:"type"};
|
591
|
// public ORGANIZATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string , operator: "op", equalityOperator:string}} ={
|
592
|
// ["q"]:{name:"All fields",operator:"op", type:"keyword", indexField:null, operator: "op", equalityOperator: "="},
|
593
|
// ["contenttype"]:{name:"Legal Name",operator:"cn", type:"keyword" , indexField:"organizationlegalname", operator: "op", equalityOperator: "="},
|
594
|
// ["compatibility"]:{name:"Legal Short Name",operator:"cm", type:"keyword", indexField:"organizationlegalshortname", operator: "op", equalityOperator: "="},
|
595
|
// ["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryname", operator: "op", equalityOperator: " exact "},
|
596
|
// ["type"]:{name:"Type",operator:"tp", type:"refine", indexField:"organizationeclegalbody", operator: "op", equalityOperator: " exact "},
|
597
|
//
|
598
|
// };
|
599
|
|
600
|
|
601
|
//add project field depending on funder
|
602
|
public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
603
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject"];
|
604
|
|
605
|
public DEPENDENT_FIELDS: { [key: string]: string } = {
|
606
|
["relproject"]: "relfunder",
|
607
|
["fundinglevel0_id"]: "funder",
|
608
|
["fundinglevel1_id"]: "fundinglevel0_id",
|
609
|
["fundinglevel2_id"]: "fundinglevel1_id",
|
610
|
["relfundinglevel0_id"]: "relfunder",
|
611
|
["relfundinglevel1_id"]: "relfundinglevel0_id",
|
612
|
["relfundinglevel2_id"]: "relfundinglevel1_id"
|
613
|
};
|
614
|
|
615
|
|
616
|
public ADVANCED_SEARCH_OPERATORS: { name: string, id: string }[] = [{name: "AND", id: "and"}, {
|
617
|
name: "OR",
|
618
|
id: "or"
|
619
|
}, {name: "NOT", id: "not"}];
|
620
|
|
621
|
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "status", "role"];
|
622
|
|
623
|
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
624
|
|
625
|
constructor() {
|
626
|
}
|
627
|
|
628
|
getFieldName(fieldId: string, fieldType: string): string {
|
629
|
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
630
|
return this.RESULT_FIELDS[fieldId].name;
|
631
|
} else if (fieldType == "project") {
|
632
|
return this.PROJECT_FIELDS[fieldId].name;
|
633
|
} else if (fieldType == "organization") {
|
634
|
return this.ORGANIZATION_FIELDS[fieldId].name;
|
635
|
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
636
|
return this.DATASOURCE_FIELDS[fieldId].name;
|
637
|
} else {
|
638
|
return "UNDEFINED";
|
639
|
}
|
640
|
}
|
641
|
|
642
|
getFieldFilterType(fieldId: string, fieldType: string, usedBy: string = "search"): string {
|
643
|
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
644
|
return this.RESULT_FIELDS[fieldId].filterType;
|
645
|
} else if (fieldType == "project") {
|
646
|
return this.PROJECT_FIELDS[fieldId].filterType;
|
647
|
} else if (fieldType == "organization") {
|
648
|
return this.ORGANIZATION_FIELDS[fieldId].filterType;
|
649
|
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
650
|
if (usedBy == "search") {
|
651
|
return this.DATASOURCE_FIELDS[fieldId].filterType;
|
652
|
} else if (usedBy == "deposit") {
|
653
|
return this.DEPOSIT_DATASOURCE_FIELDS[fieldId].filterType;
|
654
|
}
|
655
|
} else {
|
656
|
return "checkbox";
|
657
|
}
|
658
|
}
|
659
|
|
660
|
getFieldParam(fieldId: string, fieldType: string): string {
|
661
|
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
662
|
return this.RESULT_FIELDS[fieldId].param;
|
663
|
} else if (fieldType == "project") {
|
664
|
return this.PROJECT_FIELDS[fieldId].param;
|
665
|
} else if (fieldType == "organization") {
|
666
|
return this.ORGANIZATION_FIELDS[fieldId].param;
|
667
|
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
668
|
return this.DATASOURCE_FIELDS[fieldId].param;
|
669
|
} else {
|
670
|
return "UNDEFINED";
|
671
|
}
|
672
|
}
|
673
|
|
674
|
/*
|
675
|
AND
|
676
|
Funder: relfunder, relfundinglevel0_id, relfundinglevel1_id, relfundinglevel2_id
|
677
|
Project: relproject
|
678
|
Community: community
|
679
|
OR
|
680
|
Type: instancetypename, datasourcetypeuiname
|
681
|
Language: resultlanguagename, datasourceodlanguages
|
682
|
Compatibility Level: datasourcecompatibilityname
|
683
|
Country: country
|
684
|
Content: datasourceodcontenttypes
|
685
|
Content Provider: resulthostingdatasource
|
686
|
Collected From: collectedfrom
|
687
|
BULLETS
|
688
|
Access Mode: resultbestaccessright
|
689
|
Special Clause 39: projectecsc39
|
690
|
Versioning:
|
691
|
|
692
|
RANGE
|
693
|
Publication date: resultacceptanceyear
|
694
|
Project life: projectstartyear, projectendyear
|
695
|
|
696
|
? WHAT ABOUT ?:
|
697
|
Subjects:
|
698
|
Supported Identifiers:
|
699
|
*/
|
700
|
|
701
|
getFieldOperator(fieldId: string): string {
|
702
|
if (fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id"
|
703
|
|| fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") {
|
704
|
return "and";
|
705
|
} else if (fieldId == "instancetypename" || fieldId == "datasourcetypeuiname"
|
706
|
|| fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages"
|
707
|
|| fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes"
|
708
|
|| fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") {
|
709
|
return "or";
|
710
|
}
|
711
|
return "or";
|
712
|
}
|
713
|
}
|
714
|
|
715
|
export class FieldDetails {
|
716
|
name: string;
|
717
|
type: string;
|
718
|
param: string;
|
719
|
equalityOperator: string;
|
720
|
operator: string;
|
721
|
filterType: string = "checkbox";
|
722
|
}
|