qa_server 2.1.0 → 2.2.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +6 -0
  4. data/app/assets/stylesheets/qa_server/_fetch.scss +16 -0
  5. data/app/assets/stylesheets/qa_server/_monitor-status.scss +34 -0
  6. data/app/assets/stylesheets/qa_server/_qa_server.scss +1 -1
  7. data/app/assets/stylesheets/qa_server/_styles.scss +4 -0
  8. data/app/controllers/qa_server/fetch_controller.rb +60 -0
  9. data/app/controllers/qa_server/monitor_status_controller.rb +4 -2
  10. data/app/models/qa_server/performance_history.rb +151 -0
  11. data/app/prepends/prepended_linked_data/find_term.rb +16 -0
  12. data/app/prepends/prepended_linked_data/search_query.rb +16 -0
  13. data/app/presenters/qa_server/fetch_presenter.rb +65 -0
  14. data/app/presenters/qa_server/monitor_status_presenter.rb +114 -8
  15. data/app/presenters/qa_server/navmenu_presenter.rb +1 -0
  16. data/app/services/qa_server/authority_loader_service.rb +35 -29
  17. data/app/views/layouts/qa_server.html.erb +3 -1
  18. data/app/views/qa_server/fetch/index.html.erb +62 -0
  19. data/app/views/qa_server/monitor_status/index.html.erb +62 -2
  20. data/config/locales/qa_server.en.yml +24 -0
  21. data/config/routes.rb +1 -0
  22. data/lib/generators/qa_server/config_generator.rb +9 -0
  23. data/lib/generators/qa_server/templates/config/authorities/linked_data/DISABLED/scenarios/mesh_bioportal_ld4l_cache_validation.yml +2 -0
  24. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json +1 -1
  25. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json +1 -1
  26. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json +1 -1
  27. data/lib/generators/qa_server/templates/config/authorities/linked_data/locdemographics_ld4l_cache.json +110 -3
  28. data/lib/generators/qa_server/templates/config/authorities/linked_data/locgenres_ld4l_cache.json +71 -25
  29. data/lib/generators/qa_server/templates/config/authorities/linked_data/locsubjects_ld4l_cache.json +76 -12
  30. data/lib/generators/qa_server/templates/config/authorities/linked_data/nalt_ld4l_cache.json +2 -4
  31. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/loc_direct_validation.yml +3 -0
  32. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/loc_validation.yml +6 -0
  33. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locdemographics_ld4l_cache_validation.yml +1 -0
  34. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locgenres_ld4l_cache_validation.yml +13 -14
  35. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locsubjects_ld4l_cache_validation.yml +1 -18
  36. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclcfast_direct_validation.yml +10 -10
  37. data/lib/generators/qa_server/templates/db/migrate/20190813045549_create_performance_history.rb.erb +12 -0
  38. data/lib/qa_server/version.rb +1 -1
  39. metadata +10 -2
@@ -27,7 +27,7 @@
27
27
  "term_id": "URI",
28
28
  "results": {
29
29
  "id_ldpath": "loc:lccn ::xsd:string",
30
- "label_ldpath": "skos:prefLabel ::xsd:string",
30
+ "label_ldpath": "skos:prefLabel | madsrdf:variantLabel ::xsd:string",
31
31
  "altlabel_ldpath": "skos:altLabel ::xsd:string",
32
32
  "broader_ldpath": "skos:broader ::xsd:anyURI",
33
33
  "narrower_ldpath": "skos:narrower ::xsd:anyURI",
@@ -38,7 +38,7 @@
38
38
  "url": {
39
39
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
40
40
  "@type": "IriTemplate",
41
- "template": "http://services.ld4l.org/ld4l_services/loc_genre_batch.jsp?{?query}&{?entity}&{?maxRecords}&{?lang}&{?context}",
41
+ "template": "http://services.ld4l.org/ld4l_services/loc_genre_batch.jsp?{?query}&{?entity}&{?maxRecords}&{?startRecord}&{?lang}&{?context}",
42
42
  "variableRepresentation": "BasicRepresentation",
43
43
  "mapping": [
44
44
  {
@@ -62,6 +62,13 @@
62
62
  "required": false,
63
63
  "default": "20"
64
64
  },
65
+ {
66
+ "@type": "IriTemplateMapping",
67
+ "variable": "startRecord",
68
+ "property": "hydra:freetextQuery",
69
+ "required": false,
70
+ "default": "1"
71
+ },
65
72
  {
66
73
  "@type": "IriTemplateMapping",
67
74
  "variable": "lang",
@@ -84,7 +91,7 @@
84
91
  },
85
92
  "results": {
86
93
  "id_ldpath": "loc:lccn ::xsd:string",
87
- "label_ldpath": "madsrdf:authoritativeLabel ::xsd:string",
94
+ "label_ldpath": "skos:prefLabel | madsrdf:variantLabel ::xsd:string",
88
95
  "sort_ldpath": "vivo:rank ::xsd:string"
89
96
  },
90
97
  "context": {
@@ -92,28 +99,60 @@
92
99
  "hierarchy": {
93
100
  "group_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.hierarchy",
94
101
  "group_label_default": "Hierarchy"
102
+ },
103
+ "deprecation": {
104
+ "group_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.deprecation",
105
+ "group_label_default": "Deprecation"
95
106
  }
96
107
  },
97
108
  "properties": [
98
109
  {
99
- "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.authoritative_label",
100
- "property_label_default": "Authoritative Label",
101
- "ldpath": "madsrdf:authoritativeLabel :: xsd:string",
110
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.preferred_label",
111
+ "property_label_default": "Preferred label",
112
+ "ldpath": "skos:prefLabel | madsrdf:variantLabel :: xsd:string",
102
113
  "selectable": true,
103
114
  "drillable": false
104
115
  },
105
116
  {
106
117
  "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.alt_label",
107
- "property_label_default": "Variant Label",
118
+ "property_label_default": "Alternative Label",
108
119
  "ldpath": "skos:altLabel :: xsd:string",
109
120
  "selectable": false,
110
121
  "drillable": false
111
122
  },
123
+ {
124
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.scope_note",
125
+ "property_label_default": "Scope note",
126
+ "ldpath": "skos:note :: xsd:string",
127
+ "selectable": false,
128
+ "drillable": false
129
+ },
130
+ {
131
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.citation_note",
132
+ "property_label_default": "Citation note",
133
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-note :: xsd:string",
134
+ "selectable": false,
135
+ "drillable": false
136
+ },
137
+ {
138
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.citation_source",
139
+ "property_label_default": "Citation source",
140
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-source :: xsd:string",
141
+ "selectable": false,
142
+ "drillable": false
143
+ },
144
+ {
145
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.citation_status",
146
+ "property_label_default": "Citation status",
147
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-status :: xsd:string",
148
+ "selectable": false,
149
+ "drillable": false
150
+ },
112
151
  {
113
152
  "group_id": "hierarchy",
114
- "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.narrower",
115
- "property_label_default": "Narrower",
116
- "ldpath": "skos:narrower :: xsd:string",
153
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.broader",
154
+ "property_label_default": "Broader",
155
+ "ldpath": "skos:broader :: xsd:string",
117
156
  "selectable": true,
118
157
  "drillable": true,
119
158
  "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
@@ -121,37 +160,44 @@
121
160
  },
122
161
  {
123
162
  "group_id": "hierarchy",
124
- "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.broader",
125
- "property_label_default": "Broader",
126
- "ldpath": "skos:broader :: xsd:string",
163
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.narrower",
164
+ "property_label_default": "Narrower",
165
+ "ldpath": "skos:narrower :: xsd:string",
127
166
  "selectable": true,
128
167
  "drillable": true,
129
168
  "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
130
169
  "expansion_id_ldpath": "loc:lccn ::xsd:string"
131
170
  },
132
171
  {
133
- "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.exact_match",
134
- "property_label_default": "Exact Match",
135
- "ldpath": "skos:exactMatch :: xsd:string",
172
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.type",
173
+ "property_label_default": "Type",
174
+ "ldpath": "rdf:type :: xsd:string",
136
175
  "selectable": false,
137
176
  "drillable": false
138
177
  },
139
178
  {
140
- "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.note",
141
- "property_label_default": "Note",
142
- "ldpath": "skos:note :: xsd:string",
179
+ "group_id": "deprecation",
180
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.use_instead",
181
+ "property_label_default": "Use instead",
182
+ "ldpath": "madsrdf:useInstead :: xsd:string",
183
+ "selectable": true,
184
+ "drillable": true,
185
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
186
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
187
+ },
188
+ {
189
+ "group_id": "deprecation",
190
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.deletion_note",
191
+ "property_label_default": "Deletion note",
192
+ "ldpath": "madsrdf:deletionNote :: xsd:string",
143
193
  "selectable": false,
144
194
  "drillable": false
145
195
  }
146
196
  ]
147
197
  },
148
198
  "subauthorities": {
149
- "person": "Person",
150
- "organization": "Organization",
151
- "place": "Place",
152
- "intangible": "Intangible",
153
- "geocoordinates": "GeoCoordinates",
154
- "work": "Work"
199
+ "active": "active",
200
+ "deprecated": "deprecated"
155
201
  }
156
202
  }
157
203
  }
@@ -36,7 +36,7 @@
36
36
  "url": {
37
37
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
38
38
  "@type": "IriTemplate",
39
- "template": "http://services.ld4l.org/ld4l_services/loc_subject_batch.jsp?{?query}&{?entity}&{?maxRecords}&{?lang}",
39
+ "template": "http://services.ld4l.org/ld4l_services/loc_subject_batch.jsp?{?query}&{?maxRecords}&{?startRecord}&{?lang}",
40
40
  "variableRepresentation": "BasicRepresentation",
41
41
  "mapping": [
42
42
  {
@@ -48,17 +48,17 @@
48
48
  },
49
49
  {
50
50
  "@type": "IriTemplateMapping",
51
- "variable": "entity",
51
+ "variable": "maxRecords",
52
52
  "property": "hydra:freetextQuery",
53
53
  "required": false,
54
- "default": ""
54
+ "default": "20"
55
55
  },
56
56
  {
57
57
  "@type": "IriTemplateMapping",
58
- "variable": "maxRecords",
58
+ "variable": "startRecord",
59
59
  "property": "hydra:freetextQuery",
60
60
  "required": false,
61
- "default": "20"
61
+ "default": "1"
62
62
  },
63
63
  {
64
64
  "@type": "IriTemplateMapping",
@@ -77,13 +77,77 @@
77
77
  "label_ldpath": "madsrdf:authoritativeLabel ::xsd:string",
78
78
  "sort_ldpath": "vivo:rank ::xsd:string"
79
79
  },
80
- "subauthorities": {
81
- "person": "Person",
82
- "organization": "Organization",
83
- "place": "Place",
84
- "intangible": "Intangible",
85
- "geocoordinates": "GeoCoordinates",
86
- "work": "Work"
80
+ "context": {
81
+ "groups": {
82
+ "hierarchy": {
83
+ "group_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.hierarchy",
84
+ "group_label_default": "Hierarchy"
85
+ }
86
+ },
87
+ "properties": [
88
+ {
89
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.preferred_label",
90
+ "property_label_default": "Preferred label",
91
+ "ldpath": "skos:prefLabel :: xsd:string",
92
+ "selectable": true,
93
+ "drillable": false
94
+ },
95
+ {
96
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.alternative_label",
97
+ "property_label_default": "Alternative label",
98
+ "ldpath": "skos:altLabel :: xsd:string",
99
+ "selectable": false,
100
+ "drillable": false
101
+ },
102
+ {
103
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.type",
104
+ "property_label_default": "Type",
105
+ "ldpath": "rdf:type :: xsd:string",
106
+ "selectable": false,
107
+ "drillable": false
108
+ },
109
+ {
110
+ "group_id": "hierarchy",
111
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.broader",
112
+ "property_label_default": "Broader",
113
+ "ldpath": "skos:broader :: xsd:string",
114
+ "selectable": true,
115
+ "drillable": true,
116
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
117
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
118
+ },
119
+ {
120
+ "group_id": "hierarchy",
121
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.narrower",
122
+ "property_label_default": "Narrower",
123
+ "ldpath": "skos:narrower :: xsd:string",
124
+ "selectable": true,
125
+ "drillable": true,
126
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
127
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
128
+ },
129
+ {
130
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.citation_note",
131
+ "property_label_default": "Citation note",
132
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-note :: xsd:string",
133
+ "selectable": false,
134
+ "drillable": false
135
+ },
136
+ {
137
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.citation_source",
138
+ "property_label_default": "Citation source",
139
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-source :: xsd:string",
140
+ "selectable": false,
141
+ "drillable": false
142
+ },
143
+ {
144
+ "property_label_i18n": "qa.linked_data.authority.locsubjects_ld4l_cache.citation_status",
145
+ "property_label_default": "Citation status",
146
+ "ldpath": "madsrdf:hasSource / madsrdf:citation-status :: xsd:string",
147
+ "selectable": false,
148
+ "drillable": false
149
+ }
150
+ ]
87
151
  }
88
152
  }
89
153
  }
@@ -98,8 +98,7 @@
98
98
  "ldpath": "skos:narrower :: xsd:string",
99
99
  "selectable": true,
100
100
  "drillable": true,
101
- "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
102
- "expansion_id_ldpath": "loc:lccn ::xsd:string"
101
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string"
103
102
  },
104
103
  {
105
104
  "group_id": "hierarchy",
@@ -108,8 +107,7 @@
108
107
  "ldpath": "skos:broader :: xsd:string",
109
108
  "selectable": true,
110
109
  "drillable": true,
111
- "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
112
- "expansion_id_ldpath": "loc:lccn ::xsd:string"
110
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string"
113
111
  }
114
112
  ]
115
113
  },
@@ -11,6 +11,9 @@ term:
11
11
  -
12
12
  identifier: gf2011026370
13
13
  subauth: genre
14
+ -
15
+ identifier: 'KF26'
16
+ subauth: classification
14
17
  -
15
18
  identifier: 'KF26.L383'
16
19
  subauth: classification
@@ -11,6 +11,9 @@ term:
11
11
  -
12
12
  identifier: gf2011026370
13
13
  subauth: genre
14
+ -
15
+ identifier: 'KF26'
16
+ subauth: classification
14
17
  -
15
18
  identifier: 'KF26.L383'
16
19
  subauth: classification
@@ -20,3 +23,6 @@ term:
20
23
  -
21
24
  identifier: dg2015060550
22
25
  subauth: demographic
26
+ -
27
+ identifier: mp2013015171
28
+ subauth: music_performance
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  authority:
3
3
  service: ld4l_cache
4
+ context: true
4
5
  search:
5
6
  -
6
7
  query: workers
@@ -6,23 +6,13 @@ search:
6
6
  -
7
7
  query: animation
8
8
  -
9
- query: animation
10
- subauth: person
11
- -
12
- query: animation
13
- subauth: organization
9
+ query: Basketball television programs
14
10
  -
15
11
  query: animation
16
- subauth: place
12
+ subauth: active
17
13
  -
18
- query: animation
19
- subauth: intangible
20
- -
21
- query: animation
22
- subauth: geocoordinates
23
- -
24
- query: animation
25
- subauth: work
14
+ query: Basketball television programs
15
+ subauth: deprecated
26
16
  -
27
17
  query: Preliminary documents (Treaties)
28
18
  position: 10
@@ -95,6 +85,15 @@ search:
95
85
  subject_uri: "http://id.loc.gov/authorities/genreForms/gf2011026136"
96
86
  replacements:
97
87
  maxRecords: '20'
88
+ -
89
+ query: Basketball television programs
90
+ subauth: deprecated
91
+ position: 10
92
+ subject_uri: "http://id.loc.gov/authorities/genreForms/gf2011026080"
93
+ replacements:
94
+ maxRecords: '20'
98
95
  term:
99
96
  -
100
97
  identifier: "http://id.loc.gov/authorities/genreForms/gf2011026141"
98
+ -
99
+ identifier: "http://id.loc.gov/authorities/genreForms/gf2011026080"
@@ -1,27 +1,10 @@
1
1
  ---
2
2
  authority:
3
3
  service: ld4l_cache
4
+ context: true
4
5
  search:
5
6
  -
6
7
  query: science
7
- -
8
- query: science
9
- subauth: person
10
- -
11
- query: science
12
- subauth: organization
13
- -
14
- query: science
15
- subauth: place
16
- -
17
- query: science
18
- subauth: intangible
19
- -
20
- query: science
21
- subauth: geocoordinates
22
- -
23
- query: science
24
- subauth: work
25
8
  term:
26
9
  -
27
10
  identifier: 'http://id.loc.gov/authorities/subjects/sh2003008312'
@@ -5,54 +5,54 @@ search:
5
5
  -
6
6
  query: 'mark twain'
7
7
  replacements:
8
- maximumRecords: '4'
8
+ maxRecords: '4'
9
9
  -
10
10
  query: 'mark twain'
11
11
  subauth: person
12
12
  result_size: 100
13
13
  replacements:
14
- maximumRecords: '4'
14
+ maxRecords: '4'
15
15
  -
16
16
  query: 'mark twain'
17
17
  subauth: organization
18
18
  replacements:
19
- maximumRecords: '4'
19
+ maxRecords: '4'
20
20
  -
21
21
  query: Cayuga
22
22
  subauth: topic
23
23
  replacements:
24
- maximumRecords: '4'
24
+ maxRecords: '4'
25
25
  -
26
26
  query: Festival
27
27
  subauth: event_name
28
28
  replacements:
29
- maximumRecords: '4'
29
+ maxRecords: '4'
30
30
  -
31
31
  query: Cayuga
32
32
  subauth: geocoordinates
33
33
  replacements:
34
- maximumRecords: '4'
34
+ maxRecords: '4'
35
35
  -
36
36
  query: 'mark twain'
37
37
  subauth: uniform_title
38
38
  replacements:
39
- maximumRecords: '4'
39
+ maxRecords: '4'
40
40
  -
41
41
  query: '1276-1285'
42
42
  subauth: period
43
43
  result_size: 50
44
44
  replacements:
45
- maximumRecords: '4'
45
+ maxRecords: '4'
46
46
  -
47
47
  query: animation
48
48
  subauth: form
49
49
  replacements:
50
- maximumRecords: '4'
50
+ maxRecords: '4'
51
51
  -
52
52
  query: animation
53
53
  subauth: alt_lc
54
54
  replacements:
55
- maximumRecords: '4'
55
+ maxRecords: '4'
56
56
  term:
57
57
  -
58
58
  identifier: '1914919'