qa 3.1.0 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +16 -548
  3. data/app/controllers/qa/linked_data_terms_controller.rb +64 -42
  4. data/app/controllers/qa/terms_controller.rb +14 -6
  5. data/app/models/qa/iri_template/url_config.rb +47 -0
  6. data/app/models/qa/iri_template/variable_map.rb +62 -0
  7. data/app/models/qa/linked_data/config/context_map.rb +77 -0
  8. data/app/models/qa/linked_data/config/context_property_map.rb +144 -0
  9. data/app/models/qa/linked_data/config/helper.rb +34 -0
  10. data/app/services/qa/iri_template_service.rb +31 -0
  11. data/{lib/qa/authorities → app/services/qa}/linked_data/authority_service.rb +3 -4
  12. data/app/services/qa/linked_data/authority_url_service.rb +48 -0
  13. data/app/services/qa/linked_data/deep_sort_service.rb +238 -0
  14. data/app/services/qa/linked_data/graph_service.rb +106 -0
  15. data/app/services/qa/linked_data/language_service.rb +30 -0
  16. data/app/services/qa/linked_data/language_sort_service.rb +81 -0
  17. data/app/services/qa/linked_data/mapper/context_mapper_service.rb +59 -0
  18. data/app/services/qa/linked_data/mapper/graph_mapper_service.rb +40 -0
  19. data/app/services/qa/linked_data/mapper/search_results_mapper_service.rb +70 -0
  20. data/config/authorities/linked_data/loc.json +5 -2
  21. data/config/authorities/linked_data/oclc_fast.json +3 -2
  22. data/config/initializers/linked_data_authorities.rb +1 -1
  23. data/config/locales/qa.en.yml +9 -0
  24. data/lib/generators/qa/install/templates/config/initializers/qa.rb +4 -0
  25. data/lib/qa.rb +8 -0
  26. data/lib/qa/authorities/assign_fast/generic_authority.rb +1 -1
  27. data/lib/qa/authorities/base.rb +0 -11
  28. data/lib/qa/authorities/crossref/generic_authority.rb +1 -1
  29. data/lib/qa/authorities/geonames.rb +1 -1
  30. data/lib/qa/authorities/getty/aat.rb +7 -2
  31. data/lib/qa/authorities/getty/tgn.rb +7 -2
  32. data/lib/qa/authorities/getty/ulan.rb +7 -2
  33. data/lib/qa/authorities/linked_data.rb +0 -1
  34. data/lib/qa/authorities/linked_data/config.rb +29 -28
  35. data/lib/qa/authorities/linked_data/config/search_config.rb +21 -79
  36. data/lib/qa/authorities/linked_data/config/term_config.rb +7 -77
  37. data/lib/qa/authorities/linked_data/find_term.rb +25 -17
  38. data/lib/qa/authorities/linked_data/generic_authority.rb +6 -5
  39. data/lib/qa/authorities/linked_data/rdf_helper.rb +6 -73
  40. data/lib/qa/authorities/linked_data/search_query.rb +54 -101
  41. data/lib/qa/authorities/loc/generic_authority.rb +4 -4
  42. data/lib/qa/authorities/web_service_base.rb +1 -8
  43. data/lib/qa/configuration.rb +7 -0
  44. data/lib/qa/version.rb +1 -1
  45. data/lib/tasks/mesh.rake +19 -18
  46. data/spec/controllers/linked_data_terms_controller_spec.rb +51 -1
  47. data/spec/controllers/terms_controller_spec.rb +15 -15
  48. data/spec/fixtures/authorities/linked_data/lod_encoding_config.json +2 -1
  49. data/spec/fixtures/authorities/linked_data/lod_full_config.json +56 -2
  50. data/spec/fixtures/authorities/linked_data/lod_full_config_1_0.json +164 -0
  51. data/spec/fixtures/authorities/linked_data/lod_lang_defaults.json +5 -4
  52. data/spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json +3 -2
  53. data/spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json +3 -2
  54. data/spec/fixtures/authorities/linked_data/lod_lang_param.json +3 -2
  55. data/spec/fixtures/authorities/linked_data/lod_min_config.json +3 -2
  56. data/spec/fixtures/authorities/linked_data/lod_search_only_config.json +2 -1
  57. data/spec/fixtures/authorities/linked_data/lod_sort.json +2 -1
  58. data/spec/fixtures/authorities/linked_data/lod_term_id_param_config.json +2 -1
  59. data/spec/fixtures/authorities/linked_data/lod_term_only_config.json +2 -1
  60. data/spec/fixtures/authorities/linked_data/lod_term_uri_param_config.json +2 -1
  61. data/spec/fixtures/getty-error-response.txt +10 -0
  62. data/spec/fixtures/lod_2_ranked_2_unranked.nt +17 -0
  63. data/spec/fixtures/lod_3_ranked_varying_preds.nt +16 -0
  64. data/spec/fixtures/lod_lang_search_filtering.nt +11 -0
  65. data/spec/fixtures/lod_search_with_blanknode_subjects.nt +18 -0
  66. data/spec/fixtures/lod_term_with_blanknode_objects.nt +8 -0
  67. data/spec/lib/authorities/assign_fast_spec.rb +1 -0
  68. data/spec/lib/authorities/getty/aat_spec.rb +14 -2
  69. data/spec/lib/authorities/getty/tgn_spec.rb +14 -2
  70. data/spec/lib/authorities/getty/ulan_spec.rb +14 -2
  71. data/spec/lib/authorities/linked_data/authority_service_spec.rb +2 -1
  72. data/spec/lib/authorities/linked_data/config_spec.rb +284 -5
  73. data/spec/lib/authorities/linked_data/find_term_spec.rb +3 -1
  74. data/spec/lib/authorities/linked_data/generic_authority_spec.rb +92 -42
  75. data/spec/lib/authorities/linked_data/search_config_spec.rb +67 -160
  76. data/spec/lib/authorities/linked_data/search_query_spec.rb +3 -127
  77. data/spec/lib/authorities/linked_data/term_config_spec.rb +6 -134
  78. data/spec/lib/authorities/loc_spec.rb +9 -9
  79. data/spec/lib/configuration_spec.rb +20 -7
  80. data/spec/lib/tasks/mesh.rake_spec.rb +2 -2
  81. data/spec/models/iri_template/url_config_spec.rb +102 -0
  82. data/spec/models/iri_template/variable_map_spec.rb +105 -0
  83. data/spec/models/linked_data/config/context_map_spec.rb +148 -0
  84. data/spec/models/linked_data/config/context_property_map_spec.rb +286 -0
  85. data/spec/services/iri_template_service_spec.rb +69 -0
  86. data/spec/services/linked_data/authority_url_service_spec.rb +107 -0
  87. data/spec/services/linked_data/deep_sort_service_spec.rb +260 -0
  88. data/spec/services/linked_data/graph_service_spec.rb +232 -0
  89. data/spec/services/linked_data/language_service_spec.rb +66 -0
  90. data/spec/services/linked_data/language_sort_service_spec.rb +58 -0
  91. data/spec/services/linked_data/mapper/context_mapper_service_spec.rb +137 -0
  92. data/spec/services/linked_data/mapper/graph_mapper_service_spec.rb +110 -0
  93. data/spec/services/linked_data/mapper/search_results_mapper_service_spec.rb +109 -0
  94. data/spec/spec_helper.rb +10 -2
  95. metadata +81 -11
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'json'
2
3
 
3
4
  describe Qa::LinkedDataTermsController, type: :controller do
4
5
  before do
@@ -82,7 +83,7 @@ describe Qa::LinkedDataTermsController, type: :controller do
82
83
  describe '#list' do
83
84
  let(:expected_results) { ['Auth1', 'Auth2', 'Auth3'] }
84
85
  before do
85
- allow(Qa::Authorities::LinkedData::AuthorityService).to receive(:authority_names).and_return(expected_results)
86
+ allow(Qa::LinkedData::AuthorityService).to receive(:authority_names).and_return(expected_results)
86
87
  end
87
88
  it 'returns list of authorities' do
88
89
  get :list
@@ -166,6 +167,21 @@ describe Qa::LinkedDataTermsController, type: :controller do
166
167
  expect(response).to be_successful
167
168
  end
168
169
  end
170
+
171
+ context '3 search results with blank nodes removed' do
172
+ before do
173
+ stub_request(:get, 'http://experimental.worldcat.org/fast/search?maximumRecords=5&query=cql.any%20all%20%22ezra%22&sortKeys=usage')
174
+ .to_return(status: 200, body: webmock_fixture('lod_search_with_blanknode_subjects.nt'), headers: { 'Content-Type' => 'application/n-triples' })
175
+ end
176
+ it 'succeeds' do
177
+ get :search, params: { q: 'ezra', vocab: 'OCLC_FAST', maximumRecords: '5' }
178
+ expect(response).to be_successful
179
+ results = JSON.parse(response.body)
180
+ blank_nodes = results.select { |r| r['uri'].start_with?('_:b') }
181
+ expect(blank_nodes.size).to eq 0
182
+ expect(results.size).to eq 3
183
+ end
184
+ end
169
185
  end
170
186
 
171
187
  context 'in OCLC_FAST authority and personal_name subauthority' do
@@ -215,6 +231,29 @@ describe Qa::LinkedDataTermsController, type: :controller do
215
231
  end
216
232
  end
217
233
  end
234
+
235
+ context 'when processing context' do
236
+ before do
237
+ Qa.config.disable_cors_headers
238
+ stub_request(:get, 'http://experimental.worldcat.org/fast/search?maximumRecords=3&query=cql.any%20all%20%22cornell%22&sortKeys=usage')
239
+ .to_return(status: 200, body: webmock_fixture('lod_oclc_all_query_3_results.rdf.xml'), headers: { 'Content-Type' => 'application/rdf+xml' })
240
+ end
241
+ it "returns basic data + context when context='true'" do
242
+ get :search, params: { q: 'cornell', vocab: 'OCLC_FAST', maximumRecords: '3', context: 'true' }
243
+ expect(response).to be_successful
244
+ results = JSON.parse(response.body)
245
+ expect(results.size).to eq 3
246
+ expect(results.first.key?('context')).to be true
247
+ end
248
+
249
+ it "returns basic data only when context='false'" do
250
+ get :search, params: { q: 'cornell', vocab: 'OCLC_FAST', maximumRecords: '3', context: 'false' }
251
+ expect(response).to be_successful
252
+ results = JSON.parse(response.body)
253
+ expect(results.size).to eq 3
254
+ expect(results.first.key?('context')).to be false
255
+ end
256
+ end
218
257
  end
219
258
 
220
259
  describe '#show' do
@@ -437,6 +476,17 @@ describe Qa::LinkedDataTermsController, type: :controller do
437
476
  expect(JSON.parse(response.body).keys).to match_array ["@context", "@graph"]
438
477
  end
439
478
  end
479
+
480
+ context 'blank nodes not included in predicates list' do
481
+ before do
482
+ stub_request(:get, 'http://localhost/test_default/term?uri=http://test.org/530369wbn')
483
+ .to_return(status: 200, body: webmock_fixture('lod_term_with_blanknode_objects.nt'), headers: { 'Content-Type' => 'application/n-triples' })
484
+ end
485
+ it 'succeeds' do
486
+ get :fetch, params: { uri: 'http://test.org/530369wbn', vocab: 'LOD_TERM_URI_PARAM_CONFIG' }
487
+ expect(response).to be_successful
488
+ end
489
+ end
440
490
  end
441
491
 
442
492
  context 'when cors headers are enabled' do
@@ -6,29 +6,29 @@ describe Qa::TermsController, type: :controller do
6
6
  end
7
7
 
8
8
  describe "#check_vocab_param" do
9
- it "returns 404 if the vocabulary is missing" do
9
+ it "returns 400 if the vocabulary is missing" do
10
10
  get :search, params: { q: "a query", vocab: "" }
11
- expect(response.code).to eq("404")
11
+ expect(response.code).to eq("400")
12
12
  end
13
13
  end
14
14
 
15
15
  describe "#check_query_param" do
16
- it "returns 404 if the query is missing" do
16
+ it "returns 400 if the query is missing" do
17
17
  get :search, params: { q: "", vocab: "tgnlang" }
18
- expect(response.code).to eq("404")
18
+ expect(response.code).to eq("400")
19
19
  end
20
20
  end
21
21
 
22
22
  describe "#init_authority" do
23
23
  context "when the authority does not exist" do
24
- it "returns 404" do
24
+ it "returns 400" do
25
25
  expect(Rails.logger).to receive(:warn).with("Unable to initialize authority Qa::Authorities::Non-existent-authority")
26
26
  get :search, params: { q: "a query", vocab: "non-existent-authority" }
27
- expect(response.code).to eq("404")
27
+ expect(response.code).to eq("400")
28
28
  end
29
29
  end
30
30
  context "when a sub-authority does not exist" do
31
- it "returns 404 if a sub-authority does not exist" do
31
+ it "returns 400 if a sub-authority does not exist" do
32
32
  msg = "Unable to initialize sub-authority non-existent-subauthority for Qa::Authorities::Loc. Valid sub-authorities are " \
33
33
  "[\"subjects\", \"names\", \"classification\", \"childrensSubjects\", \"genreForms\", \"performanceMediums\", " \
34
34
  "\"graphicMaterials\", \"organizations\", \"relators\", \"countries\", \"ethnographicTerms\", \"geographicAreas\", " \
@@ -40,17 +40,17 @@ describe Qa::TermsController, type: :controller do
40
40
  "\"signatureEncoding\", \"signatureMethod\", \"softwareType\", \"storageMedium\"]"
41
41
  expect(Rails.logger).to receive(:warn).with(msg)
42
42
  get :search, params: { q: "a query", vocab: "loc", subauthority: "non-existent-subauthority" }
43
- expect(response.code).to eq("404")
43
+ expect(response.code).to eq("400")
44
44
  end
45
45
  end
46
46
  context "when a sub-authority is absent" do
47
- it "returns 404 for LOC" do
47
+ it "returns 400 for LOC" do
48
48
  get :search, params: { q: "a query", vocab: "loc" }
49
- expect(response.code).to eq("404")
49
+ expect(response.code).to eq("400")
50
50
  end
51
- it "returns 404 for oclcts" do
51
+ it "returns 400 for oclcts" do
52
52
  get :search, params: { q: "a query", vocab: "oclcts" }
53
- expect(response.code).to eq("404")
53
+ expect(response.code).to eq("400")
54
54
  end
55
55
  end
56
56
  end
@@ -78,7 +78,7 @@ describe Qa::TermsController, type: :controller do
78
78
 
79
79
  context "loc" do
80
80
  before do
81
- stub_request(:get, "https://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
81
+ stub_request(:get, "http://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
82
82
  .with(headers: { 'Accept' => 'application/json' })
83
83
  .to_return(body: webmock_fixture("loc-names-response.txt"), status: 200)
84
84
  end
@@ -88,7 +88,7 @@ describe Qa::TermsController, type: :controller do
88
88
  expect(response).to be_successful
89
89
  end
90
90
 
91
- it "does not return 404 if subauthority is valid" do
91
+ it "does not return 400 if subauthority is valid" do
92
92
  get :search, params: { q: "Berry", vocab: "loc", subauthority: "names" }
93
93
  expect(response).to be_successful
94
94
  end
@@ -184,7 +184,7 @@ describe Qa::TermsController, type: :controller do
184
184
  describe "#show" do
185
185
  context "with supported authorities" do
186
186
  before do
187
- stub_request(:get, "https://id.loc.gov/authorities/subjects/sh85077565.json")
187
+ stub_request(:get, "http://id.loc.gov/authorities/subjects/sh85077565.json")
188
188
  .with(headers: { 'Accept' => 'application/json' })
189
189
  .to_return(status: 200, body: webmock_fixture("loc-names-response.txt"), headers: {})
190
190
  end
@@ -1,4 +1,5 @@
1
1
  {
2
+ "QA_CONFIG_VERSION": "2.0",
2
3
  "term": {
3
4
  "url": {
4
5
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
@@ -48,7 +49,7 @@
48
49
  "url": {
49
50
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
50
51
  "@type": "IriTemplate",
51
- "template": "http://localhost/test_default/search?query={?query}&{?encode_true}&{?encode_false}&{?encode_not_specified}",
52
+ "template": "http://localhost/test_default/search?{?query}&{?encode_true}&{?encode_false}&{?encode_not_specified}",
52
53
  "variableRepresentation": "BasicRepresentation",
53
54
  "mapping": [
54
55
  {
@@ -1,9 +1,14 @@
1
1
  {
2
+ "QA_CONFIG_VERSION": "2.0",
3
+ "prefixes": {
4
+ "schema": "http://www.w3.org/2000/01/rdf-schema#",
5
+ "skos": "http://www.w3.org/2004/02/skos/core#"
6
+ },
2
7
  "term": {
3
8
  "url": {
4
9
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
5
10
  "@type": "IriTemplate",
6
- "template": "http://localhost/test_default/term/{?subauth}/{?term_id}?param1={?param1}&param2={?param2}",
11
+ "template": "http://localhost/test_default/term/{subauth}/{term_id}?{?param1}&{?param2}",
7
12
  "variableRepresentation": "BasicRepresentation",
8
13
  "mapping": [
9
14
  {
@@ -59,7 +64,7 @@
59
64
  "url": {
60
65
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
61
66
  "@type": "IriTemplate",
62
- "template": "http://localhost/test_default/search?subauth={?subauth}&query={?query}&param1={?param1}&param2={?param2}",
67
+ "template": "http://localhost/test_default/search?{?subauth}&{?query}&{?param1}&{?param2}",
63
68
  "variableRepresentation": "BasicRepresentation",
64
69
  "mapping": [
65
70
  {
@@ -102,6 +107,55 @@
102
107
  "altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
103
108
  "sort_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel"
104
109
  },
110
+ "context": {
111
+ "groups": {
112
+ "dates": {
113
+ "group_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.dates",
114
+ "group_label_default": "Dates"
115
+ },
116
+ "hierarchy": {
117
+ "group_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.hierarchy",
118
+ "group_label_default": "Hierarchy"
119
+ }
120
+ },
121
+ "properties": [
122
+ {
123
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.authoritative_label",
124
+ "property_label_default": "Authoritative Label",
125
+ "ldpath": "madsrdf:authoritativeLabel",
126
+ "selectable": true,
127
+ "drillable": false
128
+ },
129
+ {
130
+ "group_id": "dates",
131
+ "property_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.birth_date",
132
+ "property_label_default": "Birth",
133
+ "ldpath": "madsrdf:identifiesRWO/madsrdf:birthDate/schema:label",
134
+ "selectable": false,
135
+ "drillable": false
136
+ },
137
+ {
138
+ "group_id": "hierarchy",
139
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.narrower",
140
+ "property_label_default": "Narrower",
141
+ "ldpath": "skos:narrower :: xsd:string",
142
+ "selectable": true,
143
+ "drillable": true,
144
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
145
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
146
+ },
147
+ {
148
+ "group_id": "hierarchy",
149
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.broader",
150
+ "property_label_default": "Broader",
151
+ "ldpath": "skos:broader :: xsd:string",
152
+ "selectable": true,
153
+ "drillable": true,
154
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
155
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
156
+ }
157
+ ]
158
+ },
105
159
  "subauthorities": {
106
160
  "search_sub1_key": "search_sub1_name",
107
161
  "search_sub2_key": "search_sub2_name",
@@ -0,0 +1,164 @@
1
+ {
2
+ "prefixes": {
3
+ "schema": "http://www.w3.org/2000/01/rdf-schema#",
4
+ "skos": "http://www.w3.org/2004/02/skos/core#"
5
+ },
6
+ "term": {
7
+ "url": {
8
+ "@context": "http://www.w3.org/ns/hydra/context.jsonld",
9
+ "@type": "IriTemplate",
10
+ "template": "http://localhost/test_default/term/{?subauth}/{?term_id}?param1={?param1}&param2={?param2}",
11
+ "variableRepresentation": "BasicRepresentation",
12
+ "mapping": [
13
+ {
14
+ "@type": "IriTemplateMapping",
15
+ "variable": "term_id",
16
+ "property": "hydra:freetextQuery",
17
+ "required": true
18
+ },
19
+ {
20
+ "@type": "IriTemplateMapping",
21
+ "variable": "subauth",
22
+ "property": "hydra:freetextQuery",
23
+ "required": false,
24
+ "default": "term_sub2_name"
25
+ },
26
+ {
27
+ "@type": "IriTemplateMapping",
28
+ "variable": "param1",
29
+ "property": "hydra:freetextQuery",
30
+ "required": false,
31
+ "default": "alpha"
32
+ },
33
+ {
34
+ "@type": "IriTemplateMapping",
35
+ "variable": "param2",
36
+ "property": "hydra:freetextQuery",
37
+ "required": false,
38
+ "default": "beta"
39
+ }
40
+ ]
41
+ },
42
+ "qa_replacement_patterns": {
43
+ "term_id": "term_id",
44
+ "subauth": "subauth"
45
+ },
46
+ "term_id": "ID",
47
+ "language": [ "en" ],
48
+ "results": {
49
+ "id_predicate": "http://purl.org/dc/terms/identifier",
50
+ "label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
51
+ "altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
52
+ "broader_predicate": "http://www.w3.org/2004/02/skos/core#broader",
53
+ "narrower_predicate": "http://www.w3.org/2004/02/skos/core#narrower",
54
+ "sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
55
+ },
56
+ "subauthorities": {
57
+ "term_sub1_key": "term_sub1_name",
58
+ "term_sub2_key": "term_sub2_name",
59
+ "term_sub3_key": "term_sub3_name"
60
+ }
61
+ },
62
+ "search": {
63
+ "url": {
64
+ "@context": "http://www.w3.org/ns/hydra/context.jsonld",
65
+ "@type": "IriTemplate",
66
+ "template": "http://localhost/test_default/search?subauth={?subauth}&query={?query}&param1={?param1}&param2={?param2}",
67
+ "variableRepresentation": "BasicRepresentation",
68
+ "mapping": [
69
+ {
70
+ "@type": "IriTemplateMapping",
71
+ "variable": "query",
72
+ "property": "hydra:freetextQuery",
73
+ "required": true
74
+ },
75
+ {
76
+ "@type": "IriTemplateMapping",
77
+ "variable": "subauth",
78
+ "property": "hydra:freetextQuery",
79
+ "required": false,
80
+ "default": "search_sub1_name"
81
+ },
82
+ {
83
+ "@type": "IriTemplateMapping",
84
+ "variable": "param1",
85
+ "property": "hydra:freetextQuery",
86
+ "required": false,
87
+ "default": "delta"
88
+ },
89
+ {
90
+ "@type": "IriTemplateMapping",
91
+ "variable": "param2",
92
+ "property": "hydra:freetextQuery",
93
+ "required": false,
94
+ "default": "echo"
95
+ }
96
+ ]
97
+ },
98
+ "qa_replacement_patterns": {
99
+ "query": "query",
100
+ "subauth": "subauth"
101
+ },
102
+ "language": [ "en", "fr", "de" ],
103
+ "results": {
104
+ "id_predicate": "http://purl.org/dc/terms/identifier",
105
+ "label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
106
+ "altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
107
+ "sort_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel"
108
+ },
109
+ "context": {
110
+ "groups": {
111
+ "dates": {
112
+ "group_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.dates",
113
+ "group_label_default": "Dates"
114
+ },
115
+ "hierarchy": {
116
+ "group_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.hierarchy",
117
+ "group_label_default": "Hierarchy"
118
+ }
119
+ },
120
+ "properties": [
121
+ {
122
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.authoritative_label",
123
+ "property_label_default": "Authoritative Label",
124
+ "ldpath": "madsrdf:authoritativeLabel",
125
+ "selectable": true,
126
+ "drillable": false
127
+ },
128
+ {
129
+ "group_id": "dates",
130
+ "property_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.birth_date",
131
+ "property_label_default": "Birth",
132
+ "ldpath": "madsrdf:identifiesRWO/madsrdf:birthDate/schema:label",
133
+ "selectable": false,
134
+ "drillable": false
135
+ },
136
+ {
137
+ "group_id": "hierarchy",
138
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.narrower",
139
+ "property_label_default": "Narrower",
140
+ "ldpath": "skos:narrower :: xsd:string",
141
+ "selectable": true,
142
+ "drillable": true,
143
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
144
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
145
+ },
146
+ {
147
+ "group_id": "hierarchy",
148
+ "property_label_i18n": "qa.linked_data.authority.locgenres_ld4l_cache.broader",
149
+ "property_label_default": "Broader",
150
+ "ldpath": "skos:broader :: xsd:string",
151
+ "selectable": true,
152
+ "drillable": true,
153
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
154
+ "expansion_id_ldpath": "loc:lccn ::xsd:string"
155
+ }
156
+ ]
157
+ },
158
+ "subauthorities": {
159
+ "search_sub1_key": "search_sub1_name",
160
+ "search_sub2_key": "search_sub2_name",
161
+ "search_sub3_key": "search_sub3_name"
162
+ }
163
+ }
164
+ }
@@ -1,9 +1,10 @@
1
1
  {
2
+ "QA_CONFIG_VERSION": "2.0",
2
3
  "term": {
3
4
  "url": {
4
5
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
5
6
  "@type": "IriTemplate",
6
- "template": "http://localhost/test_default/term/{?term_id}",
7
+ "template": "http://localhost/test_default/term/{term_id}",
7
8
  "variableRepresentation": "BasicRepresentation",
8
9
  "mapping": [
9
10
  {
@@ -18,7 +19,7 @@
18
19
  "term_id": "term_id"
19
20
  },
20
21
  "term_id": "ID",
21
- "language": [ "en" ],
22
+ "language": [ "fr" ],
22
23
  "results": {
23
24
  "id_predicate": "http://id.loc.gov/vocabulary/identifiers/lccn",
24
25
  "label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
@@ -29,7 +30,7 @@
29
30
  "url": {
30
31
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
31
32
  "@type": "IriTemplate",
32
- "template": "http://localhost/test_default/search?query={?query}",
33
+ "template": "http://localhost/test_default/search?{?query}",
33
34
  "variableRepresentation": "BasicRepresentation",
34
35
  "mapping": [
35
36
  {
@@ -43,7 +44,7 @@
43
44
  "qa_replacement_patterns": {
44
45
  "query": "query"
45
46
  },
46
- "language": [ "en" ],
47
+ "language": [ "fr" ],
47
48
  "results": {
48
49
  "id_predicate": "http://purl.org/dc/terms/identifier",
49
50
  "label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",