geoblacklight 3.4.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  4. data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
  5. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  6. data/app/views/catalog/_header_icons.html.erb +1 -1
  7. data/app/views/catalog/_home_text.html.erb +2 -2
  8. data/app/views/relation/_relations.html.erb +15 -0
  9. data/app/views/relation/index.html.erb +4 -16
  10. data/app/views/relation/index.json.jbuilder +6 -2
  11. data/config/initializers/rails_config.rb +0 -8
  12. data/config/locales/geoblacklight.en.yml +8 -0
  13. data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -36
  14. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  15. data/lib/generators/geoblacklight/templates/settings.yml +81 -22
  16. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  17. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  18. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  19. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  20. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  21. data/lib/geoblacklight/references.rb +1 -1
  22. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  23. data/lib/geoblacklight/relation/descendants.rb +4 -3
  24. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  25. data/lib/geoblacklight/version.rb +1 -1
  26. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  27. data/schema/geoblacklight-schema-aardvark.json +211 -0
  28. data/solr/conf/schema.xml +38 -30
  29. data/solr/conf/solrconfig.xml +15 -15
  30. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +1 -1
  31. data/spec/config/initializers/rails_config_spec.rb +5 -8
  32. data/spec/controllers/catalog_controller_spec.rb +6 -6
  33. data/spec/features/download_layer_spec.rb +1 -1
  34. data/spec/features/esri_viewer_spec.rb +0 -1
  35. data/spec/features/home_page_spec.rb +4 -4
  36. data/spec/features/missing_metadata_spec.rb +2 -2
  37. data/spec/features/relations_spec.rb +2 -2
  38. data/spec/features/search_results_map_spec.rb +2 -1
  39. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  40. data/spec/features/split_view.html.erb_spec.rb +15 -11
  41. data/spec/fixtures/solr_documents/README.md +48 -36
  42. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  43. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  44. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  45. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  46. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  47. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  48. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  49. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  50. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  51. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  52. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  53. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  54. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  55. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  56. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  57. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  58. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  59. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  60. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  61. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  62. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  63. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  64. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  65. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  66. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  67. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  68. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  69. data/spec/fixtures/solr_documents/oembed.json +34 -17
  70. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  71. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  72. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  73. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  74. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  75. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  76. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  77. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  78. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  79. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  80. data/spec/fixtures/solr_documents/tms.json +33 -17
  81. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  82. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  83. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  84. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  85. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  86. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  87. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  88. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  89. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  90. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  91. data/spec/lib/geoblacklight/references_spec.rb +2 -2
  92. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  93. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  94. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  95. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  96. metadata +15 -19
  97. data/app/views/relation/_ancestors.html.erb +0 -8
  98. data/app/views/relation/_descendants.html.erb +0 -15
  99. data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
  100. data/schema/format-values.md +0 -50
  101. data/schema/geoblacklight-schema-deprecated.md +0 -39
  102. data/schema/geoblacklight-schema.md +0 -323
  103. data/schema/geometry-type-values.md +0 -11
  104. data/schema/references.md +0 -23
  105. data/schema/schema-commentary.md +0 -198
  106. data/schema/subjects.md +0 -41
  107. data/schema/type-values.md +0 -10
  108. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  109. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  110. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 623646febc134a8ecd4c02ceaf7f4d745918f1e1e2356f4814b17d0a511a9e0b
4
- data.tar.gz: 1ca956025bd1cebcd15f8745a60a6155a193f669dd02fcd9e097b7d5daa66ed7
3
+ metadata.gz: 040dd47045422f5690fcbf94d66341e1a6c7f23a17f51d08c619d5735d1e8da0
4
+ data.tar.gz: 4433d184dca84709c3d448d1b37e518934f8f0504aa05008c2427754d85c37d8
5
5
  SHA512:
6
- metadata.gz: ec59a0e309a167f37d2d0bff83e13498879b94827d711145c91bd05f3abd24616bd31c78f39ace056ad660c10512f1166f5d03919ad89f1214c2febe405838e2
7
- data.tar.gz: 8260fb2cfb48040bda8a1d6394c3d88bc339eec409e08096c713cddb0eb17ef92e5e9599a5d43a784ce6287dd69af7e7c6836b66e331deaa2dff58f4f012df9f
6
+ metadata.gz: b3b8fc3bcf5d9796d7191d47c1d23e08426cf5d02227a4a3b8cd9325a4c404abf92c2f27935468b6c5673ca003672ab0955a95d7d1fadc8d19d8966bb9999d6b
7
+ data.tar.gz: 229378574de83e5899e25f0947de49f37e6e61946a7e2a0abe40cca934e1f8c06447aa2f86405de31ad05fe325574eb1c5f8c1350709eafb006783a324fdb73a
data/.rubocop.yml CHANGED
@@ -35,6 +35,7 @@ Layout/LineLength:
35
35
  - 'bin/coverage.rb'
36
36
  - 'lib/generators/geoblacklight/install_generator.rb'
37
37
  - 'lib/geoblacklight/relation/ancestors.rb'
38
+ - 'lib/geoblacklight/relation/relation_response.rb'
38
39
  - 'lib/tasks/geoblacklight.rake'
39
40
  - 'Rakefile'
40
41
  - 'spec/**/*'
@@ -80,6 +81,10 @@ RSpec/DescribeClass:
80
81
  RSpec/ExampleLength:
81
82
  Enabled: false
82
83
 
84
+ RSpec/MultipleExpectations:
85
+ Exclude:
86
+ - 'spec/features/split_view.html.erb_spec.rb'
87
+
83
88
  RSpec/VerifiedDoubles:
84
89
  Exclude:
85
90
  - 'spec/lib/geoblacklight/download/hgl_download_spec.rb'
@@ -18,11 +18,11 @@ module Geoblacklight
18
18
  private
19
19
 
20
20
  def issued
21
- fetch(Settings.FIELDS.ISSUED, nil)
21
+ fetch(Settings.FIELDS.DATE_ISSUED, nil)
22
22
  end
23
23
 
24
24
  def format
25
- fetch(Settings.FIELDS.FILE_FORMAT, nil)
25
+ fetch(Settings.FIELDS.FORMAT, nil)
26
26
  end
27
27
  end
28
28
  end
@@ -48,7 +48,7 @@ module Geoblacklight
48
48
  end
49
49
 
50
50
  def same_institution?
51
- fetch(Settings.FIELDS.PROVENANCE, '').casecmp(Settings.INSTITUTION.downcase).zero?
51
+ fetch(Settings.FIELDS.PROVIDER, '').casecmp(Settings.INSTITUTION.downcase).zero?
52
52
  end
53
53
 
54
54
  def iiif_download
@@ -72,7 +72,7 @@ module Geoblacklight
72
72
  end
73
73
 
74
74
  def geom_field
75
- fetch(Settings.FIELDS.GEOMETRY, '')
75
+ fetch(Settings.FIELDS.SPATIAL_EXTENT, '')
76
76
  end
77
77
 
78
78
  def geometry
@@ -84,7 +84,7 @@ module Geoblacklight
84
84
  end
85
85
 
86
86
  def file_format
87
- fetch(Settings.FIELDS.FILE_FORMAT)
87
+ fetch(Settings.FIELDS.FORMAT)
88
88
  end
89
89
 
90
90
  ##
@@ -100,7 +100,7 @@ module Geoblacklight
100
100
  private
101
101
 
102
102
  def rights_field_data
103
- fetch(Settings.FIELDS.RIGHTS, '')
103
+ fetch(Settings.FIELDS.ACCESS_RIGHTS, '')
104
104
  end
105
105
 
106
106
  def method_missing(method, *args, &block)
@@ -16,9 +16,9 @@ module Geoblacklight
16
16
  def add_spatial_params(solr_params)
17
17
  if blacklight_params[:bbox]
18
18
  solr_params[:bq] ||= []
19
- solr_params[:bq] << "#{Settings.FIELDS.GEOMETRY}:\"IsWithin(#{envelope_bounds})\"#{boost}"
19
+ solr_params[:bq] << "#{Settings.FIELDS.SPATIAL_EXTENT}:\"IsWithin(#{envelope_bounds})\"#{boost}"
20
20
  solr_params[:fq] ||= []
21
- solr_params[:fq] << "#{Settings.FIELDS.GEOMETRY}:\"Intersects(#{envelope_bounds})\""
21
+ solr_params[:fq] << "#{Settings.FIELDS.SPATIAL_EXTENT}:\"Intersects(#{envelope_bounds})\""
22
22
 
23
23
  if Settings.OVERLAP_RATIO_BOOST
24
24
  solr_params[:bf] ||= []
@@ -62,7 +62,7 @@ module Geoblacklight
62
62
 
63
63
  # Do not suppress action_documents method calls for individual documents
64
64
  # ex. CatalogController#web_services (exportable views)
65
- return if solr_params[:q]&.include?("{!lucene}#{Settings.FIELDS.UNIQUE_KEY}:")
65
+ return if solr_params[:q]&.include?("{!lucene}#{Settings.FIELDS.ID}:")
66
66
 
67
67
  solr_params[:fq] ||= []
68
68
  solr_params[:fq] << "-#{Settings.FIELDS.SUPPRESSED}: true"
@@ -1,3 +1,3 @@
1
1
  <%= geoblacklight_icon(document[Settings.FIELDS.GEOM_TYPE], classes: 'svg_tooltip') %>
2
- <%= geoblacklight_icon(document[Settings.FIELDS.PROVENANCE], classes: 'svg_tooltip') %>
2
+ <%= geoblacklight_icon(document[Settings.FIELDS.PROVIDER], classes: 'svg_tooltip') %>
3
3
  <%= geoblacklight_icon(document[Settings.FIELDS.RIGHTS], classes: 'svg_tooltip') %>
@@ -3,9 +3,9 @@
3
3
  <div class='col-sm'>
4
4
  <%= content_tag :h3, t('geoblacklight.home.category_heading') %>
5
5
  <div class='row'>
6
- <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVENANCE, response: @response)) %>
6
+ <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVIDER, response: @response)) %>
7
7
 
8
- <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.data_type', facet_field: Settings.FIELDS.GEOM_TYPE, response: @response)) %>
8
+ <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.data_type', facet_field: Settings.FIELDS.RESOURCE_TYPE, response: @response)) %>
9
9
  </div>
10
10
  <div class='row'>
11
11
  <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'globe', label: 'geoblacklight.home.placename', facet_field: Settings.FIELDS.SPATIAL_COVERAGE, response: @response)) %>
@@ -0,0 +1,15 @@
1
+ <% @relations.send(rel)['docs'][0..2].each do |entry| %>
2
+ <li class="list-group-item border-bottom-0">
3
+ <%= link_to solr_document_path(entry[Settings.FIELDS.ID]) do %>
4
+ <%= relations_icon(entry, value.icon) unless value.icon.nil? %>
5
+ <%= entry[Settings.FIELDS.TITLE] %>
6
+ <% end %>
7
+ </li>
8
+ <% end %>
9
+ <% unless (@relations.send(rel)['numFound'].to_i <= 3) %>
10
+ <li class="list-group-item border-bottom-0">
11
+ <%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
12
+ <%= t('geoblacklight.relations.browse_all', count: @relations.send(rel)['numFound']) %>
13
+ <% end %>
14
+ </li>
15
+ <% end %>
@@ -1,24 +1,12 @@
1
- <% unless @relations.empty? %>
2
- <% unless @relations.ancestors['numFound'].to_i.zero? %>
1
+ <%- Settings.RELATIONSHIPS_SHOWN.each do |rel, value| %>
2
+ <% unless @relations.send(rel)['numFound'].to_i.zero? %>
3
3
  <div class="card relations">
4
4
  <div class="card-header">
5
- <h2 class="mb-0 h6"><%= t('geoblacklight.relations.ancestor') %></h2>
5
+ <h2 class="mb-0 h6"><%= t("#{value.label}") %></h2>
6
6
  </div>
7
7
 
8
8
  <ul class="list-group list-group-flush">
9
- <%= render 'ancestors' %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <% unless @relations.descendants['numFound'].to_i.zero? %>
15
- <div class="card relations">
16
- <div class="card-header">
17
- <h2 class="mb-0 h6"><%= t('geoblacklight.relations.descendant') %></h2>
18
- </div>
19
-
20
- <ul class="list-group list-group-flush">
21
- <%= render 'descendants' %>
9
+ <%= render partial: 'relations', locals: { rel: rel, value: value } %>
22
10
  </ul>
23
11
  </div>
24
12
  <% end %>
@@ -1,4 +1,8 @@
1
1
  # frozen_string_literal: true
2
- json.ancestors @relations.ancestors
3
- json.descendants @relations.descendants
2
+
4
3
  json.current_doc @relations.search_id
4
+ json.relations do
5
+ Settings.RELATIONSHIPS_SHOWN.each do |key, _value|
6
+ json.set! key.downcase.to_s, @relations.send(key) unless @relations.send(key)['numFound'].to_i.zero?
7
+ end
8
+ end
@@ -2,11 +2,3 @@
2
2
  Config.setup do |config|
3
3
  config.const_name = 'Settings'
4
4
  end
5
-
6
- # GeoBlacklight v3.3 - New Settings.FIELDS values
7
- Settings.prepend_source!(File.expand_path('new_gbl_settings_defaults_3_3.yml', __dir__))
8
- Settings.reload!
9
-
10
- # GeoBlacklight v3.4 - New Settings.HOMEPAGE_MAP_GEOM option
11
- Settings.prepend_source!(File.expand_path('new_gbl_settings_defaults_3_4.yml', __dir__))
12
- Settings.reload!
@@ -68,6 +68,14 @@ en:
68
68
  relations:
69
69
  ancestor: 'Source Datasets'
70
70
  descendant: 'Derived Datasets'
71
+ member_of: 'Belongs to collection...'
72
+ part_of: 'Is part of...'
73
+ relation: 'Related Records'
74
+ replaces: 'Item replaces...'
75
+ replaced_by: 'Item replaced by...'
76
+ source: 'Source Datasets'
77
+ version_of: 'Version of...'
78
+
71
79
  browse_all: "Browse all %{count} records..."
72
80
  metadata:
73
81
  toggle_summary: 'Toggle summary'
@@ -29,7 +29,7 @@ class CatalogController < ApplicationController
29
29
  #
30
30
  config.default_document_solr_params = {
31
31
  :qt => 'document',
32
- :q => "{!raw f=#{Settings.FIELDS.UNIQUE_KEY} 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,11 +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 (Newest first)'
227
- config.add_sort_field "#{Settings.FIELDS.YEAR} asc, dc_title_sort asc", :label => 'Year (Oldest first)'
228
- config.add_sort_field 'dc_title_sort asc', :label => 'Title (A-Z)'
229
- config.add_sort_field 'dc_title_sort desc', :label => 'Title (Z-A)'
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)'
230
272
 
231
273
  # If there are more than this many search results, no spelling ("did you
232
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'