geoblacklight 3.3.1 → 4.0.0.pre.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +30 -24
  3. data/.rubocop.yml +5 -0
  4. data/.rubocop_todo.yml +11 -6
  5. data/README.md +1 -1
  6. data/Rakefile +7 -8
  7. data/app/assets/images/blacklight/michigan-state-university.svg +5 -0
  8. data/app/assets/images/blacklight/pennsylvania-state-university.svg +5 -0
  9. data/app/assets/images/blacklight/purdue-university.svg +5 -0
  10. data/app/assets/images/blacklight/the-ohio-state-university.svg +6 -0
  11. data/app/assets/images/blacklight/university-of-chicago.svg +5 -0
  12. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +5 -0
  13. data/app/assets/images/blacklight/university-of-iowa.svg +4 -0
  14. data/app/assets/images/blacklight/university-of-maryland.svg +4 -0
  15. data/app/assets/images/blacklight/university-of-michigan.svg +4 -0
  16. data/app/assets/images/blacklight/university-of-minnesota.svg +4 -0
  17. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +7 -0
  18. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +4 -0
  19. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +41 -0
  20. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
  21. data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +11 -0
  22. data/app/components/geoblacklight/homepage_feature_facet_component.rb +13 -0
  23. data/{lib → app/helpers}/geoblacklight/geoblacklight_helper_behavior.rb +6 -4
  24. data/app/helpers/geoblacklight_helper.rb +0 -21
  25. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  26. data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
  27. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  28. data/app/views/catalog/_arcgis.html.erb +1 -1
  29. data/app/views/catalog/_data_dictionary.html.erb +1 -2
  30. data/app/views/catalog/_downloads_primary.html.erb +1 -1
  31. data/app/views/catalog/_header_icons.html.erb +1 -1
  32. data/app/views/catalog/_home_text.html.erb +7 -29
  33. data/app/views/catalog/_show_header_default.html.erb +1 -1
  34. data/app/views/relation/_relations.html.erb +15 -0
  35. data/app/views/relation/index.html.erb +5 -17
  36. data/app/views/relation/index.json.jbuilder +6 -2
  37. data/config/initializers/new_gbl_settings_defaults_3_4.yml +6 -0
  38. data/config/initializers/rails_config.rb +0 -4
  39. data/config/locales/geoblacklight.en.yml +8 -0
  40. data/geoblacklight.gemspec +1 -1
  41. data/lib/generators/geoblacklight/templates/catalog_controller.rb +82 -35
  42. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  43. data/lib/generators/geoblacklight/templates/settings.yml +87 -22
  44. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  45. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  46. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  47. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  48. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  49. data/lib/geoblacklight/engine.rb +0 -2
  50. data/lib/geoblacklight/references.rb +1 -1
  51. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  52. data/lib/geoblacklight/relation/descendants.rb +4 -3
  53. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  54. data/lib/geoblacklight/version.rb +1 -1
  55. data/lib/geoblacklight/view_helper_override.rb +1 -1
  56. data/lib/geoblacklight.rb +0 -1
  57. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  58. data/schema/geoblacklight-schema-aardvark.json +211 -0
  59. data/solr/conf/schema.xml +38 -30
  60. data/solr/conf/solrconfig.xml +15 -15
  61. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +39 -0
  62. data/spec/config/initializers/rails_config_spec.rb +9 -8
  63. data/spec/controllers/catalog_controller_spec.rb +6 -6
  64. data/spec/features/download_layer_spec.rb +1 -1
  65. data/spec/features/esri_viewer_spec.rb +1 -1
  66. data/spec/features/home_page_spec.rb +4 -4
  67. data/spec/features/layer_opacity_spec.rb +1 -0
  68. data/spec/features/metadata_panel_spec.rb +1 -1
  69. data/spec/features/missing_metadata_spec.rb +2 -2
  70. data/spec/features/relations_spec.rb +2 -2
  71. data/spec/features/search_results_map_spec.rb +2 -1
  72. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  73. data/spec/features/search_spec.rb +5 -0
  74. data/spec/features/split_view.html.erb_spec.rb +15 -11
  75. data/spec/fixtures/solr_documents/README.md +48 -36
  76. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  77. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  78. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  79. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  80. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  81. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  82. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  83. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  84. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  85. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  86. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  87. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  88. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  89. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  90. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  91. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  92. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  93. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  94. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  95. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  96. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  97. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  98. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  99. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  100. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  101. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  102. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  103. data/spec/fixtures/solr_documents/oembed.json +34 -17
  104. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  105. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  106. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  107. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  108. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  109. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  110. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  111. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  112. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  113. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  114. data/spec/fixtures/solr_documents/tms.json +33 -17
  115. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  116. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  117. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  118. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  119. data/spec/{lib → helpers}/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
  120. data/spec/helpers/geoblacklight_helper_spec.rb +0 -19
  121. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  122. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  123. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  124. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  125. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  126. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  127. data/spec/lib/geoblacklight/references_spec.rb +2 -2
  128. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  129. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  130. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  131. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  132. data/spec/spec_helper.rb +2 -0
  133. data/spec/support/view_component_capybara_test_helpers.rb +8 -0
  134. metadata +44 -32
  135. data/app/views/catalog/_document_action.html.erb +0 -6
  136. data/app/views/catalog/_facet_tag_item.html.erb +0 -3
  137. data/app/views/catalog/_facet_tag_layout.html.erb +0 -2
  138. data/app/views/relation/_ancestors.html.erb +0 -8
  139. data/app/views/relation/_descendants.html.erb +0 -15
  140. data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
  141. data/schema/format-values.md +0 -50
  142. data/schema/geoblacklight-schema-deprecated.md +0 -39
  143. data/schema/geoblacklight-schema.md +0 -323
  144. data/schema/geometry-type-values.md +0 -11
  145. data/schema/references.md +0 -23
  146. data/schema/schema-commentary.md +0 -198
  147. data/schema/subjects.md +0 -41
  148. data/schema/type-values.md +0 -10
  149. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  150. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  151. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
@@ -0,0 +1,211 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema#",
3
+ "description": "Schema for GeoBlacklight. See https://opengeometadata.github.io/aardvark/aardvarkMetadata.html for more details.",
4
+ "id": "http://geoblacklight.org/schema/aardvark",
5
+ "title": "GeoBlacklight Schema - Aardvark",
6
+ "type": "object",
7
+ "properties": {
8
+ "dct_title_s": { "type": "string" },
9
+ "dct_alternative_sm": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "dct_description_sm": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "dct_language_sm": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "dct_creator_sm": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ "dct_publisher_sm": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "schema_provider_s": { "type": "string" },
40
+ "gbl_resourceClass_sm": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "enum": [
45
+ "Datasets",
46
+ "Maps",
47
+ "Imagery",
48
+ "Collections",
49
+ "Websites",
50
+ "Web services",
51
+ "Other"
52
+ ]
53
+ }
54
+ },
55
+ "gbl_resourceType_sm": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ },
61
+ "dct_subject_sm": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "dcat_theme_sm": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "string",
71
+ "enum": [
72
+ "Farming",
73
+ "Biota",
74
+ "Boundaries",
75
+ "Climatology, Meteorology and Atmosphere",
76
+ "Economy",
77
+ "Elevation",
78
+ "Environment",
79
+ "Geoscientific Information",
80
+ "Health",
81
+ "Imagery and Base Maps",
82
+ "Intelligence and Military",
83
+ "Inland Waters",
84
+ "Location",
85
+ "Oceans",
86
+ "Planning and Cadastral",
87
+ "Society",
88
+ "Structure",
89
+ "Transportation",
90
+ "Utilities and Communications"
91
+ ]
92
+ }
93
+ },
94
+ "dcat_keyword_sm": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ "dct_temporal_sm": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string"
104
+ }
105
+ },
106
+ "dct_issued_s": { "type": "string" },
107
+ "gbl_indexYear_im": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "integer"
111
+ }
112
+ },
113
+ "gbl_dateRange_drsim": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string"
117
+ }
118
+ },
119
+ "dct_spatial_sm": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ }
124
+ },
125
+ "locn_geometry": { "type": "string" },
126
+ "dcat_centroid_ss": { "type": "string" },
127
+ "dct_relation_sm": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "pcdm_memberOf_sm": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string"
137
+ }
138
+ },
139
+ "dct_isPartOf_sm": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "dct_source_sm": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string"
149
+ }
150
+ },
151
+ "dct_isVersionOf_sm": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string"
155
+ }
156
+ },
157
+ "dct_replaces_sm": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ }
162
+ },
163
+ "dct_isReplacedBy_sm": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "dct_rights_sm": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string"
173
+ }
174
+ },
175
+ "dct_rightsHolder_sm": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "string"
179
+ }
180
+ },
181
+ "dct_license_sm": {
182
+ "type": "array",
183
+ "items": {
184
+ "type": "string"
185
+ }
186
+ },
187
+ "dct_accessRights_s": { "type": "string" },
188
+ "dct_format_s": { "type": "string" },
189
+ "gbl_fileSize_s": { "type": "string" },
190
+ "gbl_wxsIdentifier_s": { "type": "string" },
191
+ "dct_references_s": { "type": "string" },
192
+ "id": { "type": "string" },
193
+ "dct_identifier_sm": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "string"
197
+ }
198
+ },
199
+ "gbl_mdModified_dt": {
200
+ "type": "string",
201
+ "format": "date-time"
202
+ },
203
+ "gbl_mdVersion_s": {
204
+ "type": "string",
205
+ "const": "Aardvark"
206
+ },
207
+ "gbl_suppressed_b": { "type": "boolean" },
208
+ "gbl_georeferenced_b": { "type": "boolean" }
209
+ },
210
+ "required": ["id", "dct_title_s", "gbl_resourceClass_sm", "dct_accessRights_s", "gbl_mdVersion_s"]
211
+ }
data/solr/conf/schema.xml CHANGED
@@ -1,12 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <schema name="geoblacklight-schema" version="1.7">
3
- <uniqueKey>layer_slug_s</uniqueKey>
2
+ <schema name="geoblacklight-schema" version="4.0">
3
+ <uniqueKey>id</uniqueKey>
4
4
  <fields>
5
5
  <field name="_version_" type="long" stored="true" indexed="true"/>
6
6
  <field name="timestamp" type="date" stored="true" indexed="true" default="NOW"/>
7
- <field name="layer_slug_s" type="string" stored="true" indexed="true" required="true"/>
8
7
  <field name="geoblacklight_version" type="string" stored="true" indexed="true"/>
9
- <field name="uuid" type="string" stored="true" indexed="true"/><!-- deprecated -->
8
+ <field name="id" type="string" stored="true" indexed="true" required="true"/>
10
9
 
11
10
  <!-- core generated fields -->
12
11
  <field name="text" type="text_en" stored="false" indexed="true" multiValued="true"
@@ -43,6 +42,9 @@
43
42
 
44
43
  <dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
45
44
 
45
+ <!-- date range (_drsim) -->
46
+ <dynamicField name="*_drsim" type="dateRange" stored="true" indexed="true" multiValued="true"/>
47
+
46
48
  <!-- Spatial field types:
47
49
 
48
50
  Solr3:
@@ -64,6 +66,7 @@
64
66
  <dynamicField name="*_pt" type="location" stored="true" indexed="true"/>
65
67
  <dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/><!-- deprecated -->
66
68
  <dynamicField name="*_geom" type="location_rpt" stored="true" indexed="true"/>
69
+ <dynamicField name="*_geometry" type="location_rpt" stored="true" indexed="true"/>
67
70
  <dynamicField name="*_bboxtype" type="bbox" stored="true" indexed="true"/>
68
71
 
69
72
  </fields>
@@ -82,6 +85,9 @@
82
85
  A Trie based date field for faster date range queries and date faceting. -->
83
86
  <fieldType name="date" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
84
87
 
88
+ <!-- A DateRange based date field for truly faster date range queries. -->
89
+ <fieldType name="dateRange" class="solr.DateRangeField"/>
90
+
85
91
  <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
86
92
  <fieldtype name="binary" class="solr.BinaryField"/>
87
93
 
@@ -143,54 +149,56 @@
143
149
  <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_d"/>
144
150
 
145
151
  <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
146
- geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
152
+ geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
147
153
  <!-- Adding field type for bboxField that enables, among other things, overlap ratio calculations -->
148
154
  <fieldType name="bbox" class="solr.BBoxField"
149
155
  geo="true" distanceUnits="kilometers" numberType="pdouble" />
150
156
  <fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
157
+
158
+
151
159
  </types>
152
160
 
153
161
  <!-- for scoring formula -->
154
162
  <copyField source="dct_spatial_sm" dest="dct_spatial_tmi" maxChars="10000"/>
155
163
  <copyField source="dct_temporal_sm" dest="dct_temporal_tmi" maxChars="10000"/>
156
- <copyField source="dc_creator_sm" dest="dc_creator_tmi" maxChars="1000"/>
157
- <copyField source="dc_description_s" dest="dc_description_ti" maxChars="10000"/>
158
- <copyField source="dc_format_s" dest="dc_format_ti" maxChars="100"/>
159
- <copyField source="dc_identifier_s" dest="dc_identifier_ti" maxChars="100"/>
160
- <copyField source="dc_publisher_s" dest="dc_publisher_ti" maxChars="1000"/>
161
- <copyField source="dc_rights_s" dest="dc_rights_ti" maxChars="100"/>
162
- <copyField source="dct_provenance_s" dest="dct_provenance_ti" maxChars="1000"/>
163
- <copyField source="dc_subject_sm" dest="dc_subject_tmi" maxChars="10000"/>
164
- <copyField source="dc_title_s" dest="dc_title_ti" maxChars="1000"/>
164
+ <copyField source="dct_creator_sm" dest="dc_creator_tmi" maxChars="1000"/>
165
+ <copyField source="dct_description_sm" dest="dc_description_tmi" maxChars="10000"/>
166
+ <copyField source="dct_format_s" dest="dc_format_ti" maxChars="100"/>
167
+ <copyField source="dct_identifier_sm" dest="dc_identifier_tmi" maxChars="100"/>
168
+ <copyField source="dct_publisher_sm" dest="dc_publisher_tmi" maxChars="1000"/>
169
+ <copyField source="dct_accessRights_s" dest="dc_rights_ti" maxChars="100"/>
170
+ <copyField source="schema_provider_s" dest="dct_provider_ti" maxChars="1000"/>
171
+ <copyField source="dct_subject_sm" dest="dc_subject_tmi" maxChars="10000"/>
172
+ <copyField source="dct_title_s" dest="dc_title_ti" maxChars="1000"/>
165
173
  <copyField source="dct_isPartOf_sm" dest="dct_isPartOf_tmi" maxChars="1000"/>
166
- <copyField source="layer_geom_type_s" dest="layer_geom_type_ti" maxChars="100"/>
167
- <copyField source="layer_slug_s" dest="layer_slug_ti" maxChars="100"/>
174
+ <copyField source="locn_geometry_s" dest="layer_geom_type_ti" maxChars="100"/>
175
+ <copyField source="id" dest="layer_slug_ti" maxChars="100"/>
168
176
 
169
177
  <!-- core text search -->
170
178
  <copyField source="*_s" dest="text" />
171
179
  <copyField source="*_sm" dest="text" />
172
180
 
173
181
  <!-- for sorting text fields -->
174
- <copyField source="dct_provenance_s" dest="dct_provenance_sort"/>
175
- <copyField source="dc_publisher_s" dest="dc_publisher_sort"/>
176
- <copyField source="dc_title_s" dest="dc_title_sort"/>
182
+ <copyField source="schema_provider_s" dest="schema_provider_sort"/>
183
+ <copyField source="dct_publisher_sm" dest="dc_publisher_sort"/>
184
+ <copyField source="dct_title_s" dest="dct_title_sort"/>
177
185
 
178
186
  <!-- for spell checking -->
179
- <copyField source="dc_title_s" dest="spell"/>
180
- <copyField source="dc_creator_sm" dest="spell"/>
181
- <copyField source="dc_publisher_s" dest="spell"/>
182
- <copyField source="dct_provenance_s" dest="spell"/>
183
- <copyField source="dc_subject_sm" dest="spell"/>
187
+ <copyField source="dct_title_s" dest="spell"/>
188
+ <copyField source="dct_creator_sm" dest="spell"/>
189
+ <copyField source="dct_publisher_sm" dest="spell"/>
190
+ <copyField source="schema_provider_s" dest="spell"/>
191
+ <copyField source="dct_subject_sm" dest="spell"/>
184
192
  <copyField source="dct_spatial_sm" dest="spell"/>
185
193
 
186
194
  <!-- for suggestions -->
187
- <copyField source="dc_title_s" dest="suggest"/>
188
- <copyField source="dc_creator_sm" dest="suggest"/>
189
- <copyField source="dc_publisher_s" dest="suggest"/>
190
- <copyField source="dct_provenance_s" dest="suggest"/>
191
- <copyField source="dc_subject_sm" dest="suggest"/>
195
+ <copyField source="dct_title_s" dest="suggest"/>
196
+ <copyField source="dct_creator_sm" dest="suggest"/>
197
+ <copyField source="dct_publisher_sm" dest="suggest"/>
198
+ <copyField source="schema_provider_s" dest="suggest"/>
199
+ <copyField source="dct_subject_sm" dest="suggest"/>
192
200
  <copyField source="dct_spatial_sm" dest="suggest"/>
193
201
 
194
202
  <!-- for bbox value -->
195
- <copyField source="solr_geom" dest="solr_bboxtype"/>
203
+ <copyField source="locn_geometry" dest="solr_bboxtype"/>
196
204
  </schema>
@@ -20,7 +20,7 @@
20
20
  this file, see http://wiki.apache.org/solr/SolrConfigXml.
21
21
  -->
22
22
  <config>
23
-
23
+
24
24
  <!-- Controls what version of Lucene various components of Solr
25
25
  adhere to. Generally, you want to use the latest version to
26
26
  get all bug fixes and improvements. It is highly recommended
@@ -28,7 +28,7 @@
28
28
  affect both how text is indexed and queried.
29
29
  -->
30
30
  <luceneMatchVersion>7.6</luceneMatchVersion>
31
-
31
+
32
32
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
33
33
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
34
34
 
@@ -38,7 +38,7 @@
38
38
  <schemaFactory class="ClassicIndexSchemaFactory"/>
39
39
 
40
40
  <dataDir>${solr.blacklight-core.data.dir:}</dataDir>
41
-
41
+
42
42
  <indexConfig>
43
43
  <lockType>${solr.lock.type:native}</lockType>
44
44
  </indexConfig>
@@ -113,7 +113,7 @@
113
113
  <int name="ps">0</int>
114
114
  <float name="tie">0.01</float>
115
115
  <str name="fl">*,score</str>
116
- <str name="sort">score desc, dc_title_sort asc</str>
116
+ <str name="sort">score desc, dct_title_sort asc</str>
117
117
  <str name="q.alt">*:*</str>
118
118
  <str name="qf">
119
119
  text^1
@@ -126,7 +126,7 @@
126
126
  dct_temporal_tmi^5
127
127
  dc_title_ti^6
128
128
  dc_rights_ti^7
129
- dct_provenance_ti^8
129
+ dct_provider_ti^8
130
130
  layer_geom_type_ti^9
131
131
  layer_slug_ti^10
132
132
  dc_identifier_ti^10
@@ -142,7 +142,7 @@
142
142
  dct_temporal_tmi^5
143
143
  dc_title_ti^6
144
144
  dc_rights_ti^7
145
- dct_provenance_ti^8
145
+ dct_provider_ti^8
146
146
  layer_geom_type_ti^9
147
147
  layer_slug_ti^10
148
148
  dc_identifier_ti^10
@@ -151,16 +151,16 @@
151
151
  <int name="facet.mincount">1</int>
152
152
  <int name="facet.limit">10</int>
153
153
  <str name="facet.field">dct_isPartOf_sm</str>
154
- <str name="facet.field">dct_provenance_s</str>
154
+ <str name="facet.field">schema_provider_s</str>
155
155
  <str name="facet.field">dct_spatial_sm</str>
156
- <str name="facet.field">dc_creator_sm</str>
157
- <str name="facet.field">dc_format_s</str>
158
- <str name="facet.field">dc_language_s</str>
159
- <str name="facet.field">dc_publisher_s</str>
160
- <str name="facet.field">dc_rights_s</str>
161
- <str name="facet.field">dc_subject_sm</str>
162
- <str name="facet.field">layer_geom_type_s</str>
163
- <str name="facet.field">solr_year_i</str>
156
+ <str name="facet.field">dct_creator_sm</str>
157
+ <str name="facet.field">dct_format_s</str>
158
+ <str name="facet.field">dct_language_sm</str>
159
+ <str name="facet.field">dct_publisher_sm</str>
160
+ <str name="facet.field">dct_accessRights_s</str>
161
+ <str name="facet.field">dct_subject_sm</str>
162
+ <str name="facet.field">locn_geometry_s</str>
163
+ <str name="facet.field">gbl_indexYear_im</str>
164
164
 
165
165
  <str name="spellcheck">true</str>
166
166
  </lst>
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+ require 'spec_helper'
3
+
4
+ RSpec.describe Geoblacklight::HomepageFeatureFacetComponent, type: :component do
5
+ subject(:rendered) do
6
+ render_inline_to_capybara_node(described_class.new(**kargs))
7
+ end
8
+
9
+ # Build a search
10
+ let(:context) { { whatever: :value } }
11
+ let(:service) { Blacklight::SearchService.new(config: blacklight_config, user_params: user_params, **context) }
12
+ let(:repository) { Blacklight::Solr::Repository.new(blacklight_config) }
13
+ let(:user_params) { {} }
14
+ let(:blacklight_config) { Blacklight::Configuration.new }
15
+ let(:copy_of_catalog_config) { ::CatalogController.blacklight_config.deep_copy }
16
+ let(:blacklight_solr) { RSolr.connect(Blacklight.connection_config.except(:adapter)) }
17
+
18
+ describe 'homepage' do
19
+ before do
20
+ (@response, @document_list) = service.search_results
21
+ end
22
+
23
+ let(:kargs) do
24
+ {
25
+ icon: 'home',
26
+ label: 'geoblacklight.home.institution',
27
+ facet_field: Settings.FIELDS.PROVIDER,
28
+ response: @response
29
+ }
30
+ end
31
+
32
+ it 'includes facet links' do
33
+ expect(rendered).to have_selector('div.category-block')
34
+ expect(rendered).to have_selector('div.category-icon')
35
+ expect(rendered).to have_selector('a.home-facet-link')
36
+ expect(rendered).to have_selector('a.more_facets_link')
37
+ end
38
+ end
39
+ end
@@ -2,13 +2,14 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe 'Config' do
5
- it 'Loads new v3.3 Settings.FIELDS defaults' do
6
- expect(Settings.FIELDS.IDENTIFIER).to eq 'dc_identifier_s'
7
- expect(Settings.FIELDS.LANGUAGE).to eq 'dc_language_s'
8
- expect(Settings.FIELDS.LAYER_MODIFIED).to eq 'layer_modified_dt'
9
- expect(Settings.FIELDS.SOURCE).to eq 'dc_source_sm'
10
- expect(Settings.FIELDS.SUPPRESSED).to eq 'suppressed_b'
11
- expect(Settings.FIELDS.TYPE).to eq 'dc_type_s'
12
- expect(Settings.FIELDS.UNIQUE_KEY).to eq 'layer_slug_s'
5
+ it 'Loads new Aardvark relationships' do
6
+ expect(Settings).to respond_to('RELATIONSHIPS_SHOWN')
7
+ [:field, :query_type, :icon, :label].each do |method|
8
+ expect(Settings.RELATIONSHIPS_SHOWN.MEMBER_OF).to respond_to(method)
9
+ end
10
+ end
11
+
12
+ it 'Loads new v3.4 Settings.FIELDS defaults' do
13
+ expect(Settings.HOMEPAGE_MAP_GEOM).to eq nil
13
14
  end
14
15
  end
@@ -71,13 +71,13 @@ describe CatalogController, type: :controller do
71
71
  expect(response.status).to eq 200
72
72
  expect(response.body).not_to be_empty
73
73
  response_values = JSON.parse(response.body)
74
- expect(response_values).to include 'geoblacklight_version' => '1.0'
74
+ expect(response_values).to include 'gbl_mdVersion_s' => 'Aardvark'
75
75
  expect(response_values).to include Settings.FIELDS.TITLE => '100 Foot Grid Cambridge MA 2004'
76
- expect(response_values).to include Settings.FIELDS.IDENTIFIER => 'urn:geodata.tufts.edu:Tufts.CambridgeGrid100_04'
77
- expect(response_values).to include Settings.FIELDS.RIGHTS => 'Public'
78
- expect(response_values).to include Settings.FIELDS.PROVENANCE => 'Tufts'
79
- expect(response_values).to include Settings.FIELDS.UNIQUE_KEY => 'tufts-cambridgegrid100-04'
80
- expect(response_values).to include Settings.FIELDS.GEOMETRY => 'ENVELOPE(-71.163984, -71.052581, 42.408316, 42.34757)'
76
+ expect(response_values).to include Settings.FIELDS.IDENTIFIER => ['urn:geodata.tufts.edu:Tufts.CambridgeGrid100_04']
77
+ expect(response_values).to include Settings.FIELDS.ACCESS_RIGHTS => 'Public'
78
+ expect(response_values).to include Settings.FIELDS.PROVIDER => 'Tufts'
79
+ expect(response_values).to include Settings.FIELDS.ID => 'tufts-cambridgegrid100-04'
80
+ expect(response_values).to include Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-71.163984,-71.052581,42.408316,42.34757)'
81
81
  end
82
82
  end
83
83
  end
@@ -41,7 +41,7 @@ feature 'Download layer' do
41
41
  end
42
42
  scenario 'clicking jpg download button should redirect to external image' do
43
43
  visit solr_document_path('princeton-02870w62c')
44
- expect(page).to have_css("a.btn.btn-default[href='https://iiif-cloud.princeton.edu/iiif/2/6c%2F52%2F12%2F6c5212e81bc845f59bb1cdc740a88bad%2Fintermediate_file/full/full/0/default.jpg']", text: 'Original JPG')
44
+ expect(page).to have_css("a.btn.btn-default[href='https://libimages.princeton.edu/loris/pudl0076/map_pownall/00000001.jp2/full/full/0/default.jpg']", text: 'Original JPG')
45
45
  end
46
46
  scenario 'options should be available under toggle' do
47
47
  visit solr_document_path('mit-f6rqs4ucovjk2')
@@ -3,12 +3,12 @@ require 'spec_helper'
3
3
 
4
4
  feature 'feature_layer reference', js: true do
5
5
  scenario 'displays image map layer' do
6
+ skip 'CORS error - Purdue web services are down'
6
7
  visit solr_document_path '32653ed6-8d83-4692-8a06-bf13ffe2c018'
7
8
  expect(page).to have_css '.leaflet-control-zoom', visible: true
8
9
  expect(page).to have_css 'img.leaflet-image-layer', visible: true
9
10
  end
10
11
  scenario 'displays dynamic layer (all layers)' do
11
- pending 'external service disabled cors access'
12
12
  visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
13
13
  expect(page).to have_css '.leaflet-control-zoom', visible: true
14
14
  expect(page).to have_css 'img.leaflet-image-layer', visible: true
@@ -21,9 +21,9 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
21
21
  expect(page).to have_css '.category-block', count: 4
22
22
  expect(page).to have_css '.home-facet-link', count: 36
23
23
  expect(page).to have_css 'a.more_facets_link', count: 4
24
- click_link 'Elevation'
24
+ click_link 'Topography'
25
25
  expect(page).to have_css '.filter-name', text: 'Subject'
26
- expect(page).to have_css '.filter-value', text: 'Elevation'
26
+ expect(page).to have_css '.filter-value', text: 'Topography'
27
27
  end
28
28
  scenario 'map should be visible' do
29
29
  within '#main-container' do
@@ -39,8 +39,8 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
39
39
  expect(page).to have_css '#documents'
40
40
  end
41
41
  scenario 'can search by placename' do
42
- click_link 'Minnesota, United States'
42
+ click_link 'New York, New York'
43
43
  results = page.all(:css, 'article.document')
44
- expect(results.count).to equal(3)
44
+ expect(results.count).to equal(4)
45
45
  end
46
46
  end
@@ -9,6 +9,7 @@ feature 'Layer opacity', js: true do
9
9
  end
10
10
 
11
11
  scenario 'ESRI image service layer should have opacity control' do
12
+ skip 'CORS error - Purdue web services are down'
12
13
  visit solr_document_path('32653ed6-8d83-4692-8a06-bf13ffe2c018')
13
14
  expect(page).to have_css('div.opacity-text', text: '75%')
14
15
  expect(page.find('img.leaflet-image-layer', match: :first)[:style]).to match(/opacity: 0.75;/)
@@ -29,7 +29,7 @@ feature 'Metadata tools' do
29
29
  allow(connection).to receive(:get).and_return(response)
30
30
  allow(Faraday).to receive(:new).with(url: 'http://purl.stanford.edu/cg357zz0321.mods').and_return(connection)
31
31
 
32
- allow(Faraday).to receive(:new).with(hash_including(url: 'http://127.0.0.1:8983/solr/blacklight-core/')).and_call_original
32
+ allow(Faraday).to receive(:new).with(hash_including(url: %r{solr/blacklight-core})).and_call_original
33
33
  end
34
34
 
35
35
  scenario 'shows up as HTML' do
@@ -14,8 +14,8 @@ feature 'Missing metadata', js: true do
14
14
  visit solr_document_path('05d-03-noGeomType')
15
15
  expect(page).to have_css('#map')
16
16
  end
17
- scenario 'Yields error free show page for no dct_provenance_s' do
18
- visit solr_document_path('99-0001-noProvenance')
17
+ scenario 'Yields error free show page for no dct_provider_s' do
18
+ visit solr_document_path('99-0001-noprovider')
19
19
  expect(page).to have_css('#map')
20
20
  end
21
21
  scenario 'Yields error free show page for no solr_geom' do
@@ -15,8 +15,8 @@ feature 'Display related documents' do
15
15
  scenario 'Relations should respond to json' do
16
16
  visit relations_solr_document_path('nyu_2451_34635', format: 'json')
17
17
  response = JSON.parse(page.body)
18
- expect(response['ancestors']['numFound']).to eq 0
19
- expect(response['descendants']['docs'].first[Settings.FIELDS.UNIQUE_KEY]).to eq 'nyu_2451_34502'
18
+ expect(response['relations']).not_to respond_to('source_ancestors')
19
+ expect(response['relations']['source_descendants']['docs'].first[Settings.FIELDS.ID]).to eq 'nyu_2451_34502'
20
20
  expect(response['current_doc']).to eq 'nyu_2451_34635'
21
21
  end
22
22
 
@@ -7,6 +7,7 @@ feature 'search results map', js: true do
7
7
  expect(page).to have_css '#map'
8
8
  end
9
9
  scenario 'view is scoped to Minnesota' do
10
+ pending 'Minnesota fixtures have changed.'
10
11
  visit root_path
11
12
  click_link 'Minnesota, United States'
12
13
  expect(page).to have_css '#map'
@@ -35,7 +36,7 @@ feature 'search results map', js: true do
35
36
  end
36
37
  scenario 'view is scoped to NYC' do
37
38
  visit root_path
38
- click_link 'New York, New York, United States'
39
+ click_link 'New York, New York'
39
40
  expect(page).to have_css '#map'
40
41
  bbox = page.find('#map')['data-js-map-render-bbox']
41
42
 
@@ -8,7 +8,7 @@ feature 'spatial search results overlap ratio' do
8
8
  # BBox param is the US upper midwest and Canada, roughly centered on the state of Minnesota
9
9
  visit search_catalog_path(
10
10
  bbox: '-103.196521 39.21962 -84.431873 53.63497',
11
- "f[#{Settings.FIELDS.PROVENANCE}][]": 'Minnesota'
11
+ "f[#{Settings.FIELDS.PROVIDER}][]": 'University of Minnesota'
12
12
  )
13
13
 
14
14
  # MN State result
@@ -30,7 +30,7 @@ feature 'spatial search results overlap ratio' do
30
30
  # BBox param is the center to western edge of New York state and Canada, roughly centered on Lake Ontario
31
31
  visit search_catalog_path(
32
32
  bbox: '-83.750499 40.41709 -74.368175 47.963663',
33
- "f[#{Settings.FIELDS.PROVENANCE}][]": 'Cornell'
33
+ "f[#{Settings.FIELDS.PROVIDER}][]": 'Cornell'
34
34
  )
35
35
 
36
36
  # NY State result
@@ -9,6 +9,11 @@ feature 'Search' do
9
9
 
10
10
  scenario 'When searching child records from a parent record, supressed records are not hidden', js: true do
11
11
  visit '/catalog/princeton-1r66j405w'
12
+
13
+ within('.card.relations.relationship-source_descendants') do
14
+ expect(page).to have_link(href: /f%5Bdct_source_sm%5D/)
15
+ end
16
+
12
17
  click_link 'Browse all 4 records...'
13
18
  expect(page).to have_css '.document', count: 4
14
19
  end