geoblacklight 6.0.0.pre.alpha.1 → 6.0.0.pre.alpha.3
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 +4 -4
- data/.github/workflows/ruby.yml +2 -1
- data/app/components/blacklight/icons/arrow_circle_down_component.rb +1 -1
- data/app/components/blacklight/icons/book_component.rb +1 -1
- data/app/components/blacklight/icons/cd_rom_component.rb +1 -1
- data/app/components/blacklight/icons/child_item_component.rb +1 -1
- data/app/components/blacklight/icons/citation_component.rb +1 -1
- data/app/components/blacklight/icons/collection_component.rb +1 -1
- data/app/components/blacklight/icons/collections_component.rb +1 -1
- data/app/components/blacklight/icons/datasets_component.rb +4 -4
- data/app/components/blacklight/icons/dvd_rom_component.rb +1 -1
- data/app/components/blacklight/icons/email_component.rb +1 -1
- data/app/components/blacklight/icons/fire_solid_component.rb +1 -1
- data/app/components/blacklight/icons/globe_component.rb +1 -1
- data/app/components/blacklight/icons/home_component.rb +1 -1
- data/app/components/blacklight/icons/image_component.rb +1 -1
- data/app/components/blacklight/icons/imagery_component.rb +1 -1
- data/app/components/blacklight/icons/leaf_component.rb +1 -1
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +1 -1
- data/app/components/blacklight/icons/line_component.rb +2 -2
- data/app/components/blacklight/icons/map_component.rb +1 -1
- data/app/components/blacklight/icons/map_marker_component.rb +1 -1
- data/app/components/blacklight/icons/maps_component.rb +1 -1
- data/app/components/blacklight/icons/metadata_component.rb +1 -1
- data/app/components/blacklight/icons/mixed_component.rb +3 -3
- data/app/components/blacklight/icons/multilinestring_component.rb +4 -4
- data/app/components/blacklight/icons/multipoint_component.rb +1 -1
- data/app/components/blacklight/icons/multipolygon_component.rb +4 -4
- data/app/components/blacklight/icons/pagelines_brands_component.rb +1 -1
- data/app/components/blacklight/icons/paper_map_component.rb +1 -1
- data/app/components/blacklight/icons/parent_item_component.rb +1 -1
- data/app/components/blacklight/icons/point_component.rb +1 -1
- data/app/components/blacklight/icons/polygon_component.rb +2 -2
- data/app/components/blacklight/icons/polyline_component.rb +4 -4
- data/app/components/blacklight/icons/public_component.rb +1 -1
- data/app/components/blacklight/icons/raster_component.rb +1 -1
- data/app/components/blacklight/icons/restricted_component.rb +1 -1
- data/app/components/blacklight/icons/table_component.rb +1 -1
- data/app/components/blacklight/icons/tags_component.rb +1 -1
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +1 -1
- data/app/components/blacklight/icons/web_services_component.rb +1 -1
- data/app/components/blacklight/icons/websites_component.rb +1 -1
- data/app/components/geoblacklight/attribute_table_component.html.erb +1 -1
- data/app/components/geoblacklight/document/relations_container_component.html.erb +1 -0
- data/app/components/geoblacklight/document/relations_container_component.rb +12 -0
- data/app/components/geoblacklight/document/sidebar_component.html.erb +2 -3
- data/app/components/geoblacklight/download_links_component.html.erb +1 -1
- data/app/components/geoblacklight/download_links_component.rb +5 -2
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +1 -1
- data/app/components/geoblacklight/index_map_inspect_component.html.erb +8 -1
- data/app/components/geoblacklight/index_map_legend_component.html.erb +6 -6
- data/app/components/geoblacklight/location_leaflet_map_component.rb +8 -1
- data/app/components/geoblacklight/login_link_component.rb +1 -1
- data/app/components/geoblacklight/static_map_component.html.erb +1 -1
- data/app/components/geoblacklight/web_services_link_component.rb +1 -1
- data/app/controllers/relation_controller.rb +1 -1
- data/app/helpers/geoblacklight_helper.rb +5 -2
- data/app/javascript/geoblacklight/controllers/downloads_controller.js +3 -3
- data/app/javascript/geoblacklight/core.js +0 -2
- data/app/javascript/geoblacklight/initializers/truncation.js +5 -3
- data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +4 -2
- data/app/javascript/geoblacklight/leaflet/inspection.js +10 -5
- data/app/javascript/geoblacklight/leaflet/layer_index_map.js +15 -12
- data/app/javascript/geoblacklight/leaflet/utils.js +8 -2
- data/app/javascript/geoblacklight/openlayers/inspection.js +3 -5
- data/app/views/catalog/metadata/_markup.html.erb +1 -1
- data/app/views/catalog/metadata.html.erb +1 -1
- data/app/views/relation/index.html.erb +4 -2
- data/config/locales/geoblacklight.en.yml +31 -0
- data/geoblacklight.gemspec +3 -3
- data/lib/generators/geoblacklight/templates/settings.yml +285 -270
- data/lib/geoblacklight/configuration/case_insensitive_settings.rb +59 -0
- data/lib/geoblacklight/configuration/fields_config.rb +33 -33
- data/lib/geoblacklight/configuration/layer_config.rb +28 -0
- data/lib/geoblacklight/configuration/leaflet_config.rb +24 -25
- data/lib/geoblacklight/configuration/leaflet_layers_config.rb +15 -3
- data/lib/geoblacklight/configuration/leaflet_sleep_config.rb +1 -1
- data/lib/geoblacklight/configuration/relationship_config.rb +15 -0
- data/lib/geoblacklight/configuration/relationships_config.rb +123 -0
- data/lib/geoblacklight/configuration/settings_builder.rb +118 -0
- data/lib/geoblacklight/configuration.rb +7 -2
- data/lib/geoblacklight/deprecation.rb +7 -0
- data/lib/geoblacklight/engine.rb +1 -0
- data/lib/geoblacklight/metadata/base.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight.rb +1 -2
- data/solr/conf/schema.xml +8 -7
- data/solr/conf/solrconfig.xml +1 -1
- data/spec/components/geoblacklight/document/sidebar_component_spec.rb +48 -0
- data/spec/components/geoblacklight/download_links_component_spec.rb +4 -1
- data/spec/components/geoblacklight/login_link_component_spec.rb +1 -1
- data/spec/helpers/geoblacklight_helper_spec.rb +1 -1
- data/spec/lib/geoblacklight/configuration/layer_config_spec.rb +71 -0
- data/spec/lib/geoblacklight/configuration/leaflet_config_spec.rb +129 -0
- data/spec/lib/geoblacklight/configuration/leaflet_layers_config_spec.rb +63 -0
- data/spec/lib/geoblacklight/configuration/settings_builder_spec.rb +284 -0
- data/spec/lib/geoblacklight/configuration_spec.rb +35 -0
- data/spec/lib/geoblacklight/metadata/base_spec.rb +1 -1
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +4 -4
- data/spec/spec_helper.rb +5 -0
- metadata +32 -24
- data/app/javascript/geoblacklight/initializers/relations.js +0 -40
- data/app/views/catalog/_relations_container.html.erb +0 -1
- data/lib/geoblacklight/configuration/legacy_settings_builder.rb +0 -94
- data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +0 -179
- data/spec/features/show_page_sidebar_static_map_spec.rb +0 -21
|
@@ -1,290 +1,305 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# These settings are used to configure GeoBlacklight.
|
|
2
|
+
# The values you see here are the defaults. If you want to override any of these,
|
|
3
|
+
# uncomment them and make any changes.
|
|
4
|
+
#
|
|
5
|
+
# Alternatively, you can use a config/initializers/geoblacklight.rb file to
|
|
6
|
+
# set these values directly on the GeoBlacklight::Configuration object.
|
|
7
|
+
# example:
|
|
8
|
+
# # config/initializers/geoblacklight.rb
|
|
9
|
+
# config = GeoBlacklight.configuration
|
|
10
|
+
# config.timeout_download = 10
|
|
3
11
|
|
|
4
|
-
#
|
|
5
|
-
#
|
|
12
|
+
# # ArcGIS Online Base URL
|
|
13
|
+
# arcgis_base_url: "https://www.arcgis.com/apps/mapviewer/index.html"
|
|
6
14
|
|
|
7
|
-
#
|
|
8
|
-
|
|
15
|
+
# # File path for downloads
|
|
16
|
+
# download_path: "<%= Rails.root.join('tmp', 'cache', 'downloads') %>"
|
|
9
17
|
|
|
10
|
-
# The
|
|
11
|
-
|
|
18
|
+
# # The bq boost value for spatial search matches within a bounding box
|
|
19
|
+
# bbox_within_boost: "10"
|
|
12
20
|
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
# Add a stringified GeoJSON object to scope initial render (example from UMass)
|
|
16
|
-
HOMEPAGE_MAP_GEOM: null
|
|
17
|
-
# HOMEPAGE_MAP_GEOM: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
|
|
21
|
+
# # The bf boost value for overlap ratio
|
|
22
|
+
# overlap_ratio_boost: "2"
|
|
18
23
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- :format
|
|
25
|
-
- :id
|
|
26
|
-
- :logo
|
|
27
|
-
- :provider
|
|
28
|
-
- :type
|
|
29
|
-
- :BBOX
|
|
30
|
-
- :HEIGHT
|
|
31
|
-
- :LAYERS
|
|
32
|
-
- :QUERY_LAYERS
|
|
33
|
-
- :URL
|
|
34
|
-
- :WIDTH
|
|
35
|
-
- :X
|
|
36
|
-
- :Y
|
|
24
|
+
# # Homepage Map Geometry
|
|
25
|
+
# # Leave null to default to entire world
|
|
26
|
+
# # Add a stringified GeoJSON object to scope initial render (example from UMass)
|
|
27
|
+
# homepage_map_geom: null
|
|
28
|
+
# # homepage_map_geom: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
|
|
37
29
|
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
:LANGUAGE: "dct_language_sm"
|
|
59
|
-
:LICENSE: "dct_license_sm"
|
|
60
|
-
:MEMBER_OF: "pcdm_memberOf_sm"
|
|
61
|
-
:METADATA_VERSION: "gbl_mdVersion_s"
|
|
62
|
-
:MODIFIED: "gbl_mdModified_dt"
|
|
63
|
-
:OVERLAP_FIELD: "solr_bboxtype"
|
|
64
|
-
:PUBLISHER: "dct_publisher_sm"
|
|
65
|
-
:PROVIDER: "schema_provider_s"
|
|
66
|
-
:REFERENCES: "dct_references_s"
|
|
67
|
-
:RELATION: "dct_relation_sm"
|
|
68
|
-
:REPLACES: "dct_replaces_sm"
|
|
69
|
-
:RESOURCE_CLASS: "gbl_resourceClass_sm"
|
|
70
|
-
:RESOURCE_TYPE: "gbl_resourceType_sm"
|
|
71
|
-
:RIGHTS: "dct_rights_sm"
|
|
72
|
-
:RIGHTS_HOLDER: "dct_rightsHolder_sm"
|
|
73
|
-
:SOURCE: "dct_source_sm"
|
|
74
|
-
:SPATIAL_COVERAGE: "dct_spatial_sm"
|
|
75
|
-
:GEOMETRY: "locn_geometry"
|
|
76
|
-
:SUBJECT: "dct_subject_sm"
|
|
77
|
-
:SUPPRESSED: "gbl_suppressed_b"
|
|
78
|
-
:TEMPORAL_COVERAGE: "dct_temporal_sm"
|
|
79
|
-
:TITLE: "dct_title_s"
|
|
80
|
-
:VERSION: "dct_isVersionOf_sm"
|
|
81
|
-
:WXS_IDENTIFIER: "gbl_wxsIdentifier_s"
|
|
30
|
+
# # Non-search-field GeoBlacklight application permitted params.
|
|
31
|
+
# # Values are left mixed-case on purpose: the uppercase symbols are WMS/OGC
|
|
32
|
+
# # request parameter names (BBOX, WIDTH, etc.) and must match what clients send.
|
|
33
|
+
# gbl_params:
|
|
34
|
+
# - :bbox
|
|
35
|
+
# - :email
|
|
36
|
+
# - :file
|
|
37
|
+
# - :format
|
|
38
|
+
# - :id
|
|
39
|
+
# - :logo
|
|
40
|
+
# - :provider
|
|
41
|
+
# - :type
|
|
42
|
+
# - :BBOX
|
|
43
|
+
# - :HEIGHT
|
|
44
|
+
# - :LAYERS
|
|
45
|
+
# - :QUERY_LAYERS
|
|
46
|
+
# - :URL
|
|
47
|
+
# - :WIDTH
|
|
48
|
+
# - :X
|
|
49
|
+
# - :Y
|
|
82
50
|
|
|
83
|
-
#
|
|
84
|
-
|
|
51
|
+
# # Solr field mappings
|
|
52
|
+
# fields:
|
|
53
|
+
# access_rights: "dct_accessRights_s"
|
|
54
|
+
# alternative_title: "dct_alternative_sm"
|
|
55
|
+
# centroid: "dcat_centroid"
|
|
56
|
+
# creator: "dct_creator_sm"
|
|
57
|
+
# date_issued: "dct_issued_s"
|
|
58
|
+
# date_range: "gbl_dateRange_drsim"
|
|
59
|
+
# description: "dct_description_sm"
|
|
60
|
+
# display_note: "gbl_displayNote_sm"
|
|
61
|
+
# format: "dct_format_s"
|
|
62
|
+
# file_size: "gbl_fileSize_s"
|
|
63
|
+
# georeferenced: "gbl_georeferenced_b"
|
|
64
|
+
# id: "id"
|
|
65
|
+
# identifier: "dct_identifier_sm"
|
|
66
|
+
# index_year: "gbl_indexYear_im"
|
|
67
|
+
# is_part_of: "dct_isPartOf_sm"
|
|
68
|
+
# is_replaced_by: "dct_isReplacedBy_sm"
|
|
69
|
+
# theme: "dcat_theme_sm"
|
|
70
|
+
# keyword: "dcat_keyword_sm"
|
|
71
|
+
# language: "dct_language_sm"
|
|
72
|
+
# license: "dct_license_sm"
|
|
73
|
+
# member_of: "pcdm_memberOf_sm"
|
|
74
|
+
# metadata_version: "gbl_mdVersion_s"
|
|
75
|
+
# modified: "gbl_mdModified_dt"
|
|
76
|
+
# overlap_field: "solr_bboxtype"
|
|
77
|
+
# publisher: "dct_publisher_sm"
|
|
78
|
+
# provider: "schema_provider_s"
|
|
79
|
+
# references: "dct_references_s"
|
|
80
|
+
# relation: "dct_relation_sm"
|
|
81
|
+
# replaces: "dct_replaces_sm"
|
|
82
|
+
# resource_class: "gbl_resourceClass_sm"
|
|
83
|
+
# resource_type: "gbl_resourceType_sm"
|
|
84
|
+
# rights: "dct_rights_sm"
|
|
85
|
+
# rights_holder: "dct_rightsHolder_sm"
|
|
86
|
+
# source: "dct_source_sm"
|
|
87
|
+
# spatial_coverage: "dct_spatial_sm"
|
|
88
|
+
# geometry: "locn_geometry"
|
|
89
|
+
# subject: "dct_subject_sm"
|
|
90
|
+
# suppressed: "gbl_suppressed_b"
|
|
91
|
+
# temporal_coverage: "dct_temporal_sm"
|
|
92
|
+
# title: "dct_title_s"
|
|
93
|
+
# version: "dct_isVersionOf_sm"
|
|
94
|
+
# wxs_identifier: "gbl_wxsIdentifier_s"
|
|
85
95
|
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
- "mods"
|
|
89
|
-
- "fgdc"
|
|
90
|
-
- "iso19139"
|
|
91
|
-
- "html"
|
|
96
|
+
# # Institution deployed at
|
|
97
|
+
# institution: "Stanford"
|
|
92
98
|
|
|
93
|
-
#
|
|
94
|
-
|
|
99
|
+
# # Metadata shown in tool panel
|
|
100
|
+
# metadata_shown:
|
|
101
|
+
# - "mods"
|
|
102
|
+
# - "fgdc"
|
|
103
|
+
# - "iso19139"
|
|
104
|
+
# - "html"
|
|
95
105
|
|
|
96
|
-
# (For
|
|
97
|
-
|
|
106
|
+
# # (For external Download) timeout and open_timeout parameters for Faraday
|
|
107
|
+
# timeout_download: 180
|
|
98
108
|
|
|
99
|
-
#
|
|
100
|
-
|
|
109
|
+
# # (For WMS inspection) timeout and open_timeout parameters for Faraday
|
|
110
|
+
# timeout_wms: 4
|
|
101
111
|
|
|
102
|
-
# Web services shown in tool panel
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
# # Web services shown in tool panel
|
|
113
|
+
# webservices_shown:
|
|
114
|
+
# - "wms"
|
|
115
|
+
# - "tms"
|
|
116
|
+
# - "wfs"
|
|
117
|
+
# - "xyz"
|
|
118
|
+
# - "wmts"
|
|
119
|
+
# - "tilejson"
|
|
120
|
+
# - "iiif"
|
|
121
|
+
# - "feature_layer"
|
|
122
|
+
# - "tiled_map_layer"
|
|
123
|
+
# - "dynamic_map_layer"
|
|
124
|
+
# - "image_map_layer"
|
|
125
|
+
# - "cog"
|
|
126
|
+
# - "pmtiles"
|
|
117
127
|
|
|
118
|
-
# Display Notes to display / Non-prefixed default bootstrap class is alert-secondary
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
# # Display Notes to display / Non-prefixed default bootstrap class is alert-secondary
|
|
129
|
+
# display_notes_shown:
|
|
130
|
+
# danger:
|
|
131
|
+
# bootstrap_alert_class: alert-danger
|
|
132
|
+
# icon: fire-solid
|
|
133
|
+
# note_prefix: "Danger: "
|
|
134
|
+
# info:
|
|
135
|
+
# bootstrap_alert_class: alert-info
|
|
136
|
+
# icon: circle-info-solid
|
|
137
|
+
# note_prefix: "Info: "
|
|
138
|
+
# tip:
|
|
139
|
+
# bootstrap_alert_class: alert-success
|
|
140
|
+
# icon: lightbulb-solid
|
|
141
|
+
# note_prefix: "Tip: "
|
|
142
|
+
# warning:
|
|
143
|
+
# bootstrap_alert_class: alert-warning
|
|
144
|
+
# icon: triangle-exclamation-solid
|
|
145
|
+
# note_prefix: "Warning: "
|
|
136
146
|
|
|
137
|
-
# Relationships to display
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
147
|
+
# # Relationships to display
|
|
148
|
+
# relationships_shown:
|
|
149
|
+
# member_of_ancestors:
|
|
150
|
+
# field: pcdm_memberOf_sm
|
|
151
|
+
# icon: parent-item
|
|
152
|
+
# inverse: :member_of_descendants
|
|
153
|
+
# label: geoblacklight.relations.member_of_ancestors
|
|
154
|
+
# query_type: ancestors
|
|
155
|
+
# member_of_descendants:
|
|
156
|
+
# field: pcdm_memberOf_sm
|
|
157
|
+
# icon: child-item
|
|
158
|
+
# inverse: :member_of_ancestors
|
|
159
|
+
# label: geoblacklight.relations.member_of_descendants
|
|
160
|
+
# query_type: descendants
|
|
161
|
+
# part_of_ancestors:
|
|
162
|
+
# field: dct_isPartOf_sm
|
|
163
|
+
# icon: parent-item
|
|
164
|
+
# inverse: :part_of_descendants
|
|
165
|
+
# label: geoblacklight.relations.part_of_ancestors
|
|
166
|
+
# query_type: ancestors
|
|
167
|
+
# part_of_descendants:
|
|
168
|
+
# field: dct_isPartOf_sm
|
|
169
|
+
# icon: child-item
|
|
170
|
+
# inverse: :part_of_ancestors
|
|
171
|
+
# label: geoblacklight.relations.part_of_descendants
|
|
172
|
+
# query_type: descendants
|
|
173
|
+
# relation_ancestors:
|
|
174
|
+
# field: dct_relation_sm
|
|
175
|
+
# icon: nil
|
|
176
|
+
# inverse: :relation_descendants
|
|
177
|
+
# label: geoblacklight.relations.relation_ancestors
|
|
178
|
+
# query_type: ancestors
|
|
179
|
+
# relation_descendants:
|
|
180
|
+
# field: dct_relation_sm
|
|
181
|
+
# icon: nil
|
|
182
|
+
# inverse: :relation_ancestors
|
|
183
|
+
# label: geoblacklight.relations.relation_descendants
|
|
184
|
+
# query_type: descendants
|
|
185
|
+
# replaces_ancestors:
|
|
186
|
+
# field: dct_replaces_sm
|
|
187
|
+
# icon: nil
|
|
188
|
+
# inverse: :replaces_descendants
|
|
189
|
+
# label: geoblacklight.relations.replaces_ancestors
|
|
190
|
+
# query_type: ancestors
|
|
191
|
+
# replaces_descendants:
|
|
192
|
+
# field: dct_replaces_sm
|
|
193
|
+
# icon: nil
|
|
194
|
+
# inverse: :replaces_ancestors
|
|
195
|
+
# label: geoblacklight.relations.replaces_descendants
|
|
196
|
+
# query_type: descendants
|
|
197
|
+
# source_ancestors:
|
|
198
|
+
# field: dct_source_sm
|
|
199
|
+
# icon: parent-item
|
|
200
|
+
# inverse: :source_descendants
|
|
201
|
+
# label: geoblacklight.relations.source_ancestors
|
|
202
|
+
# query_type: ancestors
|
|
203
|
+
# source_descendants:
|
|
204
|
+
# field: dct_source_sm
|
|
205
|
+
# icon: child-item
|
|
206
|
+
# inverse: :source_ancestors
|
|
207
|
+
# label: geoblacklight.relations.source_descendants
|
|
208
|
+
# query_type: descendants
|
|
209
|
+
# version_of_ancestors:
|
|
210
|
+
# field: dct_isVersionOf_sm
|
|
211
|
+
# icon: parent-item
|
|
212
|
+
# inverse: :version_of_descendants
|
|
213
|
+
# label: geoblacklight.relations.version_of_ancestors
|
|
214
|
+
# query_type: ancestors
|
|
215
|
+
# version_of_descendants:
|
|
216
|
+
# field: dct_isVersionOf_sm
|
|
217
|
+
# icon: child-item
|
|
218
|
+
# inverse: :version_of_ancestors
|
|
219
|
+
# label: geoblacklight.relations.version_of_descendants
|
|
220
|
+
# query_type: descendants
|
|
211
221
|
|
|
212
|
-
# Vector data download formats to be displayed
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
# # Vector data download formats to be displayed
|
|
223
|
+
# download_formats:
|
|
224
|
+
# vector:
|
|
225
|
+
# - "Shapefile"
|
|
226
|
+
# - "KMZ"
|
|
227
|
+
# - "GeoJSON"
|
|
228
|
+
# - "CSV"
|
|
219
229
|
|
|
220
|
-
# WMS Parameters
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
# # WMS Parameters. Keys are OGC WMS request parameter names and are sent to
|
|
231
|
+
# # remote WMS servers, so they are intentionally left uppercase.
|
|
232
|
+
# wms_params:
|
|
233
|
+
# SERVICE: "WMS"
|
|
234
|
+
# VERSION: "1.1.1"
|
|
235
|
+
# REQUEST: "GetFeatureInfo"
|
|
236
|
+
# STYLES: ""
|
|
237
|
+
# SRS: "EPSG:4326"
|
|
238
|
+
# EXCEPTIONS: "application/json"
|
|
239
|
+
# INFO_FORMAT: "application/json"
|
|
229
240
|
|
|
230
|
-
# Settings for leaflet
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
241
|
+
# # Settings for leaflet
|
|
242
|
+
# leaflet:
|
|
243
|
+
# # Keys below are consumed by the JS viewer via the page value
|
|
244
|
+
# # ("INDEX" / "SHOW" / "STATIC_MAP"), so they are intentionally left uppercase.
|
|
245
|
+
# boundsoverlay:
|
|
246
|
+
# INDEX:
|
|
247
|
+
# color: "#3388ff"
|
|
248
|
+
# SHOW:
|
|
249
|
+
# color: "#3388ff"
|
|
250
|
+
# STATIC_MAP:
|
|
251
|
+
# color: "#3388ff"
|
|
252
|
+
# selected_color: "#2C7FB8"
|
|
253
|
+
# sleep:
|
|
254
|
+
# sleep: true # set to false to disable
|
|
255
|
+
# margin_distance: 100 # set to zero / false if you want to disable this check
|
|
256
|
+
# sleeptime: 750
|
|
257
|
+
# waketime: 750
|
|
258
|
+
# hovertowake: false
|
|
259
|
+
# message: "Click to Wake"
|
|
260
|
+
# background: "rgba(214, 214, 214, .7)"
|
|
261
|
+
# sidebar: false # set to true to display attribute table as sidebar on map
|
|
262
|
+
# layers:
|
|
263
|
+
# detect_retina: true
|
|
264
|
+
# index:
|
|
265
|
+
# # DEFAULT / UNAVAILABLE / SELECTED are consumed by the JS viewer and the
|
|
266
|
+
# # index-map legend, so they are intentionally left uppercase.
|
|
267
|
+
# DEFAULT: &default
|
|
268
|
+
# color: "#7FCDBB"
|
|
269
|
+
# weight: 1
|
|
270
|
+
# radius: 4
|
|
271
|
+
# sr_color_name: "Green"
|
|
272
|
+
# UNAVAILABLE:
|
|
273
|
+
# <<: *default
|
|
274
|
+
# color: "#EDF8B1"
|
|
275
|
+
# sr_color_name: "Yellow"
|
|
276
|
+
# SELECTED:
|
|
277
|
+
# <<: *default
|
|
278
|
+
# color: "#2C7FB8"
|
|
279
|
+
# sr_color_name: "Blue"
|
|
265
280
|
|
|
266
|
-
# Toggle the help text feature that offers users context
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
# # Toggle the help text feature that offers users context
|
|
282
|
+
# help_text:
|
|
283
|
+
# viewer_protocol:
|
|
284
|
+
# - "cog"
|
|
285
|
+
# - "dynamic_map_layer"
|
|
286
|
+
# - "feature_layer"
|
|
287
|
+
# - "iiif"
|
|
288
|
+
# - "iiif_manifest"
|
|
289
|
+
# - "image_map_layer"
|
|
290
|
+
# - "index_map"
|
|
291
|
+
# - "oembed"
|
|
292
|
+
# - "pmtiles"
|
|
293
|
+
# - "tiled_map_layer"
|
|
294
|
+
# - "tilejson"
|
|
295
|
+
# - "tms"
|
|
296
|
+
# - "wms"
|
|
297
|
+
# - "wmts"
|
|
298
|
+
# - "xyz"
|
|
284
299
|
|
|
285
|
-
# Enable catalog#show sidebar static map for items with the following viewer protocols
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
300
|
+
# # Enable catalog#show sidebar static map for items with the following viewer protocols
|
|
301
|
+
# sidebar_static_map:
|
|
302
|
+
# - "iiif"
|
|
303
|
+
# - "iiif_manifest"
|
|
289
304
|
|
|
290
|
-
|
|
305
|
+
# iiif_drag_drop_link: "@manifest?manifest=@manifest"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
class Configuration
|
|
5
|
+
# Wraps the global +Settings+ object so that its keys can be resolved
|
|
6
|
+
# case-insensitively. When a key exists in both lower- and uppercase forms
|
|
7
|
+
# the lowercase value wins. Nested hash values are wrapped recursively, so
|
|
8
|
+
# chained access (e.g. +settings.fields.access_rights+) resolves regardless
|
|
9
|
+
# of the case used in settings.yml. Missing keys return +nil+, mirroring the
|
|
10
|
+
# behavior of the underlying Config::Options object.
|
|
11
|
+
#
|
|
12
|
+
# When a +deprecation+ (e.g. an ActiveSupport::Deprecation) is provided, a
|
|
13
|
+
# deprecation warning is issued whenever an uppercase key has to be used
|
|
14
|
+
# because no lowercase equivalent is present.
|
|
15
|
+
class CaseInsensitiveSettings
|
|
16
|
+
def initialize(settings, deprecation: nil)
|
|
17
|
+
@hash = settings.to_h
|
|
18
|
+
@deprecation = deprecation
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def [](key)
|
|
22
|
+
resolve(key)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_h
|
|
26
|
+
@hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def method_missing(name, *) # rubocop:disable Style/MissingRespondToMissing, Style/MethodMissingSuper
|
|
30
|
+
resolve(name)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def resolve(name)
|
|
36
|
+
target = name.to_s.downcase
|
|
37
|
+
keys = @hash.keys.select { |key| key.to_s.downcase == target }
|
|
38
|
+
return nil if keys.empty?
|
|
39
|
+
|
|
40
|
+
key = keys.find { |candidate| candidate.to_s == candidate.to_s.downcase }
|
|
41
|
+
if key.nil?
|
|
42
|
+
key = keys.first
|
|
43
|
+
warn_deprecated(key)
|
|
44
|
+
end
|
|
45
|
+
value = @hash[key]
|
|
46
|
+
value.is_a?(Hash) ? self.class.new(value, deprecation: @deprecation) : value
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def warn_deprecated(key)
|
|
50
|
+
return unless @deprecation
|
|
51
|
+
|
|
52
|
+
@deprecation.warn(
|
|
53
|
+
"GeoBlacklight settings.yml key #{key} is uppercase; rename it to #{key.to_s.downcase}. " \
|
|
54
|
+
"Uppercase keys are deprecated and support will be removed in a future version."
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|