geoblacklight 3.2.0 → 4.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +148 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +14 -10
  5. data/.rubocop_todo.yml +361 -26
  6. data/README.md +3 -3
  7. data/Rakefile +19 -12
  8. data/app/assets/images/blacklight/michigan-state-university.svg +6 -0
  9. data/app/assets/images/blacklight/pennsylvania-state-university.svg +6 -0
  10. data/app/assets/images/blacklight/purdue-university.svg +6 -0
  11. data/app/assets/images/blacklight/the-ohio-state-university.svg +7 -0
  12. data/app/assets/images/blacklight/university-of-chicago.svg +6 -0
  13. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +6 -0
  14. data/app/assets/images/blacklight/university-of-iowa.svg +5 -0
  15. data/app/assets/images/blacklight/university-of-maryland.svg +5 -0
  16. data/app/assets/images/blacklight/university-of-michigan.svg +5 -0
  17. data/app/assets/images/blacklight/university-of-minnesota.svg +5 -0
  18. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +8 -0
  19. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +5 -0
  20. data/app/assets/images/favicon.ico +0 -0
  21. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  22. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  23. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  24. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  25. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  26. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  27. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  28. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  29. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  30. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  31. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +41 -0
  32. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  33. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
  34. data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +11 -0
  35. data/app/components/geoblacklight/homepage_feature_facet_component.rb +13 -0
  36. data/{lib → app/helpers}/geoblacklight/geoblacklight_helper_behavior.rb +6 -4
  37. data/app/helpers/geoblacklight_helper.rb +14 -8
  38. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  39. data/app/models/concerns/geoblacklight/solr_document.rb +11 -16
  40. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +5 -5
  41. data/app/views/catalog/_arcgis.html.erb +1 -1
  42. data/app/views/catalog/_data_dictionary.html.erb +1 -2
  43. data/app/views/catalog/_document_split.html.erb +1 -1
  44. data/app/views/catalog/_header_icons.html.erb +1 -1
  45. data/app/views/catalog/_home_text.html.erb +7 -29
  46. data/app/views/catalog/_index_split_default.html.erb +1 -1
  47. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  48. data/app/views/catalog/_show_header_default.html.erb +1 -1
  49. data/app/views/download/hgl.html.erb +13 -11
  50. data/app/views/relation/_relations.html.erb +15 -0
  51. data/app/views/relation/index.html.erb +4 -16
  52. data/app/views/relation/index.json.jbuilder +6 -2
  53. data/babel.config.json +4 -0
  54. data/config/initializers/new_gbl_settings_defaults_3_4.yml +6 -0
  55. data/config/locales/geoblacklight.en.yml +12 -0
  56. data/geoblacklight.gemspec +5 -3
  57. data/jest.config.js +25 -0
  58. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  59. data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -35
  60. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  61. data/lib/generators/geoblacklight/templates/settings.yml +91 -17
  62. data/lib/geoblacklight/bounding_box.rb +1 -1
  63. data/lib/geoblacklight/constants.rb +1 -0
  64. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  65. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  66. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  67. data/lib/geoblacklight/download/kmz_download.rb +2 -2
  68. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  69. data/lib/geoblacklight/geometry.rb +85 -0
  70. data/lib/geoblacklight/item_viewer.rb +5 -1
  71. data/lib/geoblacklight/metadata/base.rb +1 -7
  72. data/lib/geoblacklight/references.rb +1 -1
  73. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  74. data/lib/geoblacklight/relation/descendants.rb +4 -3
  75. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  76. data/lib/geoblacklight/version.rb +1 -1
  77. data/lib/geoblacklight/view_helper_override.rb +1 -1
  78. data/lib/geoblacklight/wms_layer.rb +1 -4
  79. data/lib/geoblacklight.rb +1 -3
  80. data/lib/tasks/geoblacklight.rake +5 -0
  81. data/package.json +17 -1
  82. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  83. data/schema/geoblacklight-schema-aardvark.json +211 -0
  84. data/setupJest.js +14 -0
  85. data/solr/conf/schema.xml +35 -29
  86. data/solr/conf/solrconfig.xml +15 -15
  87. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +39 -0
  88. data/spec/config/initializers/rails_config_spec.rb +15 -0
  89. data/spec/controllers/catalog_controller_spec.rb +7 -7
  90. data/spec/features/esri_viewer_spec.rb +1 -1
  91. data/spec/features/home_page_spec.rb +4 -4
  92. data/spec/features/layer_opacity_spec.rb +1 -0
  93. data/spec/features/metadata_panel_spec.rb +1 -1
  94. data/spec/features/missing_metadata_spec.rb +2 -2
  95. data/spec/features/relations_spec.rb +2 -2
  96. data/spec/features/search_results_map_spec.rb +2 -1
  97. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  98. data/spec/features/split_view.html.erb_spec.rb +16 -12
  99. data/spec/features/tms_spec.rb +10 -0
  100. data/spec/fixtures/solr_documents/README.md +48 -36
  101. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  102. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  103. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  104. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  105. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  106. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  107. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  108. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  109. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  110. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  111. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  112. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  113. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  114. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  115. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  116. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  117. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  118. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  119. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  120. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  121. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  122. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  123. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  124. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  125. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  126. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  127. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  128. data/spec/fixtures/solr_documents/oembed.json +34 -17
  129. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  130. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  131. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  132. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  133. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  134. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  135. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  136. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  137. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  138. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  139. data/spec/fixtures/solr_documents/tms.json +45 -0
  140. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  141. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  142. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  143. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  144. data/spec/{lib → helpers}/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
  145. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  146. data/spec/javascripts/geoblacklight_spec.js +0 -6
  147. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  148. data/spec/javascripts/util_spec.js +2 -4
  149. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  150. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  151. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  152. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  153. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  154. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  155. data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
  156. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  157. data/spec/lib/geoblacklight/references_spec.rb +3 -3
  158. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  159. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  160. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  161. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  162. data/spec/spec_helper.rb +2 -0
  163. data/spec/support/view_component_capybara_test_helpers.rb +8 -0
  164. data/spec/test_app_templates/Gemfile.extra +1 -0
  165. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -7
  166. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  167. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  168. data/template.rb +1 -0
  169. metadata +99 -51
  170. data/.circleci/config.yml +0 -256
  171. data/app/views/catalog/_document_action.html.erb +0 -6
  172. data/app/views/catalog/_facet_tag_item.html.erb +0 -3
  173. data/app/views/catalog/_facet_tag_layout.html.erb +0 -2
  174. data/app/views/relation/_ancestors.html.erb +0 -8
  175. data/app/views/relation/_descendants.html.erb +0 -15
  176. data/schema/format-values.md +0 -50
  177. data/schema/geoblacklight-schema-deprecated.md +0 -39
  178. data/schema/geoblacklight-schema.md +0 -323
  179. data/schema/geometry-type-values.md +0 -11
  180. data/schema/references.md +0 -23
  181. data/schema/schema-commentary.md +0 -198
  182. data/schema/subjects.md +0 -41
  183. data/schema/type-values.md +0 -10
  184. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  185. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  186. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
  187. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  188. data/spec/javascripts/spec_helper.js +0 -32
  189. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  190. data/spec/teaspoon_env.rb +0 -214
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.required_rubygems_version = '>= 2.5.2'
21
21
 
22
22
  spec.add_dependency 'rails', '>= 5.2.4', '< 6.2'
23
- spec.add_dependency 'blacklight', '~> 7.0'
23
+ spec.add_dependency 'blacklight', '~> 7.8'
24
24
  spec.add_dependency 'config'
25
25
  spec.add_dependency 'faraday', '~> 1.0'
26
26
  spec.add_dependency 'faraday_middleware', '~> 1.0.0.rc1'
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'geo_combine', '~> 0.4'
30
30
  spec.add_dependency 'mime-types'
31
31
  spec.add_dependency 'handlebars_assets'
32
+ spec.add_dependency 'rgeo-geojson'
32
33
 
33
34
  spec.add_development_dependency 'solr_wrapper'
34
35
  spec.add_development_dependency 'rails-controller-testing'
@@ -38,8 +39,9 @@ Gem::Specification.new do |spec|
38
39
  spec.add_development_dependency 'webdrivers'
39
40
  spec.add_development_dependency 'factory_bot_rails'
40
41
  spec.add_development_dependency 'database_cleaner', '~> 1.3'
41
- spec.add_development_dependency 'bixby'
42
42
  spec.add_development_dependency 'simplecov', '~> 0.17.1'
43
43
  spec.add_development_dependency 'foreman'
44
- spec.add_development_dependency 'teaspoon'
44
+ spec.add_development_dependency 'rubocop', '~> 1.10'
45
+ spec.add_development_dependency 'rubocop-rails', '~> 2.9'
46
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.2'
45
47
  end
data/jest.config.js ADDED
@@ -0,0 +1,25 @@
1
+ const util = require('util');
2
+ const exec = util.promisify(require('child_process').exec);
3
+
4
+ module.exports = async () => {
5
+ console.log('Getting asset pipeline lookup path from Rails');
6
+ const { stdout, stderr } = await exec('bundle exec rake geoblacklight:asset_paths');
7
+ if (stderr) {
8
+ console.error(stderr);
9
+ }
10
+ const paths = stdout.trim().split('\n');
11
+ return {
12
+ moduleDirectories: [
13
+ 'node_modules',
14
+ 'spec/javascripts',
15
+ ...paths,
16
+ ],
17
+ rootDir: './',
18
+ setupFilesAfterEnv: [
19
+ '<rootDir>/setupJest.js',
20
+ ],
21
+ testMatch: [
22
+ '<rootDir>/spec/javascripts/**/*_spec.js',
23
+ ],
24
+ };
25
+ };
@@ -56,7 +56,7 @@ module Geoblacklight
56
56
 
57
57
  def add_unique_key
58
58
  inject_into_file 'app/models/solr_document.rb', after: "# self.unique_key = 'id'" do
59
- "\n self.unique_key = 'layer_slug_s'"
59
+ "\n self.unique_key = Settings.FIELDS.UNIQUE_KEY"
60
60
  end
61
61
  end
62
62
 
@@ -29,7 +29,7 @@ class CatalogController < ApplicationController
29
29
  #
30
30
  config.default_document_solr_params = {
31
31
  :qt => 'document',
32
- :q => '{!raw f=layer_slug_s v=$id}'
32
+ :q => "{!raw f=#{Settings.FIELDS.ID} v=$id}"
33
33
  }
34
34
 
35
35
 
@@ -76,7 +76,6 @@ class CatalogController < ApplicationController
76
76
  # config.add_facet_field 'lc_1letter_facet', :label => 'Call Number'
77
77
  # config.add_facet_field 'subject_geo_facet', :label => 'Region'
78
78
  # config.add_facet_field 'solr_bbox', :fq => "solr_bbox:IsWithin(-88,26,-79,36)", :label => 'Spatial'
79
-
80
79
  # config.add_facet_field 'example_pivot_field', :label => 'Pivot Field', :pivot => ['format', 'language_facet']
81
80
 
82
81
  # config.add_facet_field 'example_query_facet_field', :label => 'Publish Date', :query => {
@@ -85,63 +84,62 @@ class CatalogController < ApplicationController
85
84
  # :years_25 => { :label => 'within 25 Years', :fq => "pub_date:[#{Time.now.year - 25 } TO *]" }
86
85
  # }
87
86
 
88
- config.add_facet_field Settings.FIELDS.PROVENANCE, label: 'Institution', limit: 8, partial: "icon_facet"
89
- config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Author', :limit => 8
90
- config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
91
- config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
87
+
88
+ #FACETS
89
+
90
+ #DEFAULT FACETS
91
+ #to add additional facets, use the keys defined in the settings.yml file
92
+ config.add_facet_field Settings.FIELDS.INDEX_YEAR, :label => 'Year', :limit => 10
92
93
  config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8
93
- config.add_facet_field Settings.FIELDS.PART_OF, :label => 'Collection', :limit => 8
94
+ config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
95
+ config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', :limit => 8
96
+ config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', :limit => 8
97
+ config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Format', :limit => 8
98
+ config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
99
+ config.add_facet_field Settings.FIELDS.ISO_TOPIC_CATEGORY, :label => 'Theme', :limit => 8
100
+ config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Creator', :limit => 8
101
+ config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
102
+ config.add_facet_field Settings.FIELDS.PROVIDER, label: 'Provider', limit: 8, partial: "icon_facet"
103
+ config.add_facet_field Settings.FIELDS.GEOREFERENCED, :label => 'Georeferenced', :limit => 3
104
+ config.add_facet_field Settings.FIELDS.SOURCE, :label => 'Collection', :limit => 8, :show => false
94
105
 
95
- config.add_facet_field Settings.FIELDS.YEAR, :label => 'Year', :limit => 10
96
106
 
97
- config.add_facet_field Settings.FIELDS.RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
98
- config.add_facet_field Settings.FIELDS.GEOM_TYPE, label: 'Data type', limit: 8, partial: "icon_facet"
99
- config.add_facet_field Settings.FIELDS.FILE_FORMAT, :label => 'Format', :limit => 8
100
- config.add_facet_field Settings.FIELDS.SOURCE, show: false
101
107
 
102
108
  # Have BL send all facet field names to Solr, which has been the default
103
109
  # previously. Simply remove these lines if you'd rather use Solr request
104
110
  # handler defaults, or have no facets.
105
111
  config.add_facet_fields_to_solr_request!
106
112
 
113
+
114
+ #SEARCH RESULTS FIELDS
115
+
107
116
  # solr fields to be displayed in the index (search results) view
108
117
  # The ordering of the field names is the order of the display
109
- # config.add_index_field 'title_display', :label => 'Title:'
110
- # config.add_index_field 'title_vern_display', :label => 'Title:'
111
- # config.add_index_field 'author_display', :label => 'Author:'
112
- # config.add_index_field 'author_vern_display', :label => 'Author:'
113
- # config.add_index_field 'format', :label => 'Format:'
114
- # config.add_index_field 'language_facet', :label => 'Language:'
115
- # config.add_index_field 'published_display', :label => 'Published:'
116
- # config.add_index_field 'published_vern_display', :label => 'Published:'
117
- # config.add_index_field 'lc_callnum_display', :label => 'Call number:'
118
-
119
- # config.add_index_field 'dc_title_t', :label => 'Display Name:'
120
- # config.add_index_field Settings.FIELDS.PROVENANCE, :label => 'Institution:'
118
+ # config.add_index_field Settings.FIELDS.PROVIDER, :label => 'Institution:'
121
119
  # config.add_index_field Settings.FIELDS.RIGHTS, :label => 'Access:'
122
120
  # # config.add_index_field 'Area', :label => 'Area:'
123
121
  # config.add_index_field Settings.FIELDS.SUBJECT, :label => 'Keywords:'
124
- config.add_index_field Settings.FIELDS.YEAR
122
+ config.add_index_field Settings.FIELDS.INDEX_YEAR
125
123
  config.add_index_field Settings.FIELDS.CREATOR
126
124
  config.add_index_field Settings.FIELDS.DESCRIPTION, helper_method: :snippit
127
125
  config.add_index_field Settings.FIELDS.PUBLISHER
128
126
 
129
-
127
+ #ITEM VIEW FIELDS
130
128
 
131
129
  # solr fields to be displayed in the show (single result) view
132
130
  # The ordering of the field names is the order of the display
133
- #
134
131
  # item_prop: [String] property given to span with Schema.org item property
135
132
  # link_to_search: [Boolean] that can be passed to link to a facet search
136
133
  # helper_method: [Symbol] method that can be used to render the value
137
- config.add_show_field Settings.FIELDS.CREATOR, label: 'Author(s)', itemprop: 'author'
134
+
135
+ #DEFAULT FIELDS
136
+ config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator'
138
137
  config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
139
138
  config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
140
- config.add_show_field Settings.FIELDS.PART_OF, label: 'Collection', itemprop: 'isPartOf'
141
139
  config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true
142
140
  config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords', link_to_facet: true
143
- config.add_show_field Settings.FIELDS.TEMPORAL, label: 'Year', itemprop: 'temporal'
144
- config.add_show_field Settings.FIELDS.PROVENANCE, label: 'Held by', link_to_facet: true
141
+ config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Year', itemprop: 'temporal'
142
+ config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', link_to_facet: true
145
143
  config.add_show_field(
146
144
  Settings.FIELDS.REFERENCES,
147
145
  label: 'More details at',
@@ -150,6 +148,50 @@ class CatalogController < ApplicationController
150
148
  helper_method: :render_references_url
151
149
  )
152
150
 
151
+ # OPTIONAL FIELDS
152
+ #optional fields to add to the item view display
153
+
154
+ # config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access Rights', itemprop: 'access_rights'
155
+ # config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title'
156
+ # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid'
157
+ # config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator'
158
+ # config.add_show_field Settings.FIELDS.DATE_ISSUED, label: 'Date Issued', itemprop: 'issued'
159
+ # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range'
160
+ # config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
161
+ # config.add_show_field Settings.FIELDS.FORMAT, label: 'Format', itemprop: 'format'
162
+ # config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File Size', itemprop: 'file_size'
163
+ # config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced'
164
+ # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id'
165
+ # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier'
166
+ # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year'
167
+ # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of'
168
+ # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by'
169
+ # config.add_show_field Settings.FIELDS.ISO_TOPIC_CATEGORY, label: 'Theme', itemprop: 'theme'
170
+ # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword'
171
+ # config.add_show_field Settings.FIELDS.LANGUAGE, label: 'Language', itemprop: 'language'
172
+ # config.add_show_field Settings.FIELDS.LICENSE, label: 'License', itemprop: 'license'
173
+ # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of'
174
+ # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version'
175
+ # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified'
176
+ # config.add_show_field Settings.FIELDS.OVERLAP_FIELD, label: 'Overlap BBox', itemprop: 'overlap_field'
177
+ # config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
178
+ # config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', itemprop: 'provider'
179
+ # config.add_show_field Settings.FIELDS.REFERENCES, label: 'References', itemprop: 'references'
180
+ # config.add_show_field Settings.FIELDS.RELATION, label: 'Relation', itemprop: 'relation'
181
+ # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces'
182
+ # config.add_show_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', itemprop: 'class'
183
+ # config.add_show_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', itemprop: 'type'
184
+ # config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights'
185
+ # config.add_show_field Settings.FIELDS.RIGHTS_HOLDER, label: 'Rights Holder', itemprop: 'rights_holder'
186
+ # config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial_coverage'
187
+ # config.add_show_field Settings.FIELDS.SPATIAL_EXTENT, label: 'Spatial Extent', itemprop: 'geometry'
188
+ # config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject', itemprop: 'subject'
189
+ # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed'
190
+ # config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Temporal Coverage', itemprop: 'temporal'
191
+ # config.add_show_field Settings.FIELDS.TITLE, label: 'Title', itemprop: 'title'
192
+ # config.add_show_field Settings.FIELDS.VERSION, label: 'Version', itemprop: 'version'
193
+ # config.add_show_field Settings.FIELDS.WXS_IDENTIFIER, label: 'Web Service Layer', itemprop: 'wxs_identifier'
194
+
153
195
  # "fielded" search configuration. Used by pulldown among other places.
154
196
  # For supported keys in hash, see rdoc for Blacklight::SearchFields
155
197
  #
@@ -222,10 +264,11 @@ class CatalogController < ApplicationController
222
264
  # label in pulldown is followed by the name of the SOLR field to sort by and
223
265
  # whether the sort is ascending or descending (it must be asc or desc
224
266
  # except in the relevancy case).
225
- config.add_sort_field 'score desc, dc_title_sort asc', :label => 'relevance'
226
- config.add_sort_field "#{Settings.FIELDS.YEAR} desc, dc_title_sort asc", :label => 'year'
227
- config.add_sort_field "#{Settings.FIELDS.PUBLISHER} asc, dc_title_sort asc", :label => 'publisher'
228
- config.add_sort_field 'dc_title_sort asc', :label => 'title'
267
+ config.add_sort_field 'score desc, dct_title_sort asc', :label => 'Relevance'
268
+ config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} desc, dct_title_sort asc", :label => 'Year (Newest first)'
269
+ config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} asc, dct_title_sort asc", :label => 'Year (Oldest first)'
270
+ config.add_sort_field 'dct_title_sort asc', :label => 'Title (A-Z)'
271
+ config.add_sort_field 'dct_title_sort desc', :label => 'Title (Z-A)'
229
272
 
230
273
  # If there are more than this many search results, no spelling ("did you
231
274
  # mean") suggestion is offered.
@@ -0,0 +1,195 @@
1
+ #Solr field mappings for GeoBlacklight Metadata Schema version 1.0
2
+
3
+ # Configurable Logo Used for CartoDB export
4
+ APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
5
+
6
+ # Carto OneClick Service https://carto.com/engine/open-in-carto/
7
+ CARTO_ONECLICK_LINK: 'http://oneclick.carto.com/'
8
+
9
+ # ArcGIS Online Base URL
10
+ ARCGIS_BASE_URL: 'https://www.arcgis.com/home/webmap/viewer.html'
11
+
12
+ # Download path can be configured using this setting
13
+ #DOWNLOAD_PATH: "./tmp/cache/downloads"
14
+
15
+ # DEPRECATED Main Solr geometry field used for spatial search and bounding box. Should be type 'rpt'
16
+ GEOMETRY_FIELD: 'solr_geom'
17
+
18
+ # The bq boost value for spatial search matches within a bounding box
19
+ BBOX_WITHIN_BOOST: '10'
20
+
21
+ # The bf boost value for overlap ratio
22
+ OVERLAP_RATIO_BOOST: '2'
23
+
24
+ # Solr field mappings
25
+ FIELDS:
26
+ :ACCESS_RIGHTS: 'dc_rights_s'
27
+ #:ALTERNATIVE_TITLE: 'dct_alternative_sm'
28
+ #:CENTROID: 'dcat_centroid_ss'
29
+ :CREATOR: 'dc_creator_sm'
30
+ :DATE_ISSUED: 'dct_issued_s'
31
+ #:DATE_RANGE: 'gbl_dateRange_drsim'
32
+ :DESCRIPTION: 'dc_description_sm'
33
+ :FORMAT: 'dc_format_s'
34
+ #:FILE_SIZE: 'gbl_fileSize_s'
35
+ #:GEOREFERENCED: 'gbl_georeferenced_b'
36
+ :ID: 'layer_slug_s'
37
+ :IDENTIFIER: 'dc_identifier_s'
38
+ :INDEX_YEAR: 'solr_year_i'
39
+ #:IS_PART_OF: 'dct_isPartOf_sm'
40
+ #:IS_REPLACED_BY: 'dct_isReplacedBy_sm'
41
+ #:ISO_TOPIC_CATEGORY: 'dcat_theme_sm'
42
+ #:KEYWORD: 'dcat_keyword_sm'
43
+ :LANGUAGE: 'dc_language_sm'
44
+ #:LICENSE: 'dct_license_sm'
45
+ #:MEMBER_OF: 'pcdm_memberOf_sm'
46
+ :METADATA_VERSION: 'geoblacklight_version'
47
+ :MODIFIED: 'layer_modified_dt'
48
+ :OVERLAP_FIELD: 'solr_bboxtype'
49
+ :PUBLISHER: 'dc_publisher_s'
50
+ :PROVIDER: 'dct_provenance_s'
51
+ :REFERENCES: 'dct_references_s'
52
+ #:RELATION: 'dct_relation_sm'
53
+ #:REPLACES: 'dct_replaces_sm'
54
+ #:RESOURCE_CLASS: 'gbl_resourceClass_sm'
55
+ :RESOURCE_TYPE: 'layer_geom_type_s'
56
+ #:RIGHTS: 'dct_rights_sm'
57
+ #:RIGHTS_HOLDER: 'dct_rightsHolder_sm'
58
+ :SOURCE: 'dc_source_sm'
59
+ :SPATIAL_COVERAGE: 'dct_spatial_sm'
60
+ :SPATIAL_EXTENT: 'solr_geom'
61
+ :SUBJECT: 'dc_subject_sm'
62
+ :SUPPRESSED: 'suppressed_b'
63
+ :TEMPORAL_COVERAGE: 'dct_temporal_sm'
64
+ :TITLE: 'dc_title_s'
65
+ #:VERSION: 'dct_isVersionOf_sm'
66
+ :WXS_IDENTIFIER: 'layer_id_s'
67
+
68
+ # Institution deployed at
69
+ INSTITUTION: 'Stanford'
70
+
71
+ # Metadata shown in tool panel
72
+ METADATA_SHOWN:
73
+ - 'mods'
74
+ - 'fgdc'
75
+ - 'iso19139'
76
+ - 'html'
77
+
78
+ # (For external Download) timeout and open_timeout parameters for Faraday
79
+ TIMEOUT_DOWNLOAD: 16
80
+
81
+ # (For WMS inspection) timeout and open_timeout parameters for Faraday
82
+ TIMEOUT_WMS: 4
83
+
84
+ # Use the geometry type for the data relations icon
85
+ USE_GEOM_FOR_RELATIONS_ICON: false
86
+
87
+ # Web services shown in tool panel
88
+ WEBSERVICES_SHOWN:
89
+ - 'wms'
90
+ - 'tms'
91
+ - 'wfs'
92
+ - 'iiif'
93
+ - 'feature_layer'
94
+ - 'tiled_map_layer'
95
+ - 'dynamic_map_layer'
96
+ - 'image_map_layer'
97
+
98
+ # Relationships to display
99
+ RELATIONSHIPS_SHOWN:
100
+ # MEMBER_OF:
101
+ # field: pcdm_memberOf_sm
102
+ # query_type: ancestors
103
+ # icon: nil
104
+ # label: geoblacklight.relations.member_of
105
+ # PART_OF:
106
+ # field: dct_isPartOf_sm
107
+ # query_type: ancestors
108
+ # icon: nil
109
+ # label: geoblacklight.relations.part_of
110
+ # RELATION:
111
+ # field: dct_relation_sm
112
+ # query_type: ancestors
113
+ # icon: nil
114
+ # label: geoblacklight.relations.relation
115
+ # REPLACES:
116
+ # field: dct_replaces_sm
117
+ # query_type: ancestors
118
+ # icon: nil
119
+ # label: geoblacklight.relations.replaces
120
+ # REPLACED_BY:
121
+ # field: dct_isReplacedBy_sm
122
+ # query_type: descendants
123
+ # icon: nil
124
+ # label: geoblacklight.relations.replaced_by
125
+ SOURCE_ANCESTORS:
126
+ field: dct_source_sm
127
+ query_type: ancestors
128
+ icon: pagelines-brands
129
+ label: geoblacklight.relations.ancestor
130
+ SOURCE_DESCENDANTS:
131
+ field: dct_source_sm
132
+ query_type: descendants
133
+ icon: leaf
134
+ label: geoblacklight.relations.descendant
135
+ # VERSION_OF:
136
+ # field: dct_isVersionOf_sm
137
+ # query_type: descendants
138
+ # icon: nil
139
+ # label: geoblacklight.relations.version_of
140
+
141
+ # WMS Parameters
142
+ WMS_PARAMS:
143
+ :SERVICE: 'WMS'
144
+ :VERSION: '1.1.1'
145
+ :REQUEST: 'GetFeatureInfo'
146
+ :STYLES: ''
147
+ :SRS: 'EPSG:4326'
148
+ :EXCEPTIONS: 'application/json'
149
+ :INFO_FORMAT: 'text/html'
150
+
151
+ # Settings for leaflet
152
+ OPACITY_CONTROL: &opacity_control
153
+ CONTROLS:
154
+ - 'Opacity'
155
+
156
+ LEAFLET:
157
+ MAP:
158
+ LAYERS:
159
+ DETECT_RETINA: true
160
+ INDEX:
161
+ DEFAULT: &default
162
+ color: "#1eb300"
163
+ weight: "1"
164
+ radius: "4"
165
+ UNAVAILABLE:
166
+ <<: *default
167
+ color: "#b3001e"
168
+ SELECTED:
169
+ <<: *default
170
+ color: "#006bde"
171
+ VIEWERS:
172
+ WMS:
173
+ <<: *opacity_control
174
+ TILEDMAPLAYER:
175
+ <<: *opacity_control
176
+ FEATURELAYER:
177
+ <<: *opacity_control
178
+ DYNAMICMAPLAYER:
179
+ <<: *opacity_control
180
+ IMAGEMAPLAYER:
181
+ <<: *opacity_control
182
+
183
+ # Toggle the help text feature that offers users context
184
+ HELP_TEXT:
185
+ viewer_protocol:
186
+ - 'dynamic_map_layer'
187
+ - 'feature_layer'
188
+ - 'iiif'
189
+ - 'iiif_manifest'
190
+ - 'image_map_layer'
191
+ - 'index_map'
192
+ - 'tiled_map_layer'
193
+ - 'wms'
194
+ - 'tms'
195
+ - 'oembed'
@@ -19,26 +19,55 @@ BBOX_WITHIN_BOOST: '10'
19
19
  # The bf boost value for overlap ratio
20
20
  OVERLAP_RATIO_BOOST: '2'
21
21
 
22
+ # Homepage Map Geometry
23
+ # Leave null to default to entire world
24
+ # Add a stringified GeoJSON object to scope initial render (example from UMass)
25
+ HOMEPAGE_MAP_GEOM: null
26
+ # HOMEPAGE_MAP_GEOM: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
27
+
22
28
  # Solr field mappings
23
29
  FIELDS:
24
- :FILE_FORMAT: 'dc_format_s'
25
- :GEOMETRY: 'solr_geom'
26
- :WXS_IDENTIFIER: 'layer_id_s'
27
- :RIGHTS: 'dc_rights_s'
28
- :PROVENANCE: 'dct_provenance_s'
29
- :GEOM_TYPE: 'layer_geom_type_s'
30
- :SPATIAL_COVERAGE: 'dct_spatial_sm'
31
- :SUBJECT: 'dc_subject_sm'
30
+ :ACCESS_RIGHTS: 'dct_accessRights_s'
31
+ :ALTERNATIVE_TITLE: 'dct_alternative_sm'
32
+ :CENTROID: 'dcat_centroid_ss'
33
+ :CREATOR: 'dct_creator_sm'
34
+ :DATE_ISSUED: 'dct_issued_s'
35
+ :DATE_RANGE: 'gbl_dateRange_drsim'
36
+ :DESCRIPTION: 'dct_description_sm'
37
+ :FORMAT: 'dct_format_s'
38
+ :FILE_SIZE: 'gbl_fileSize_s'
39
+ :GEOREFERENCED: 'gbl_georeferenced_b'
40
+ :ID: 'id'
41
+ :IDENTIFIER: 'dct_identifier_sm'
42
+ :INDEX_YEAR: 'gbl_indexYear_im'
43
+ :IS_PART_OF: 'dct_isPartOf_sm'
44
+ :IS_REPLACED_BY: 'dct_isReplacedBy_sm'
45
+ :ISO_TOPIC_CATEGORY: 'dcat_theme_sm'
46
+ :KEYWORD: 'dcat_keyword_sm'
47
+ :LANGUAGE: 'dct_language_sm'
48
+ :LICENSE: 'dct_license_sm'
49
+ :MEMBER_OF: 'pcdm_memberOf_sm'
50
+ :METADATA_VERSION: 'gbl_mdVersion_s'
51
+ :MODIFIED: 'gbl_mdModified_dt'
52
+ :OVERLAP_FIELD: 'solr_bboxtype'
53
+ :PUBLISHER: 'dct_publisher_sm'
54
+ :PROVIDER: 'schema_provider_s'
32
55
  :REFERENCES: 'dct_references_s'
33
- :YEAR: 'solr_year_i'
34
- :CREATOR: 'dc_creator_sm'
35
- :DESCRIPTION: 'dc_description_s'
36
- :PUBLISHER: 'dc_publisher_s'
37
- :PART_OF: 'dct_isPartOf_sm'
38
- :TEMPORAL: 'dct_temporal_sm'
39
- :TITLE: 'dc_title_s'
40
- :SOURCE: 'dc_source_sm'
41
- :ISSUED: 'dct_issued_s'
56
+ :RELATION: 'dct_relation_sm'
57
+ :REPLACES: 'dct_replaces_sm'
58
+ :RESOURCE_CLASS: 'gbl_resourceClass_sm'
59
+ :RESOURCE_TYPE: 'gbl_resourceType_sm'
60
+ :RIGHTS: 'dct_rights_sm'
61
+ :RIGHTS_HOLDER: 'dct_rightsHolder_sm'
62
+ :SOURCE: 'dct_source_sm'
63
+ :SPATIAL_COVERAGE: 'dct_spatial_sm'
64
+ :SPATIAL_EXTENT: 'locn_geometry'
65
+ :SUBJECT: 'dct_subject_sm'
66
+ :SUPPRESSED: 'gbl_suppressed_b'
67
+ :TEMPORAL_COVERAGE: 'dct_temporal_sm'
68
+ :TITLE: 'dct_title_s'
69
+ :VERSION: 'dct_isVersionOf_sm'
70
+ :WXS_IDENTIFIER: 'gbl_wxsIdentifier_s'
42
71
 
43
72
  # Institution deployed at
44
73
  INSTITUTION: 'Stanford'
@@ -62,6 +91,7 @@ USE_GEOM_FOR_RELATIONS_ICON: false
62
91
  # Web services shown in tool panel
63
92
  WEBSERVICES_SHOWN:
64
93
  - 'wms'
94
+ - 'tms'
65
95
  - 'wfs'
66
96
  - 'iiif'
67
97
  - 'feature_layer'
@@ -69,6 +99,49 @@ WEBSERVICES_SHOWN:
69
99
  - 'dynamic_map_layer'
70
100
  - 'image_map_layer'
71
101
 
102
+ # Relationships to display
103
+ RELATIONSHIPS_SHOWN:
104
+ MEMBER_OF:
105
+ field: pcdm_memberOf_sm
106
+ query_type: ancestors
107
+ icon: nil
108
+ label: geoblacklight.relations.member_of
109
+ PART_OF:
110
+ field: dct_isPartOf_sm
111
+ query_type: ancestors
112
+ icon: nil
113
+ label: geoblacklight.relations.part_of
114
+ RELATION:
115
+ field: dct_relation_sm
116
+ query_type: ancestors
117
+ icon: nil
118
+ label: geoblacklight.relations.relation
119
+ REPLACES:
120
+ field: dct_replaces_sm
121
+ query_type: ancestors
122
+ icon: nil
123
+ label: geoblacklight.relations.replaces
124
+ REPLACED_BY:
125
+ field: dct_isReplacedBy_sm
126
+ query_type: descendants
127
+ icon: nil
128
+ label: geoblacklight.relations.replaced_by
129
+ SOURCE_ANCESTORS:
130
+ field: dct_source_sm
131
+ query_type: ancestors
132
+ icon: pagelines-brands
133
+ label: geoblacklight.relations.ancestor
134
+ SOURCE_DESCENDANTS:
135
+ field: dct_source_sm
136
+ query_type: descendants
137
+ icon: leaf
138
+ label: geoblacklight.relations.descendant
139
+ VERSION_OF:
140
+ field: dct_isVersionOf_sm
141
+ query_type: descendants
142
+ icon: nil
143
+ label: geoblacklight.relations.version_of
144
+
72
145
  # WMS Parameters
73
146
  WMS_PARAMS:
74
147
  :SERVICE: 'WMS'
@@ -122,4 +195,5 @@ HELP_TEXT:
122
195
  - 'index_map'
123
196
  - 'tiled_map_layer'
124
197
  - 'wms'
198
+ - 'tms'
125
199
  - 'oembed'