qa 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +284 -2
  3. data/app/controllers/qa/linked_data_terms_controller.rb +127 -0
  4. data/config/authorities/linked_data/agrovoc.json +61 -0
  5. data/config/authorities/linked_data/loc.json +46 -0
  6. data/config/authorities/linked_data/oclc_fast.json +78 -0
  7. data/config/initializers/linked_data_authorities.rb +17 -0
  8. data/config/routes.rb +3 -0
  9. data/lib/qa.rb +15 -0
  10. data/lib/qa/authorities.rb +2 -0
  11. data/lib/qa/authorities/base.rb +1 -1
  12. data/lib/qa/authorities/crossref.rb +16 -0
  13. data/lib/qa/authorities/crossref/generic_authority.rb +63 -0
  14. data/lib/qa/authorities/geonames.rb +2 -1
  15. data/lib/qa/authorities/linked_data.rb +10 -0
  16. data/lib/qa/authorities/linked_data/config.rb +80 -0
  17. data/lib/qa/authorities/linked_data/config/search_config.rb +170 -0
  18. data/lib/qa/authorities/linked_data/config/term_config.rb +186 -0
  19. data/lib/qa/authorities/linked_data/find_term.rb +148 -0
  20. data/lib/qa/authorities/linked_data/generic_authority.rb +49 -0
  21. data/lib/qa/authorities/linked_data/rdf_helper.rb +102 -0
  22. data/lib/qa/authorities/linked_data/search_query.rb +143 -0
  23. data/lib/qa/version.rb +1 -1
  24. data/spec/controllers/linked_data_terms_controller_spec.rb +202 -0
  25. data/spec/fixtures/authorities/linked_data/lod_full_config.json +111 -0
  26. data/spec/fixtures/authorities/linked_data/lod_lang_defaults.json +54 -0
  27. data/spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json +54 -0
  28. data/spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json +52 -0
  29. data/spec/fixtures/authorities/linked_data/lod_lang_param.json +66 -0
  30. data/spec/fixtures/authorities/linked_data/lod_min_config.json +49 -0
  31. data/spec/fixtures/authorities/linked_data/lod_search_only_config.json +55 -0
  32. data/spec/fixtures/authorities/linked_data/lod_sort.json +27 -0
  33. data/spec/fixtures/authorities/linked_data/lod_term_only_config.json +59 -0
  34. data/spec/fixtures/funders-find-response.json +1 -0
  35. data/spec/fixtures/funders-noquery.json +1 -0
  36. data/spec/fixtures/funders-noresults.json +1 -0
  37. data/spec/fixtures/funders-result.json +1 -0
  38. data/spec/fixtures/journals-find-response-two-issn.json +1 -0
  39. data/spec/fixtures/journals-find-response.json +1 -0
  40. data/spec/fixtures/journals-noquery.json +1 -0
  41. data/spec/fixtures/journals-noresults.json +1 -0
  42. data/spec/fixtures/journals-result.json +705 -0
  43. data/spec/fixtures/lod_agrovoc_query_many_results.json +1 -0
  44. data/spec/fixtures/lod_agrovoc_query_no_results.json +1 -0
  45. data/spec/fixtures/lod_agrovoc_term_found.rdf.xml +217 -0
  46. data/spec/fixtures/lod_lang_search_en.rdf.xml +42 -0
  47. data/spec/fixtures/lod_lang_search_enfr.rdf.xml +48 -0
  48. data/spec/fixtures/lod_lang_search_enfrde.rdf.xml +54 -0
  49. data/spec/fixtures/lod_lang_search_fr.rdf.xml +42 -0
  50. data/spec/fixtures/lod_lang_term_en.rdf.xml +65 -0
  51. data/spec/fixtures/lod_lang_term_enfr.rdf.xml +71 -0
  52. data/spec/fixtures/lod_lang_term_enfr_noalt.rdf.xml +69 -0
  53. data/spec/fixtures/lod_lang_term_enfrde.rdf.xml +79 -0
  54. data/spec/fixtures/lod_lang_term_fr.rdf.xml +65 -0
  55. data/spec/fixtures/lod_loc_term_found.rdf.xml +262 -0
  56. data/spec/fixtures/lod_oclc_all_query_3_results.rdf.xml +142 -0
  57. data/spec/fixtures/lod_oclc_personalName_query_3_results.rdf.xml +128 -0
  58. data/spec/fixtures/lod_oclc_query_no_results.rdf.xml +13 -0
  59. data/spec/fixtures/lod_oclc_term_found.rdf.xml +51 -0
  60. data/spec/lib/authorities/crossref_spec.rb +180 -0
  61. data/spec/lib/authorities/geonames_spec.rb +2 -2
  62. data/spec/lib/authorities/linked_data/config_spec.rb +143 -0
  63. data/spec/lib/authorities/linked_data/find_term_spec.rb +5 -0
  64. data/spec/lib/authorities/linked_data/generic_authority_spec.rb +580 -0
  65. data/spec/lib/authorities/linked_data/search_config_spec.rb +385 -0
  66. data/spec/lib/authorities/linked_data/search_query_spec.rb +79 -0
  67. data/spec/lib/authorities/linked_data/term_config_spec.rb +419 -0
  68. data/spec/routing/linked_data_route_spec.rb +35 -0
  69. data/spec/spec_helper.rb +2 -0
  70. metadata +184 -39
@@ -0,0 +1,705 @@
1
+ {
2
+ "status": "ok",
3
+ "message-type": "journal-list",
4
+ "message-version": "1.0.0",
5
+ "message": {
6
+ "items-per-page": 20,
7
+ "query": {
8
+ "start-index": 0,
9
+ "search-terms": "heart"
10
+ },
11
+ "total-results": 70,
12
+ "items": [
13
+ {
14
+ "title": "Bangladesh Heart Journal",
15
+ "publisher": "Bangladesh Journals Online",
16
+ "ISSN": [
17
+ "1024-8714"
18
+ ],
19
+ "flags": null,
20
+ "coverage": null,
21
+ "breakdowns": null,
22
+ "counts": null,
23
+ "last-status-check-time": null
24
+ },
25
+ {
26
+ "title": "Heart",
27
+ "publisher": "BMJ",
28
+ "ISSN": [
29
+ "1355-6037"
30
+ ],
31
+ "flags": {
32
+ "deposits-orcids-current": true,
33
+ "deposits": true,
34
+ "deposits-update-policies-backfile": true,
35
+ "deposits-award-numbers-current": false,
36
+ "deposits-resource-links-current": false,
37
+ "deposits-articles": true,
38
+ "deposits-funders-current": false,
39
+ "deposits-references-backfile": true,
40
+ "deposits-licenses-backfile": false,
41
+ "deposits-award-numbers-backfile": false,
42
+ "deposits-references-current": true,
43
+ "deposits-resource-links-backfile": false,
44
+ "deposits-orcids-backfile": false,
45
+ "deposits-funders-backfile": false,
46
+ "deposits-update-policies-current": true,
47
+ "deposits-licenses-current": false
48
+ },
49
+ "coverage": {
50
+ "funders-backfile": 0.0,
51
+ "licenses-backfile": 0.0,
52
+ "funders-current": 0.0,
53
+ "resource-links-backfile": 0.0,
54
+ "orcids-backfile": 0.0,
55
+ "update-policies-current": 0.8449265956878662,
56
+ "orcids-current": 0.03126994147896767,
57
+ "references-backfile": 0.022236142307519913,
58
+ "award-numbers-backfile": 0.0,
59
+ "update-policies-backfile": 0.1716776341199875,
60
+ "licenses-current": 0.0,
61
+ "award-numbers-current": 0.0,
62
+ "resource-links-current": 0.0,
63
+ "references-current": 0.3439693748950958
64
+ },
65
+ "breakdowns": {
66
+ "dois-by-issued-year": [
67
+ [
68
+ 2013,
69
+ 1795
70
+ ],
71
+ [
72
+ 2012,
73
+ 1519
74
+ ],
75
+ [
76
+ 2010,
77
+ 1514
78
+ ],
79
+ [
80
+ 2011,
81
+ 1473
82
+ ],
83
+ [
84
+ 2014,
85
+ 850
86
+ ],
87
+ [
88
+ 2005,
89
+ 779
90
+ ],
91
+ [
92
+ 2015,
93
+ 638
94
+ ],
95
+ [
96
+ 2006,
97
+ 502
98
+ ],
99
+ [
100
+ 2008,
101
+ 485
102
+ ],
103
+ [
104
+ 1999,
105
+ 427
106
+ ],
107
+ [
108
+ 2007,
109
+ 422
110
+ ],
111
+ [
112
+ 2009,
113
+ 392
114
+ ],
115
+ [
116
+ 1994,
117
+ 377
118
+ ],
119
+ [
120
+ 1997,
121
+ 374
122
+ ],
123
+ [
124
+ 1998,
125
+ 371
126
+ ],
127
+ [
128
+ 1996,
129
+ 349
130
+ ],
131
+ [
132
+ 1995,
133
+ 335
134
+ ],
135
+ [
136
+ 1993,
137
+ 335
138
+ ],
139
+ [
140
+ 1992,
141
+ 280
142
+ ],
143
+ [
144
+ 2004,
145
+ 252
146
+ ],
147
+ [
148
+ 1984,
149
+ 249
150
+ ],
151
+ [
152
+ 1985,
153
+ 244
154
+ ],
155
+ [
156
+ 1987,
157
+ 240
158
+ ],
159
+ [
160
+ 1979,
161
+ 240
162
+ ],
163
+ [
164
+ 1981,
165
+ 237
166
+ ],
167
+ [
168
+ 1977,
169
+ 236
170
+ ],
171
+ [
172
+ 1980,
173
+ 235
174
+ ],
175
+ [
176
+ 1978,
177
+ 232
178
+ ],
179
+ [
180
+ 1973,
181
+ 229
182
+ ],
183
+ [
184
+ 1986,
185
+ 226
186
+ ],
187
+ [
188
+ 1988,
189
+ 224
190
+ ],
191
+ [
192
+ 1991,
193
+ 223
194
+ ],
195
+ [
196
+ 1976,
197
+ 223
198
+ ],
199
+ [
200
+ 1990,
201
+ 222
202
+ ],
203
+ [
204
+ 1972,
205
+ 221
206
+ ],
207
+ [
208
+ 1983,
209
+ 211
210
+ ],
211
+ [
212
+ 1982,
213
+ 207
214
+ ],
215
+ [
216
+ 1975,
217
+ 205
218
+ ],
219
+ [
220
+ 1971,
221
+ 200
222
+ ],
223
+ [
224
+ 1989,
225
+ 193
226
+ ],
227
+ [
228
+ 1974,
229
+ 193
230
+ ],
231
+ [
232
+ 2016,
233
+ 192
234
+ ],
235
+ [
236
+ 1970,
237
+ 156
238
+ ],
239
+ [
240
+ 1969,
241
+ 143
242
+ ],
243
+ [
244
+ 1968,
245
+ 129
246
+ ],
247
+ [
248
+ 1967,
249
+ 129
250
+ ],
251
+ [
252
+ 1965,
253
+ 125
254
+ ],
255
+ [
256
+ 1966,
257
+ 114
258
+ ],
259
+ [
260
+ 1964,
261
+ 111
262
+ ],
263
+ [
264
+ 1963,
265
+ 108
266
+ ],
267
+ [
268
+ 1962,
269
+ 105
270
+ ],
271
+ [
272
+ 1961,
273
+ 97
274
+ ],
275
+ [
276
+ 1960,
277
+ 89
278
+ ],
279
+ [
280
+ 1957,
281
+ 80
282
+ ],
283
+ [
284
+ 1958,
285
+ 79
286
+ ],
287
+ [
288
+ 1956,
289
+ 75
290
+ ],
291
+ [
292
+ 1959,
293
+ 74
294
+ ],
295
+ [
296
+ 1952,
297
+ 73
298
+ ],
299
+ [
300
+ 1951,
301
+ 73
302
+ ],
303
+ [
304
+ 1955,
305
+ 71
306
+ ],
307
+ [
308
+ 1954,
309
+ 63
310
+ ],
311
+ [
312
+ 1953,
313
+ 61
314
+ ],
315
+ [
316
+ 1949,
317
+ 43
318
+ ],
319
+ [
320
+ 1950,
321
+ 41
322
+ ],
323
+ [
324
+ 1948,
325
+ 41
326
+ ],
327
+ [
328
+ 1944,
329
+ 37
330
+ ],
331
+ [
332
+ 1943,
333
+ 36
334
+ ],
335
+ [
336
+ 1947,
337
+ 35
338
+ ],
339
+ [
340
+ 1940,
341
+ 34
342
+ ],
343
+ [
344
+ 1946,
345
+ 33
346
+ ],
347
+ [
348
+ 1945,
349
+ 33
350
+ ],
351
+ [
352
+ 1939,
353
+ 28
354
+ ],
355
+ [
356
+ 1941,
357
+ 25
358
+ ],
359
+ [
360
+ 1942,
361
+ 23
362
+ ],
363
+ [
364
+ 2002,
365
+ 8
366
+ ]
367
+ ]
368
+ },
369
+ "counts": {
370
+ "total-dois": 20725,
371
+ "current-dois": 1567,
372
+ "backfile-dois": 19158
373
+ },
374
+ "last-status-check-time": 1459490490820
375
+ },
376
+ {
377
+ "title": "Texas Heart Institute Journal",
378
+ "publisher": "Texas Heart Institute Journal",
379
+ "ISSN": [
380
+ "0730-2347",
381
+ "1526-6702"
382
+ ],
383
+ "flags": null,
384
+ "coverage": null,
385
+ "breakdowns": null,
386
+ "counts": null,
387
+ "last-status-check-time": null
388
+ },
389
+ {
390
+ "title": "International Journal of Heart Rhythm",
391
+ "publisher": "Medknow Publications",
392
+ "ISSN": [
393
+ "2352-4197"
394
+ ],
395
+ "flags": null,
396
+ "coverage": null,
397
+ "breakdowns": null,
398
+ "counts": null,
399
+ "last-status-check-time": null
400
+ },
401
+ {
402
+ "title": "AJP Heart and Circulatory Physiology",
403
+ "publisher": "American Physiological Society",
404
+ "ISSN": [
405
+ "0363-6135",
406
+ "1522-1539"
407
+ ],
408
+ "flags": null,
409
+ "coverage": null,
410
+ "breakdowns": null,
411
+ "counts": null,
412
+ "last-status-check-time": null
413
+ },
414
+ {
415
+ "title": "Russian Heart Failure Journal",
416
+ "publisher": "APO Society of Specialists in Heart Failure",
417
+ "ISSN": [
418
+ "1728-4651"
419
+ ],
420
+ "flags": null,
421
+ "coverage": null,
422
+ "breakdowns": null,
423
+ "counts": null,
424
+ "last-status-check-time": null
425
+ },
426
+ {
427
+ "title": "Russian Heart Journal",
428
+ "publisher": "APO Society of Specialists in Heart Failure",
429
+ "ISSN": [
430
+ "1728-4724"
431
+ ],
432
+ "flags": null,
433
+ "coverage": null,
434
+ "breakdowns": null,
435
+ "counts": null,
436
+ "last-status-check-time": null
437
+ },
438
+ {
439
+ "title": "ASEAN Heart Journal",
440
+ "publisher": "Springer - Global Science Journals",
441
+ "ISSN": [
442
+ "2315-4551"
443
+ ],
444
+ "flags": null,
445
+ "coverage": null,
446
+ "breakdowns": null,
447
+ "counts": null,
448
+ "last-status-check-time": null
449
+ },
450
+ {
451
+ "title": "Aswan Heart Centre Science & Practice Series",
452
+ "publisher": "Hamad bin Khalifa University Press (HBKU Press)",
453
+ "ISSN": [
454
+ "2220-2730"
455
+ ],
456
+ "flags": null,
457
+ "coverage": null,
458
+ "breakdowns": null,
459
+ "counts": null,
460
+ "last-status-check-time": null
461
+ },
462
+ {
463
+ "title": "Circulation Heart Failure",
464
+ "publisher": "Ovid Technologies Wolters Kluwer -American Heart Association",
465
+ "ISSN": [
466
+ "1941-3289",
467
+ "1941-3297"
468
+ ],
469
+ "flags": null,
470
+ "coverage": null,
471
+ "breakdowns": null,
472
+ "counts": null,
473
+ "last-status-check-time": null
474
+ },
475
+ {
476
+ "title": "Congenital Heart Disease",
477
+ "publisher": "Wiley Blackwell (Blackwell Publishing)",
478
+ "ISSN": [
479
+ "1747-079X",
480
+ "1747-0803"
481
+ ],
482
+ "flags": null,
483
+ "coverage": null,
484
+ "breakdowns": null,
485
+ "counts": null,
486
+ "last-status-check-time": null
487
+ },
488
+ {
489
+ "title": "Congestive Heart Failure",
490
+ "publisher": "Wiley Blackwell (Blackwell Publishing)",
491
+ "ISSN": [
492
+ "1527-5299",
493
+ "1751-7133"
494
+ ],
495
+ "flags": null,
496
+ "coverage": null,
497
+ "breakdowns": null,
498
+ "counts": null,
499
+ "last-status-check-time": null
500
+ },
501
+ {
502
+ "title": "Current Heart Failure Reports",
503
+ "publisher": "Springer-Verlag",
504
+ "ISSN": [
505
+ "1546-9530",
506
+ "1546-9549"
507
+ ],
508
+ "flags": null,
509
+ "coverage": null,
510
+ "breakdowns": null,
511
+ "counts": null,
512
+ "last-status-check-time": null
513
+ },
514
+ {
515
+ "title": "European Heart Journal - Cardiovascular Imaging",
516
+ "publisher": "Oxford University Press",
517
+ "ISSN": [
518
+ "2047-2404",
519
+ "2047-2412"
520
+ ],
521
+ "flags": null,
522
+ "coverage": null,
523
+ "breakdowns": null,
524
+ "counts": null,
525
+ "last-status-check-time": null
526
+ },
527
+ {
528
+ "title": "European Heart Journal Acute Cardiovascular Care",
529
+ "publisher": "SAGE Publications",
530
+ "ISSN": [
531
+ "2048-8726",
532
+ "2048-8734"
533
+ ],
534
+ "flags": null,
535
+ "coverage": null,
536
+ "breakdowns": null,
537
+ "counts": null,
538
+ "last-status-check-time": null
539
+ },
540
+ {
541
+ "title": "European Heart Journal Supplements",
542
+ "publisher": "Oxford University Press",
543
+ "ISSN": [
544
+ "1520-765X"
545
+ ],
546
+ "flags": {
547
+ "deposits-orcids-current": false,
548
+ "deposits": true,
549
+ "deposits-update-policies-backfile": false,
550
+ "deposits-award-numbers-current": true,
551
+ "deposits-resource-links-current": false,
552
+ "deposits-articles": true,
553
+ "deposits-funders-current": true,
554
+ "deposits-references-backfile": true,
555
+ "deposits-licenses-backfile": true,
556
+ "deposits-award-numbers-backfile": false,
557
+ "deposits-references-current": true,
558
+ "deposits-resource-links-backfile": true,
559
+ "deposits-orcids-backfile": false,
560
+ "deposits-funders-backfile": false,
561
+ "deposits-update-policies-current": false,
562
+ "deposits-licenses-current": false
563
+ },
564
+ "coverage": {
565
+ "funders-backfile": 0.0,
566
+ "licenses-backfile": 0.04328523948788643,
567
+ "funders-current": 0.20408163964748383,
568
+ "resource-links-backfile": 0.04328523948788643,
569
+ "orcids-backfile": 0.0,
570
+ "update-policies-current": 0.0,
571
+ "orcids-current": 0.0,
572
+ "references-backfile": 0.16648168861865997,
573
+ "award-numbers-backfile": 0.0,
574
+ "update-policies-backfile": 0.0,
575
+ "licenses-current": 0.0,
576
+ "award-numbers-current": 0.09183673560619354,
577
+ "resource-links-current": 0.0,
578
+ "references-current": 0.8877550959587097
579
+ },
580
+ "breakdowns": {
581
+ "dois-by-issued-year": [
582
+ [
583
+ 2004,
584
+ 130
585
+ ],
586
+ [
587
+ 2001,
588
+ 128
589
+ ],
590
+ [
591
+ 2002,
592
+ 113
593
+ ],
594
+ [
595
+ 2005,
596
+ 88
597
+ ],
598
+ [
599
+ 2003,
600
+ 74
601
+ ],
602
+ [
603
+ 2006,
604
+ 73
605
+ ],
606
+ [
607
+ 2007,
608
+ 72
609
+ ],
610
+ [
611
+ 2008,
612
+ 69
613
+ ],
614
+ [
615
+ 2009,
616
+ 61
617
+ ],
618
+ [
619
+ 2015,
620
+ 59
621
+ ],
622
+ [
623
+ 2014,
624
+ 49
625
+ ],
626
+ [
627
+ 2010,
628
+ 31
629
+ ],
630
+ [
631
+ 2012,
632
+ 26
633
+ ],
634
+ [
635
+ 2011,
636
+ 18
637
+ ],
638
+ [
639
+ 2016,
640
+ 8
641
+ ]
642
+ ]
643
+ },
644
+ "counts": {
645
+ "total-dois": 999,
646
+ "current-dois": 98,
647
+ "backfile-dois": 901
648
+ },
649
+ "last-status-check-time": 1459491256990
650
+ },
651
+ {
652
+ "title": "European Journal of Heart Failure",
653
+ "publisher": "Wiley Blackwell (John Wiley & Sons)",
654
+ "ISSN": [
655
+ "1388-9842",
656
+ "1879-0844"
657
+ ],
658
+ "flags": null,
659
+ "coverage": null,
660
+ "breakdowns": null,
661
+ "counts": null,
662
+ "last-status-check-time": null
663
+ },
664
+ {
665
+ "title": "European Journal of Heart Failure Supplements",
666
+ "publisher": "Oxford University Press",
667
+ "ISSN": [
668
+ "1567-4215",
669
+ "1878-1314"
670
+ ],
671
+ "flags": null,
672
+ "coverage": null,
673
+ "breakdowns": null,
674
+ "counts": null,
675
+ "last-status-check-time": null
676
+ },
677
+ {
678
+ "title": "European Heart Journal - Quality of Care and Clinical Outcomes",
679
+ "publisher": "Oxford University Press",
680
+ "ISSN": [
681
+ "2058-5225",
682
+ "2058-1742"
683
+ ],
684
+ "flags": null,
685
+ "coverage": null,
686
+ "breakdowns": null,
687
+ "counts": null,
688
+ "last-status-check-time": null
689
+ },
690
+ {
691
+ "title": "Kosuyolu Heart Journal",
692
+ "publisher": "Bilimsel Tip Publishing House",
693
+ "ISSN": [
694
+ "2149-2972",
695
+ "2149-2980"
696
+ ],
697
+ "flags": null,
698
+ "coverage": null,
699
+ "breakdowns": null,
700
+ "counts": null,
701
+ "last-status-check-time": null
702
+ }
703
+ ]
704
+ }
705
+ }