geoblacklight 3.8.1 → 4.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +98 -22
  3. data/.gitignore +0 -1
  4. data/.rubocop.yml +5 -1
  5. data/.solr_wrapper +0 -1
  6. data/README.md +1 -1
  7. data/app/assets/images/blacklight/geoblacklight-icons.json +66 -102
  8. data/app/assets/images/blacklight/michigan-state-university.svg +1 -0
  9. data/app/assets/images/blacklight/pennsylvania-state-university.svg +1 -0
  10. data/app/assets/images/blacklight/purdue-university.svg +1 -0
  11. data/app/assets/images/blacklight/the-ohio-state-university.svg +1 -0
  12. data/app/assets/images/blacklight/university-of-chicago.svg +1 -0
  13. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +1 -0
  14. data/app/assets/images/blacklight/university-of-iowa.svg +1 -0
  15. data/app/assets/images/blacklight/university-of-maryland.svg +1 -0
  16. data/app/assets/images/blacklight/university-of-michigan.svg +1 -0
  17. data/app/assets/images/blacklight/university-of-minnesota.svg +1 -0
  18. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +1 -0
  19. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +1 -0
  20. data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
  21. data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
  22. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  23. data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
  24. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  25. data/app/views/catalog/_header_icons.html.erb +1 -1
  26. data/app/views/catalog/_home_text.html.erb +2 -2
  27. data/app/views/relation/_relations.html.erb +15 -0
  28. data/app/views/relation/index.html.erb +4 -16
  29. data/app/views/relation/index.json.jbuilder +6 -2
  30. data/bin/coverage.rb +36 -0
  31. data/config/initializers/rails_config.rb +0 -8
  32. data/config/locales/geoblacklight.en.yml +8 -8
  33. data/geoblacklight.gemspec +4 -4
  34. data/lib/generators/geoblacklight/assets_generator.rb +1 -1
  35. data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -36
  36. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  37. data/lib/generators/geoblacklight/templates/settings.yml +81 -25
  38. data/lib/geoblacklight/constants.rb +0 -3
  39. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  40. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  41. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  42. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  43. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  44. data/lib/geoblacklight/engine.rb +3 -4
  45. data/lib/geoblacklight/item_viewer.rb +1 -13
  46. data/lib/geoblacklight/metadata/base.rb +1 -2
  47. data/lib/geoblacklight/references.rb +1 -1
  48. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  49. data/lib/geoblacklight/relation/descendants.rb +4 -3
  50. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  51. data/lib/geoblacklight/version.rb +1 -1
  52. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  53. data/schema/geoblacklight-schema-aardvark.json +211 -0
  54. data/solr/conf/schema.xml +38 -30
  55. data/solr/conf/solrconfig.xml +18 -18
  56. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +1 -1
  57. data/spec/config/initializers/rails_config_spec.rb +5 -8
  58. data/spec/controllers/catalog_controller_spec.rb +6 -6
  59. data/spec/features/download_layer_spec.rb +1 -1
  60. data/spec/features/esri_viewer_spec.rb +0 -1
  61. data/spec/features/home_page_spec.rb +4 -4
  62. data/spec/features/missing_metadata_spec.rb +2 -2
  63. data/spec/features/relations_spec.rb +2 -2
  64. data/spec/features/search_results_map_spec.rb +2 -1
  65. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  66. data/spec/features/split_view.html.erb_spec.rb +16 -12
  67. data/spec/features/tms_spec.rb +1 -1
  68. data/spec/features/web_services_modal_spec.rb +0 -33
  69. data/spec/fixtures/solr_documents/README.md +48 -36
  70. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  71. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  72. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  73. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  74. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  75. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  76. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  77. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  78. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  79. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  80. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  81. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  82. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  83. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  84. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  85. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  86. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  87. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  88. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  89. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  90. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  91. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  92. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  93. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  94. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  95. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  96. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  97. data/spec/fixtures/solr_documents/oembed.json +34 -17
  98. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  99. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  100. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  101. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  102. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  103. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  104. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  105. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  106. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  107. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  108. data/spec/fixtures/solr_documents/tms.json +33 -17
  109. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  110. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  111. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  112. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  113. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  114. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  115. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  116. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  117. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  118. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  119. data/spec/lib/geoblacklight/metadata/base_spec.rb +0 -18
  120. data/spec/lib/geoblacklight/references_spec.rb +2 -2
  121. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  122. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  123. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  124. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  125. data/spec/spec_helper.rb +0 -5
  126. data/spec/test_app_templates/Gemfile.extra +0 -1
  127. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -1
  128. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
  129. metadata +43 -74
  130. data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +0 -26
  131. data/app/assets/images/blacklight/arizona.svg +0 -4
  132. data/app/assets/images/blacklight/george-mason.svg +0 -4
  133. data/app/assets/images/blacklight/nebraska.svg +0 -4
  134. data/app/assets/images/blacklight/rutgers.svg +0 -5
  135. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
  136. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
  137. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
  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/lib/geoblacklight/faraday_middleware/follow_redirects.rb +0 -176
  142. data/schema/format-values.md +0 -50
  143. data/schema/geoblacklight-schema-deprecated.md +0 -39
  144. data/schema/geoblacklight-schema.md +0 -323
  145. data/schema/geometry-type-values.md +0 -11
  146. data/schema/references.md +0 -23
  147. data/schema/schema-commentary.md +0 -198
  148. data/schema/subjects.md +0 -41
  149. data/schema/type-values.md +0 -10
  150. data/spec/features/tilejson_spec.rb +0 -22
  151. data/spec/features/wmts_spec.rb +0 -34
  152. data/spec/features/xyz_spec.rb +0 -10
  153. data/spec/fixtures/manifests/tilejson.json +0 -21
  154. data/spec/fixtures/manifests/wmts-multiple.xml +0 -813
  155. data/spec/fixtures/manifests/wmts-single.xml +0 -126
  156. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  157. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  158. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
  159. data/spec/fixtures/solr_documents/tilejson.json +0 -38
  160. data/spec/fixtures/solr_documents/wmts-multiple.json +0 -32
  161. data/spec/fixtures/solr_documents/wmts-single-layer.json +0 -38
  162. data/spec/fixtures/solr_documents/xyz.json +0 -29
@@ -2,14 +2,15 @@
2
2
  module Geoblacklight
3
3
  module Relation
4
4
  class Descendants
5
- def initialize(id, repository)
5
+ def initialize(id, field, repository)
6
6
  @search_id = id
7
+ @field = field
7
8
  @repository = repository
8
9
  end
9
10
 
10
11
  def create_search_params
11
- { fq: "#{Settings.FIELDS.SOURCE}:#{@search_id}",
12
- fl: [Settings.FIELDS.TITLE, Settings.FIELDS.UNIQUE_KEY, Settings.FIELDS.GEOM_TYPE] }
12
+ { fq: "#{@field}:#{@search_id}",
13
+ fl: [Settings.FIELDS.TITLE, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE] }
13
14
  end
14
15
 
15
16
  def execute_query
@@ -9,16 +9,31 @@ module Geoblacklight
9
9
  @repository = repository
10
10
  end
11
11
 
12
- def ancestors
13
- @ancestors ||= Geoblacklight::Relation::Ancestors.new(@search_id, @repository).results
12
+ def method_missing(method, *args, &block)
13
+ if Settings.RELATIONSHIPS_SHOWN.key?(method)
14
+ field = Settings.RELATIONSHIPS_SHOWN[method].field
15
+ query_type = query_type(Settings.RELATIONSHIPS_SHOWN[method])
16
+ @results = query_type.new(@search_id, field, @repository).results
17
+ else
18
+ super
19
+ end
14
20
  end
15
21
 
16
- def descendants
17
- @descendants ||= Geoblacklight::Relation::Descendants.new(@search_id, @repository).results
22
+ def respond_to_missing?(method_name, *args)
23
+ Settings.RELATIONSHIPS_SHOWN.key?(method_name) or super
18
24
  end
19
25
 
20
- def empty?
21
- !(ancestors['numFound'].positive? || descendants['numFound'].positive?)
26
+ private
27
+
28
+ def query_type(option)
29
+ case option.query_type
30
+ when 'ancestors'
31
+ Geoblacklight::Relation::Ancestors
32
+ when 'descendants'
33
+ Geoblacklight::Relation::Descendants
34
+ else
35
+ fail ArgumentError, "Bad RelationResponse query_type: #{option.query_type}. Only 'ancestors' or 'descendants' is allowed."
36
+ end
22
37
  end
23
38
  end
24
39
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Geoblacklight
3
- VERSION = '3.8.1'
3
+ VERSION = '4.0.0-alpha'
4
4
  end
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "description": "Schema for GeoBlacklight. See https://github.com/geoblacklight/geoblacklight/wiki/Schema for more details.",
4
4
  "id": "http://geoblacklight.org/v1.0/schema",
5
- "title": "GeoBlacklight Schema",
5
+ "title": "GeoBlacklight Schema - v1.0",
6
6
  "definitions": {
7
7
  "layer": {
8
8
  "title": "layer",
@@ -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>
@@ -70,9 +70,9 @@
70
70
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
71
71
  <query>
72
72
  <maxBooleanClauses>1024</maxBooleanClauses>
73
- <filterCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
74
- <queryResultCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
75
- <documentCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
73
+ <filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0"/>
74
+ <queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
75
+ <documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
76
76
  <enableLazyFieldLoading>true</enableLazyFieldLoading>
77
77
  <queryResultWindowSize>20</queryResultWindowSize>
78
78
  <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
@@ -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>
@@ -24,7 +24,7 @@ RSpec.describe Geoblacklight::HomepageFeatureFacetComponent, type: :component do
24
24
  {
25
25
  icon: 'home',
26
26
  label: 'geoblacklight.home.institution',
27
- facet_field: Settings.FIELDS.PROVENANCE,
27
+ facet_field: Settings.FIELDS.PROVIDER,
28
28
  response: @response
29
29
  }
30
30
  end
@@ -2,14 +2,11 @@
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
13
10
  end
14
11
 
15
12
  it 'Loads new v3.4 Settings.FIELDS defaults' do
@@ -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')
@@ -9,7 +9,6 @@ feature 'feature_layer reference', js: true do
9
9
  expect(page).to have_css 'img.leaflet-image-layer', visible: true
10
10
  end
11
11
  scenario 'displays dynamic layer (all layers)' do
12
- pending 'external service disabled cors access'
13
12
  visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
14
13
  expect(page).to have_css '.leaflet-control-zoom', visible: true
15
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 'Transportation'
24
+ click_link 'Topography'
25
25
  expect(page).to have_css '.filter-name', text: 'Subject'
26
- expect(page).to have_css '.filter-value', text: 'Transportation'
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
@@ -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