qa_server 0.1.99
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.
- checksums.yaml +7 -0
- data/.gitignore +71 -0
- data/Gemfile +55 -0
- data/Gemfile.lock +411 -0
- data/LICENSE +201 -0
- data/README.md +187 -0
- data/Rakefile +18 -0
- data/app/assets/images/qa_server/LD4L-bg.png +0 -0
- data/app/assets/images/qa_server/cornell-reduced-white.svg +160 -0
- data/app/assets/images/qa_server/iowa-logo.png +0 -0
- data/app/assets/images/qa_server/samvera-fall-font1-1000w-light.png +0 -0
- data/app/assets/javascripts/qa_server.js +0 -0
- data/app/assets/stylesheets/qa_server/_authorities.scss +0 -0
- data/app/assets/stylesheets/qa_server/_check-status.scss +72 -0
- data/app/assets/stylesheets/qa_server/_footer.scss +20 -0
- data/app/assets/stylesheets/qa_server/_header.scss +51 -0
- data/app/assets/stylesheets/qa_server/_home-page.scss +15 -0
- data/app/assets/stylesheets/qa_server/_monitor-status.scss +13 -0
- data/app/assets/stylesheets/qa_server/_qa_server.scss +36 -0
- data/app/assets/stylesheets/qa_server/_styles.scss +27 -0
- data/app/assets/stylesheets/qa_server/_usage.scss +0 -0
- data/app/controllers/qa_server/authority_list_controller.rb +14 -0
- data/app/controllers/qa_server/authority_validation_controller.rb +77 -0
- data/app/controllers/qa_server/check_status_controller.rb +38 -0
- data/app/controllers/qa_server/homepage_controller.rb +8 -0
- data/app/controllers/qa_server/monitor_status_controller.rb +79 -0
- data/app/controllers/qa_server/usage_controller.rb +8 -0
- data/app/loggers/qa_server/scenario_logger.rb +84 -0
- data/app/models/qa_server/authority_scenario.rb +35 -0
- data/app/models/qa_server/authority_status.rb +18 -0
- data/app/models/qa_server/authority_status_failure.rb +7 -0
- data/app/models/qa_server/scenarios.rb +71 -0
- data/app/models/qa_server/search_scenario.rb +58 -0
- data/app/models/qa_server/term_scenario.rb +50 -0
- data/app/presenters/qa_server/authority_list_presenter.rb +22 -0
- data/app/presenters/qa_server/check_status_presenter.rb +96 -0
- data/app/presenters/qa_server/monitor_status_presenter.rb +108 -0
- data/app/services/qa_server/authority_lister_service.rb +31 -0
- data/app/services/qa_server/authority_loader_service.rb +38 -0
- data/app/services/qa_server/authority_validator_service.rb +41 -0
- data/app/services/qa_server/database_migrator.rb +70 -0
- data/app/services/qa_server/scenarios_loader_service.rb +57 -0
- data/app/validators/qa_server/scenario_validator.rb +134 -0
- data/app/validators/qa_server/search_scenario_validator.rb +84 -0
- data/app/validators/qa_server/term_scenario_validator.rb +42 -0
- data/app/views/layouts/qa_server.html.erb +65 -0
- data/app/views/qa_server/authority_list/index.html.erb +27 -0
- data/app/views/qa_server/check_status/index.html.erb +104 -0
- data/app/views/qa_server/homepage/index.html.erb +10 -0
- data/app/views/qa_server/monitor_status/index.html.erb +78 -0
- data/app/views/qa_server/usage/index.html.erb +106 -0
- data/app/views/shared/_footer.html.erb +24 -0
- data/config/locales/qa_server.en.yml +68 -0
- data/config/routes.rb +12 -0
- data/lib/generators/qa_server/assets_generator.rb +35 -0
- data/lib/generators/qa_server/config_generator.rb +31 -0
- data/lib/generators/qa_server/install_generator.rb +60 -0
- data/lib/generators/qa_server/models_generator.rb +18 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_direct.json +69 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_ld4l_cache.json +85 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_direct.json +36 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_ld4l_cache.json +83 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_direct.json +68 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_ld4l_cache.json +102 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json +109 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json +72 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json +81 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/loc_direct.json +47 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locgenres_ld4l_cache.json +99 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_ld4l_cache.json +89 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locsubjects_ld4l_cache.json +82 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/mesh_ld4l_cache.json +70 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/nalt_direct.json +32 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/nalt_ld4l_cache.json +84 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_direct.json +81 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_ld4l_cache.json +86 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_direct_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_ld4l_cache_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/dbpedia_direct_validation.yml +6 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/dbpedia_ld4l_cache_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_direct_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_ld4l_cache_validation.yml +41 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_aat_ld4l_cache_validation.yml +115 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_tgn_ld4l_cache_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_ulan_ld4l_cache_validation.yml +15 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/loc_direct_validation.yml +25 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/loc_validation.yml +22 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locgenres_ld4l_cache_validation.yml +99 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locnames_ld4l_cache_validation.yml +27 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locsubjects_ld4l_cache_validation.yml +27 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/mesh_ld4l_cache_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/nalt_direct_validation.yml +6 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/nalt_ld4l_cache_validation.yml +9 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclc_fast_validation.yml +58 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclcfast_direct_validation.yml +58 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclcfast_ld4l_cache_validation.yml +30 -0
- data/lib/generators/qa_server/templates/config/locales/qa_server.en.yml +9 -0
- data/lib/generators/qa_server/templates/db/migrate/20180313045551_create_cron_authority_status.rb.erb +9 -0
- data/lib/generators/qa_server/templates/db/migrate/20180508045549_rename_cron_authority_status_to_authority_status.rb.erb +5 -0
- data/lib/generators/qa_server/templates/db/migrate/20180508045551_create_authority_status_failure.rb.erb +15 -0
- data/lib/generators/qa_server/templates/qa_server.scss +5 -0
- data/lib/qa_server/engine.rb +19 -0
- data/lib/qa_server/version.rb +3 -0
- data/lib/qa_server.rb +6 -0
- data/lib/tasks/install.rake +8 -0
- data/lib/tasks/qa_server_tasks.rake +4 -0
- data/qa_server.gemspec +39 -0
- data/spec/.gitignore +1 -0
- data/spec/rails_helper.rb +2 -0
- data/spec/spec_helper.rb +283 -0
- data/spec/test_app_templates/Gemfile.extra +5 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +15 -0
- data/tasks/qa_server_dev.rake +16 -0
- metadata +275 -0
data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_ld4l_cache.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/geonames_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"label_predicate": "http://www.geonames.org/ontology#name",
|
|
24
|
+
"altlabel_predicate": "http://www.geonames.org/ontology#countryCode",
|
|
25
|
+
"broader_predicate": "http://www.geonames.org/ontology#parentFeature",
|
|
26
|
+
"sameas_predicate": "http://www.w3.org/2000/01/rdf-schema#seeAlso"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"search": {
|
|
30
|
+
"url": {
|
|
31
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
32
|
+
"@type": "IriTemplate",
|
|
33
|
+
"template": "http://services.ld4l.org/ld4l_services/geonames_batch.jsp?query={?query}&entity={?subauth}&maxRecords={?maxRecords}&lang={?lang}",
|
|
34
|
+
"variableRepresentation": "BasicRepresentation",
|
|
35
|
+
"mapping": [
|
|
36
|
+
{
|
|
37
|
+
"@type": "IriTemplateMapping",
|
|
38
|
+
"variable": "query",
|
|
39
|
+
"property": "hydra:freetextQuery",
|
|
40
|
+
"required": true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"@type": "IriTemplateMapping",
|
|
44
|
+
"variable": "subauth",
|
|
45
|
+
"property": "hydra:freetextQuery",
|
|
46
|
+
"required": false,
|
|
47
|
+
"default": "all"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"@type": "IriTemplateMapping",
|
|
51
|
+
"variable": "maxRecords",
|
|
52
|
+
"property": "hydra:freetextQuery",
|
|
53
|
+
"required": false,
|
|
54
|
+
"default": "20"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"@type": "IriTemplateMapping",
|
|
58
|
+
"variable": "lang",
|
|
59
|
+
"property": "hydra:freetextQuery",
|
|
60
|
+
"required": false,
|
|
61
|
+
"default": "en"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"qa_replacement_patterns": {
|
|
66
|
+
"query": "query",
|
|
67
|
+
"subauth": "subauth"
|
|
68
|
+
},
|
|
69
|
+
"language": ["en"],
|
|
70
|
+
"results": {
|
|
71
|
+
"label_predicate": "http://www.geonames.org/ontology#name",
|
|
72
|
+
"altlabel_predicate": "http://www.geonames.org/ontology#countryCode",
|
|
73
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank",
|
|
74
|
+
"context": {
|
|
75
|
+
"Parent": "http://www.geonames.org/ontology#parentADM1",
|
|
76
|
+
"Parent2": "http://www.geonames.org/ontology#parentADM2",
|
|
77
|
+
"Parent Country": "http://www.geonames.org/ontology#parentCountry",
|
|
78
|
+
"Children": "http://www.geonames.org/ontology#childrenFeatures",
|
|
79
|
+
"Country": "http://www.geonames.org/ontology#countryCode",
|
|
80
|
+
"Population": "http://www.geonames.org/ontology#population",
|
|
81
|
+
"Latitude": "http://www.w3.org/2003/01/geo/wgs84_pos#lat",
|
|
82
|
+
"Longitude": "http://www.w3.org/2003/01/geo/wgs84_pos#long",
|
|
83
|
+
"Altitude": "http://www.w3.org/2003/01/geo/wgs84_pos#alt",
|
|
84
|
+
"Feature Class": "http://www.geonames.org/ontology#featureClass",
|
|
85
|
+
"Feature Code": "http://www.geonames.org/ontology#featureCode"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"subauthorities": {
|
|
89
|
+
"area": "A",
|
|
90
|
+
"place": "P",
|
|
91
|
+
"area_and_place": "AP",
|
|
92
|
+
"water": "H",
|
|
93
|
+
"park": "L",
|
|
94
|
+
"road": "R",
|
|
95
|
+
"spot": "S",
|
|
96
|
+
"terrain": "T",
|
|
97
|
+
"undersea": "U",
|
|
98
|
+
"vegetation": "V",
|
|
99
|
+
"all": "all"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
24
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
25
|
+
"broader_predicate": "http://www.w3.org/2004/02/skos/core#broader",
|
|
26
|
+
"narrower_predicate": "http://www.w3.org/2004/02/skos/core#narrower",
|
|
27
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"search": {
|
|
31
|
+
"url": {
|
|
32
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
33
|
+
"@type": "IriTemplate",
|
|
34
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_batch.jsp?query={?query}{?subauth}&entity=Concept&maxRecords={?maxRecords}&lang={?lang}",
|
|
35
|
+
"variableRepresentation": "BasicRepresentation",
|
|
36
|
+
"mapping": [
|
|
37
|
+
{
|
|
38
|
+
"@type": "IriTemplateMapping",
|
|
39
|
+
"variable": "query",
|
|
40
|
+
"property": "hydra:freetextQuery",
|
|
41
|
+
"required": true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"@type": "IriTemplateMapping",
|
|
45
|
+
"variable": "subauth",
|
|
46
|
+
"property": "hydra:freetextQuery",
|
|
47
|
+
"required": false,
|
|
48
|
+
"default": ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"@type": "IriTemplateMapping",
|
|
52
|
+
"variable": "maxRecords",
|
|
53
|
+
"property": "hydra:freetextQuery",
|
|
54
|
+
"required": false,
|
|
55
|
+
"default": "20"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"@type": "IriTemplateMapping",
|
|
59
|
+
"variable": "lang",
|
|
60
|
+
"property": "hydra:freetextQuery",
|
|
61
|
+
"required": false,
|
|
62
|
+
"default": "en"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"qa_replacement_patterns": {
|
|
67
|
+
"query": "query",
|
|
68
|
+
"subauth": "subauth"
|
|
69
|
+
},
|
|
70
|
+
"results": {
|
|
71
|
+
"id_predicate": "http://purl.org/dc/terms/identifier",
|
|
72
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
73
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank"
|
|
74
|
+
},
|
|
75
|
+
"subauthorities": {
|
|
76
|
+
"Activities": "&facet=300264090",
|
|
77
|
+
"Activities__Disciplines": "&facet=300054134",
|
|
78
|
+
"Activities__Events": "&facet=300054722",
|
|
79
|
+
"Activities__Functions": "&facet=300054593",
|
|
80
|
+
"Activities__Physical_and_Mental": "&facet=300222468",
|
|
81
|
+
"Activities__Processes_and_Techniques": "&facet=300053001",
|
|
82
|
+
"Agents": "&facet=300264089",
|
|
83
|
+
"Agents__Living_Organisms": "&facet=300265673",
|
|
84
|
+
"Agents__Organizations": "&facet=300234770",
|
|
85
|
+
"Agents__People": "&facet=300024978",
|
|
86
|
+
"Associated_Concepts": "&facet=300264086",
|
|
87
|
+
"Associated_Concepts__Associated_Concepts": "&facet=300055126",
|
|
88
|
+
"Brand_Names": "&facet=300343372",
|
|
89
|
+
"Brand_Names__Brand_Names": "&facet=300379011",
|
|
90
|
+
"Materials": "&facet=300264091",
|
|
91
|
+
"Materials__Materials": "&facet=300010357",
|
|
92
|
+
"Objects": "&facet=300264092",
|
|
93
|
+
"Objects__Built_Environment": "&facet=300264550",
|
|
94
|
+
"Objects__Components": "&facet=300241490",
|
|
95
|
+
"Objects__Furnishings_and_Equipment": "&facet=300264551",
|
|
96
|
+
"Objects__Object_Genres": "&facet=300185711",
|
|
97
|
+
"Objects__Object_Groupings and Systems": "&facet=300241489",
|
|
98
|
+
"Objects__Visual_and_Verbal_Communication": "&facet=300264552",
|
|
99
|
+
"Physical_Attributes": "&facet=300264087",
|
|
100
|
+
"Physical_Attributes__Attributes_and_Properties": "&facet=300123559",
|
|
101
|
+
"Physical_Attributes__Color": "&facet=300131647",
|
|
102
|
+
"Physical_Attributes__Conditions_and_Effects": "&facet=300186269",
|
|
103
|
+
"Physical_Attributes__Design_Elements": "&facet=300123558",
|
|
104
|
+
"Styles_and_Periods": "&facet=300264088",
|
|
105
|
+
"Styles_and_Periods__Styles_and_Periods": "&facet=300015646"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
24
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
25
|
+
"broader_predicate": "http://www.w3.org/2004/02/skos/core#broader",
|
|
26
|
+
"narrower_predicate": "http://www.w3.org/2004/02/skos/core#narrower",
|
|
27
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"search": {
|
|
31
|
+
"url": {
|
|
32
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
33
|
+
"@type": "IriTemplate",
|
|
34
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_batch.jsp?query={?query}&entity=Place&maxRecords={?maxRecords}&lang={?lang}",
|
|
35
|
+
"variableRepresentation": "BasicRepresentation",
|
|
36
|
+
"mapping": [
|
|
37
|
+
{
|
|
38
|
+
"@type": "IriTemplateMapping",
|
|
39
|
+
"variable": "query",
|
|
40
|
+
"property": "hydra:freetextQuery",
|
|
41
|
+
"required": true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"@type": "IriTemplateMapping",
|
|
45
|
+
"variable": "maxRecords",
|
|
46
|
+
"property": "hydra:freetextQuery",
|
|
47
|
+
"required": false,
|
|
48
|
+
"default": "20"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"@type": "IriTemplateMapping",
|
|
52
|
+
"variable": "lang",
|
|
53
|
+
"property": "hydra:freetextQuery",
|
|
54
|
+
"required": false,
|
|
55
|
+
"default": "en"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"qa_replacement_patterns": {
|
|
60
|
+
"query": "query"
|
|
61
|
+
},
|
|
62
|
+
"results": {
|
|
63
|
+
"id_predicate": "http://purl.org/dc/terms/identifier",
|
|
64
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
65
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank",
|
|
66
|
+
"context": {
|
|
67
|
+
"Parent": "http://vocab.getty.edu/ontology#parentString"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
24
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
25
|
+
"broader_predicate": "http://www.w3.org/2004/02/skos/core#broader",
|
|
26
|
+
"narrower_predicate": "http://www.w3.org/2004/02/skos/core#narrower",
|
|
27
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"search": {
|
|
31
|
+
"url": {
|
|
32
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
33
|
+
"@type": "IriTemplate",
|
|
34
|
+
"template": "http://services.ld4l.org/ld4l_services/getty_batch.jsp?query={?query}&entity={?subauth}&maxRecords={?maxRecords}&lang={?lang}",
|
|
35
|
+
"variableRepresentation": "BasicRepresentation",
|
|
36
|
+
"mapping": [
|
|
37
|
+
{
|
|
38
|
+
"@type": "IriTemplateMapping",
|
|
39
|
+
"variable": "query",
|
|
40
|
+
"property": "hydra:freetextQuery",
|
|
41
|
+
"required": true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"@type": "IriTemplateMapping",
|
|
45
|
+
"variable": "subauth",
|
|
46
|
+
"property": "hydra:freetextQuery",
|
|
47
|
+
"required": false,
|
|
48
|
+
"default": "Person+Organization"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"@type": "IriTemplateMapping",
|
|
52
|
+
"variable": "maxRecords",
|
|
53
|
+
"property": "hydra:freetextQuery",
|
|
54
|
+
"required": false,
|
|
55
|
+
"default": "20"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"@type": "IriTemplateMapping",
|
|
59
|
+
"variable": "lang",
|
|
60
|
+
"property": "hydra:freetextQuery",
|
|
61
|
+
"required": false,
|
|
62
|
+
"default": "en"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"qa_replacement_patterns": {
|
|
67
|
+
"query": "query",
|
|
68
|
+
"subauth": "subauth"
|
|
69
|
+
},
|
|
70
|
+
"results": {
|
|
71
|
+
"id_predicate": "http://purl.org/dc/terms/identifier",
|
|
72
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
73
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank"
|
|
74
|
+
},
|
|
75
|
+
"subauthorities": {
|
|
76
|
+
"person": "Person",
|
|
77
|
+
"organization": "Organization"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://id.loc.gov/authorities/{?subauth}/{?term_id}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_id",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"@type": "IriTemplateMapping",
|
|
17
|
+
"variable": "subauth",
|
|
18
|
+
"property": "hydra:freetextQuery",
|
|
19
|
+
"required": false,
|
|
20
|
+
"default": "names"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"qa_replacement_patterns": {
|
|
25
|
+
"term_id": "term_id",
|
|
26
|
+
"subauth": "subauth"
|
|
27
|
+
},
|
|
28
|
+
"term_id": "ID",
|
|
29
|
+
"language": ["en"],
|
|
30
|
+
"results": {
|
|
31
|
+
"id_predicate": "http://id.loc.gov/vocabulary/identifiers/lccn",
|
|
32
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
33
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
34
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
35
|
+
},
|
|
36
|
+
"subauthorities": {
|
|
37
|
+
"subjects": "subjects",
|
|
38
|
+
"names": "names",
|
|
39
|
+
"classification": "classification",
|
|
40
|
+
"child_subject": "childrensSubjects",
|
|
41
|
+
"genre": "genreForms",
|
|
42
|
+
"demographic": "demographicTerms",
|
|
43
|
+
"music_performance": "performanceMediums"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"search": {}
|
|
47
|
+
}
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locgenres_ld4l_cache.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/loc_genre_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"id_predicate": "http://id.loc.gov/vocabulary/identifiers/lccn",
|
|
24
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
25
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
26
|
+
"broader_predicate": "http://www.w3.org/2004/02/skos/core#broader",
|
|
27
|
+
"narrower_predicate": "http://www.w3.org/2004/02/skos/core#narrower",
|
|
28
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"search": {
|
|
32
|
+
"url": {
|
|
33
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
34
|
+
"@type": "IriTemplate",
|
|
35
|
+
"template": "http://services.ld4l.org/ld4l_services/loc_genre_batch.jsp?query={?query}&entity={?subauth}&maxRecords={?maxRecords}&lang={?lang}&context={?context}",
|
|
36
|
+
"variableRepresentation": "BasicRepresentation",
|
|
37
|
+
"mapping": [
|
|
38
|
+
{
|
|
39
|
+
"@type": "IriTemplateMapping",
|
|
40
|
+
"variable": "query",
|
|
41
|
+
"property": "hydra:freetextQuery",
|
|
42
|
+
"required": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"@type": "IriTemplateMapping",
|
|
46
|
+
"variable": "subauth",
|
|
47
|
+
"property": "hydra:freetextQuery",
|
|
48
|
+
"required": false,
|
|
49
|
+
"default": ""
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"@type": "IriTemplateMapping",
|
|
53
|
+
"variable": "maxRecords",
|
|
54
|
+
"property": "hydra:freetextQuery",
|
|
55
|
+
"required": false,
|
|
56
|
+
"default": "20"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"@type": "IriTemplateMapping",
|
|
60
|
+
"variable": "lang",
|
|
61
|
+
"property": "hydra:freetextQuery",
|
|
62
|
+
"required": false,
|
|
63
|
+
"default": "en"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "IriTemplateMapping",
|
|
67
|
+
"variable": "context",
|
|
68
|
+
"property": "hydra:freetextQuery",
|
|
69
|
+
"required": false,
|
|
70
|
+
"default": "false"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"qa_replacement_patterns": {
|
|
75
|
+
"query": "query",
|
|
76
|
+
"subauth": "subauth"
|
|
77
|
+
},
|
|
78
|
+
"results": {
|
|
79
|
+
"label_predicate": "http://www.loc.gov/mads/rdf/v1#authoritativeLabel",
|
|
80
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank",
|
|
81
|
+
"selector_predicate": "http://vivoweb.org/ontology/core#rank",
|
|
82
|
+
"context": {
|
|
83
|
+
"Alternate Label": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
84
|
+
"Broader": "http://www.w3.org/2004/02/skos/core#broader",
|
|
85
|
+
"Narrower": "http://www.w3.org/2004/02/skos/core#narrower",
|
|
86
|
+
"Exact Match": "http://www.w3.org/2004/02/skos/core#exactMatch",
|
|
87
|
+
"Note": "http://www.w3.org/2004/02/skos/core#note"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"subauthorities": {
|
|
91
|
+
"person": "Person",
|
|
92
|
+
"organization": "Organization",
|
|
93
|
+
"place": "Place",
|
|
94
|
+
"intangible": "Intangible",
|
|
95
|
+
"geocoordinates": "GeoCoordinates",
|
|
96
|
+
"work": "Work"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_ld4l_cache.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"term": {
|
|
3
|
+
"url": {
|
|
4
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
5
|
+
"@type": "IriTemplate",
|
|
6
|
+
"template": "http://services.ld4l.org/ld4l_services/loc_name_lookup.jsp?uri={?term_uri}",
|
|
7
|
+
"variableRepresentation": "BasicRepresentation",
|
|
8
|
+
"mapping": [
|
|
9
|
+
{
|
|
10
|
+
"@type": "IriTemplateMapping",
|
|
11
|
+
"variable": "term_uri",
|
|
12
|
+
"property": "hydra:freetextQuery",
|
|
13
|
+
"required": true,
|
|
14
|
+
"encode": true
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"qa_replacement_patterns": {
|
|
19
|
+
"term_id": "term_uri"
|
|
20
|
+
},
|
|
21
|
+
"term_id": "URI",
|
|
22
|
+
"results": {
|
|
23
|
+
"id_predicate": "http://id.loc.gov/vocabulary/identifiers/lccn",
|
|
24
|
+
"label_predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
|
|
25
|
+
"altlabel_predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
|
|
26
|
+
"sameas_predicate": "http://www.w3.org/2004/02/skos/core#exactMatch"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"search": {
|
|
30
|
+
"url": {
|
|
31
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
|
32
|
+
"@type": "IriTemplate",
|
|
33
|
+
"template": "http://services.ld4l.org/ld4l_services/loc_name_batch.jsp?query={?query}&maxRecords={?maxRecords}&entity={?subauth}&lang={?lang}",
|
|
34
|
+
"variableRepresentation": "BasicRepresentation",
|
|
35
|
+
"mapping": [
|
|
36
|
+
{
|
|
37
|
+
"@type": "IriTemplateMapping",
|
|
38
|
+
"variable": "query",
|
|
39
|
+
"property": "hydra:freetextQuery",
|
|
40
|
+
"required": true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"@type": "IriTemplateMapping",
|
|
44
|
+
"variable": "subauth",
|
|
45
|
+
"property": "hydra:freetextQuery",
|
|
46
|
+
"required": false,
|
|
47
|
+
"default": ""
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"@type": "IriTemplateMapping",
|
|
51
|
+
"variable": "maxRecords",
|
|
52
|
+
"property": "hydra:freetextQuery",
|
|
53
|
+
"required": false,
|
|
54
|
+
"default": "20"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"@type": "IriTemplateMapping",
|
|
58
|
+
"variable": "lang",
|
|
59
|
+
"property": "hydra:freetextQuery",
|
|
60
|
+
"required": false,
|
|
61
|
+
"default": "en"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"qa_replacement_patterns": {
|
|
66
|
+
"query": "query",
|
|
67
|
+
"subauth": "subauth"
|
|
68
|
+
},
|
|
69
|
+
"results": {
|
|
70
|
+
"label_predicate": "http://www.loc.gov/mads/rdf/v1#authoritativeLabel",
|
|
71
|
+
"sort_predicate": "http://vivoweb.org/ontology/core#rank",
|
|
72
|
+
"context": {
|
|
73
|
+
"RWO": "http://www.loc.gov/mads/rdf/v1#identifiesRWO"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"subauthorities": {
|
|
77
|
+
"person": "Person",
|
|
78
|
+
"personal_name": "Person",
|
|
79
|
+
"organization": "Organization",
|
|
80
|
+
"corporate_name": "Organization",
|
|
81
|
+
"place": "Place",
|
|
82
|
+
"intangible": "Intangible",
|
|
83
|
+
"geocoordinates": "GeoCoordinates",
|
|
84
|
+
"work": "Work",
|
|
85
|
+
"title": "Work"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|