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.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
- data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
- data/app/views/catalog/_header_icons.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/relation/_relations.html.erb +15 -0
- data/app/views/relation/index.html.erb +4 -16
- data/app/views/relation/index.json.jbuilder +6 -2
- data/config/initializers/rails_config.rb +0 -8
- data/config/locales/geoblacklight.en.yml +8 -0
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -36
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
- data/lib/generators/geoblacklight/templates/settings.yml +81 -22
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/hgl_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/references.rb +1 -1
- data/lib/geoblacklight/relation/ancestors.rb +4 -3
- data/lib/geoblacklight/relation/descendants.rb +4 -3
- data/lib/geoblacklight/relation/relation_response.rb +21 -6
- data/lib/geoblacklight/version.rb +1 -1
- data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
- data/schema/geoblacklight-schema-aardvark.json +211 -0
- data/solr/conf/schema.xml +38 -30
- data/solr/conf/solrconfig.xml +15 -15
- data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +1 -1
- data/spec/config/initializers/rails_config_spec.rb +5 -8
- data/spec/controllers/catalog_controller_spec.rb +6 -6
- data/spec/features/download_layer_spec.rb +1 -1
- data/spec/features/esri_viewer_spec.rb +0 -1
- data/spec/features/home_page_spec.rb +4 -4
- data/spec/features/missing_metadata_spec.rb +2 -2
- data/spec/features/relations_spec.rb +2 -2
- data/spec/features/search_results_map_spec.rb +2 -1
- data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +15 -11
- data/spec/fixtures/solr_documents/README.md +48 -36
- data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
- data/spec/fixtures/solr_documents/actual-point1.json +47 -27
- data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
- data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
- data/spec/fixtures/solr_documents/all-relationships.json +48 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
- data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
- data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
- data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
- data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
- data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
- data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
- data/spec/fixtures/solr_documents/index_map_point.json +54 -26
- data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
- data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
- data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
- data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
- data/spec/fixtures/solr_documents/no_spatial.json +37 -19
- data/spec/fixtures/solr_documents/oembed.json +34 -17
- data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
- data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
- data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
- data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
- data/spec/fixtures/solr_documents/restricted-line.json +52 -21
- data/spec/fixtures/solr_documents/the-related-record.json +27 -0
- data/spec/fixtures/solr_documents/tms.json +33 -17
- data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
- data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
- data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
- data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +1 -1
- data/spec/lib/geoblacklight/references_spec.rb +2 -2
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
- metadata +15 -19
- data/app/views/relation/_ancestors.html.erb +0 -8
- data/app/views/relation/_descendants.html.erb +0 -15
- data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
- data/schema/format-values.md +0 -50
- data/schema/geoblacklight-schema-deprecated.md +0 -39
- data/schema/geoblacklight-schema.md +0 -323
- data/schema/geometry-type-values.md +0 -11
- data/schema/references.md +0 -23
- data/schema/schema-commentary.md +0 -198
- data/schema/subjects.md +0 -41
- data/schema/type-values.md +0 -10
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
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="
|
3
|
-
<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="
|
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="
|
157
|
-
<copyField source="
|
158
|
-
<copyField source="
|
159
|
-
<copyField source="
|
160
|
-
<copyField source="
|
161
|
-
<copyField source="
|
162
|
-
<copyField source="
|
163
|
-
<copyField source="
|
164
|
-
<copyField source="
|
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="
|
167
|
-
<copyField source="
|
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="
|
175
|
-
<copyField source="
|
176
|
-
<copyField source="
|
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="
|
180
|
-
<copyField source="
|
181
|
-
<copyField source="
|
182
|
-
<copyField source="
|
183
|
-
<copyField source="
|
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="
|
188
|
-
<copyField source="
|
189
|
-
<copyField source="
|
190
|
-
<copyField source="
|
191
|
-
<copyField source="
|
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="
|
203
|
+
<copyField source="locn_geometry" dest="solr_bboxtype"/>
|
196
204
|
</schema>
|
data/solr/conf/solrconfig.xml
CHANGED
@@ -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,
|
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
|
-
|
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
|
-
|
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">
|
154
|
+
<str name="facet.field">schema_provider_s</str>
|
155
155
|
<str name="facet.field">dct_spatial_sm</str>
|
156
|
-
<str name="facet.field">
|
157
|
-
<str name="facet.field">
|
158
|
-
<str name="facet.field">
|
159
|
-
<str name="facet.field">
|
160
|
-
<str name="facet.field">
|
161
|
-
<str name="facet.field">
|
162
|
-
<str name="facet.field">
|
163
|
-
<str name="facet.field">
|
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.
|
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
|
6
|
-
expect(Settings
|
7
|
-
|
8
|
-
|
9
|
-
|
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 '
|
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.
|
78
|
-
expect(response_values).to include Settings.FIELDS.
|
79
|
-
expect(response_values).to include Settings.FIELDS.
|
80
|
-
expect(response_values).to include Settings.FIELDS.
|
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://
|
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 '
|
24
|
+
click_link 'Topography'
|
25
25
|
expect(page).to have_css '.filter-name', text: 'Subject'
|
26
|
-
expect(page).to have_css '.filter-value', text: '
|
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 '
|
42
|
+
click_link 'New York, New York'
|
43
43
|
results = page.all(:css, 'article.document')
|
44
|
-
expect(results.count).to equal(
|
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
|
18
|
-
visit solr_document_path('99-0001-
|
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['
|
19
|
-
expect(response['
|
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
|
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.
|
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.
|
33
|
+
"f[#{Settings.FIELDS.PROVIDER}][]": 'Cornell'
|
34
34
|
)
|
35
35
|
|
36
36
|
# NY State result
|
@@ -8,41 +8,45 @@ feature 'Index view', js: true do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
scenario 'should have documents and map on page' do
|
11
|
-
visit search_catalog_path(f: { Settings.FIELDS.
|
11
|
+
visit search_catalog_path(f: { Settings.FIELDS.PROVIDER => ['Stanford'] })
|
12
12
|
expect(page).to have_css('#documents')
|
13
13
|
expect(page).to have_css('.document', count: 6)
|
14
14
|
expect(page).to have_css('#map')
|
15
15
|
end
|
16
16
|
|
17
17
|
scenario 'should have sort and per_page on page' do
|
18
|
-
visit search_catalog_path(f: { Settings.FIELDS.
|
18
|
+
visit search_catalog_path(f: { Settings.FIELDS.PROVIDER => ['Stanford'] })
|
19
19
|
expect(page).to have_css('#sort-dropdown')
|
20
20
|
expect(page).to have_css('#per_page-dropdown')
|
21
21
|
end
|
22
22
|
|
23
23
|
scenario 'should have facets listed correctly' do
|
24
24
|
within '#facet-panel-collapse' do
|
25
|
-
expect(page).to have_css('div.card.facet-limit', text: 'Institution')
|
26
|
-
expect(page).to have_css('div.card.facet-limit', text: 'Publisher')
|
27
|
-
expect(page).to have_css('div.card.facet-limit', text: 'Subject')
|
28
|
-
expect(page).to have_css('div.card.facet-limit', text: 'Place')
|
29
25
|
expect(page).to have_css('div.card.facet-limit', text: 'Year')
|
26
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Place')
|
30
27
|
expect(page).to have_css('div.card.facet-limit', text: 'Access')
|
31
|
-
expect(page).to have_css('div.card.facet-limit', text: '
|
28
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Resource Class')
|
29
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Resource Type')
|
32
30
|
expect(page).to have_css('div.card.facet-limit', text: 'Format')
|
31
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Subject')
|
32
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Theme')
|
33
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Creator')
|
34
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Publisher')
|
35
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Provider')
|
36
|
+
expect(page).to have_css('div.card.facet-limit', text: 'Georeferenced')
|
33
37
|
end
|
34
|
-
click_button '
|
38
|
+
click_button 'Provider'
|
35
39
|
using_wait_time 120 do
|
36
|
-
expect(page).to have_css('a.facet-select', text: 'Minnesota', visible: true)
|
40
|
+
expect(page).to have_css('a.facet-select', text: 'University of Minnesota', visible: true)
|
37
41
|
expect(page).to have_css('a.facet-select', text: 'MIT', visible: true)
|
38
42
|
expect(page).to have_css('a.facet-select', text: 'Stanford', visible: true)
|
39
|
-
expect(page).to have_css('a.more_facets_link', text: /more\
|
43
|
+
expect(page).to have_css('a.more_facets_link', text: /more\sProvider\s»/, visible: true)
|
40
44
|
end
|
41
45
|
end
|
42
46
|
|
43
47
|
scenario 'hover on record should produce bounding box on map' do
|
44
48
|
# Needed to find an svg element on the page
|
45
|
-
visit search_catalog_path(f: { Settings.FIELDS.
|
49
|
+
visit search_catalog_path(f: { Settings.FIELDS.PROVIDER => ['Stanford'] })
|
46
50
|
# BL7 has svg icons, so sniffing for SVG path won't return false
|
47
51
|
# expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 0
|
48
52
|
find('.documentHeader', match: :first).hover
|
@@ -2,39 +2,51 @@
|
|
2
2
|
|
3
3
|
If you add a new document, please add it to the table below, and indicate its purpose.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
5
|
+
# Listing of GeoBlacklight .json test documents
|
6
|
+
|
7
|
+
If you add a new document, please add it to the table below, and indicate its purpose.
|
8
|
+
|
9
|
+
|
|
10
|
+
| Filename | Title | ID | Purpose |
|
11
|
+
|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
12
|
+
| [actual-papermap1](actual-papermap1.json) | 1:1 500 000 series [cartographic material] : tectonic map of Britain, Ireland and adjacent areas / British Geological Survey ; Geological Survey of Ireland ; Geological Survey of Northern Ireland. | mit-001145244 | Nondigitized paper map with a link to a library catalog |
|
13
|
+
| [actual-point1](actual-point1.json) | 2014 New York City Places | nyu-2451-34564 | Point dataset with WMS and WFS |
|
14
|
+
| [actual-polygon1](actual-polygon1.json) | 100 Foot Grid Cambridge MA 2004 | tufts-cambridgegrid100-04 | Polygon dataset (no direct download) with WFS, WMS, and FGDC metadata as XML |
|
15
|
+
| [actual-raster1](actual-raster1.json) | 1-Meter Shaded Relief Multibeam Bathymetry Image (Color): Elkhorn Slough, California, 2005 | stanford-dp018hs9766 | Restricted raster layer with WMS and metadata in MODS and ISO 19139 |
|
16
|
+
| [baruch_ancestor1](baruch_ancestor1.json) | 2016 NYC Geodatabase, Open Source Version (jan2016) | nyu_2451_34635 | SQLite Database with documentation download Referenced as parent |
|
17
|
+
| [baruch_ancestor2](baruch_ancestor2.json) | 2016 NYC Geodatabase, ArcGIS Version (jan2016) | nyu_2451_34636 | Geodatabase with documentation download Referenced as parent |
|
18
|
+
| [baruch_documentation_download](baruch_documentation_download.json) | 2015 New York City Subway Complexes and Ridership | nyu_2451_34502 | Point dataset with WMS and WFS, documentation download, and two parent records |
|
19
|
+
| [bbox-spans-180](bbox-spans-180.json) | East Asia and Oceania | princeton-sx61dn82p | Scanned map with IIIF and direct TIFF download that spans across the 180th meridian |
|
20
|
+
| [cornell_html_metadata](cornell_html_metadata.json) | Air Monitoring Stations, Adirondack Park, 2000 | cugir-007741 | Point dataset with WMS, WFS, direct download, and FGDC metadata XML and HTML |
|
21
|
+
| [esri-dynamic-layer-all-layers](esri-dynamic-layer-all-layers.json) | Glacial Boundaries: Illinois, 1998 | 90f14ff4-1359-4beb-b931-5cb41d20ab90 | This record points to an the top level of an Esri Rest Web Map Service It does not specify a layer |
|
22
|
+
| [esri-dynamic-layer-single-layer](esri-dynamic-layer-single-layer.json) | Abandoned Quarries: Indiana | 4669301e-b4b2-4c8b-bf40-01b968a2865b | ArcGIS Dynamic Map Layer with single layer indicated |
|
23
|
+
| [esri-feature-layer](esri-feature-layer.json) | Transit - Airports: Maryland | f406332e63eb4478a9560ad86ae90327_18 | ArcGIS Feature Layer - point dataset |
|
24
|
+
| [esri-image-map-layer](esri-image-map-layer.json) | Wabash Topo (27): Indiana, 1929 | 32653ed6-8d83-4692-8a06-bf13ffe2c018 | ArcGIS Image Map Layer with GeoTIFF direct download |
|
25
|
+
| [esri-tiled_map_layer](esri-tiled_map_layer.json) | Soil Survey Geographic (SSURGO) | nyu-test-soil-survey-map | ArcGIS tiled map layer |
|
26
|
+
| [esri-wms-layer](esri-wms-layer.json) | Agriculture Census: Indiana, 1997 | purdue-urn-f082acb1-b01e-4a08-9126-fd62a23fd9aa | Dataset with ArcGIS Dynamic Map Layer, ArcGIS WMS, and direct download |
|
27
|
+
| [harvard_raster](harvard_raster.json) | Saint Petersburg Region, Russia, 1834 (Raster Image) | harvard-g7064-s2-1834-k3 | This layer is a georeferenced raster image of the historic paper map |
|
28
|
+
| [iiif-eastern-hemisphere](iiif-eastern-hemisphere.json) | A new & accurate map of Asia: drawn from actual surveys, and otherwise collected from journals | 57f0f116-b64e-4773-8684-96ba09afb549 | Eastern hemisphere scanned map with IIIF manifest |
|
29
|
+
| [index_map_point](index_map_point.json) | New York Aerial Photos (1960s) | cornell-ny-aerial-photos-1960s | GeoJSON index map of points |
|
30
|
+
| [index-map-polygon](index-map-polygon.json) | Index of Digital Elevation Models (DEM), New York | cugir-008186-no-downloadurl | GeoJSON index map of polygons, with a downloadUrl for the index itself |
|
31
|
+
| [index-map-polygon-no-downloadurl](index-map-polygon-no-downloadurl.json) | Index of Digital Elevation Models (DEM), New York | cugir-008186 | GeoJSON index map of polygons, but lacking a downloadUrl for the index itself |
|
32
|
+
| [index-map-stanford](index-map-stanford.json) | Dabao Kinbōzu, Maps Index | stanford-fb897vt9938 | old-style (pre-GeoJSON) index map of rectangular polygons |
|
33
|
+
| [metadata_no_geom](metadata_no_geom.json) | Ames Library of South Asia Maps | 05d-p16022coll246-noGeo | This is a collection level record without spatial coordinates |
|
34
|
+
| [metadata_no_provider](metadata_no_provider.json) | Social Explorer | 99-0001-noprovider | This is a website record that does not have a Provider (aardvark)/ provider (GBL Metadata 1.0) |
|
35
|
+
| [multiple-downloads](multiple-downloads.json) | Test record with additional download formats | cugir-007950 | This is a test record containing new-style references as nested child documents In addition to the original shapefile download, the references section contains additional PDF and KMZ downloads |
|
36
|
+
| [no_locn_geometry](no_locn_geometry.json) | University of Minnesota Digital Conservancy DRUM | 05d-03-noGeomType | This is a collection level record without spatial coordinates or a Geometry Type (GBL Metadata 1.0) |
|
37
|
+
| [no_spatial](no_spatial.json) | ASTER Global Emissivity Dataset 1-kilometer V003 - AG1KM | aster-global-emissivity-dataset-1-kilometer-v003-ag1kmcad20 | File without geometry type or solr_geometry (will cause error) |
|
38
|
+
| [oembed](oembed.json) | Jōshū Kusatsu Onsenzu | stanford-dc482zx1528 | This record has an Oembed reference link |
|
39
|
+
| [princeton-child1](princeton-child1.json) | Princeton, Mercer County, New Jersey (Sheet 1) | princeton-n009w382v | Child record for testing the suppressed_b property |
|
40
|
+
| [princeton-child2](princeton-child2.json) | Princeton, Mercer County, New Jersey (Sheet 2) | princeton-jq085m62x | Child record for testing the suppressed_b property |
|
41
|
+
| [princeton-child3](princeton-child3.json) | Princeton, Mercer County, New Jersey (Sheet 3) | princeton-n009w382v-fake1 | Child record for testing the suppressed_b property |
|
42
|
+
| [princeton-child4](princeton-child4.json) | Princeton, Mercer County, New Jersey (Sheet 4) | princeton-n009w382v-fake2 | Child record for testing the suppressed_b property |
|
43
|
+
| [princeton-parent](princeton-parent.json) | Princeton, Mercer County, New Jersey | princeton-1r66j405w | Parent record for testing the suppressed_b property |
|
44
|
+
| [public_direct_download](public_direct_download.json) | 2005 Rural Poverty GIS Database: Uganda | stanford-cz128vq0535 | includes a tentative dcat_distribution_sm property |
|
45
|
+
| [public_iiif_princeton](public_iiif_princeton.json) | The provinces of New York and New Jersey, with part of Pensilvania, and the Province of Quebec | princeton-02870w62c | Scanned map with IIIF |
|
46
|
+
| [public_polygon_mit](public_polygon_mit.json) | Massachusetts (ZCTA - 5 digit zip code tabulation area, 2000) | mit-f6rqs4ucovjk2 | Polygon shapefile with WMS and WFS |
|
47
|
+
| [restricted-line](restricted-line.json) | 10 Meter Contours: Russian River Basin, California | stanford-cg357zz0321 | Restricted line layer with WFS, WMS and metadata in MODS and ISO 19139 |
|
48
|
+
| [tms](tms.json) | Quaternary Fault and Fold Database of the United States | 6f47b103-9955-4bbe-a364-387039623106 | Includes a TMS type of web service |
|
49
|
+
| [umn_metro_result1](umn_metro_result1.json) | 2030 Regional Development Framework Planning Areas: Metro Twin Cities, Minnesota, 2011 | 02236876-9c21-42f6-9870-d2562da8e44f | Bounding box of metropolitan area and ArcGIS Dynamic Feature Service |
|
50
|
+
| [umn_state_result1](umn_state_result1.json) | 1:100k Digital Raster Graphic - Collars Removed: Minnesota | 2eddde2f-c222-41ca-bd07-2fd74a21f4de | Bounding box of state area and static image in references |
|
51
|
+
| [umn_state_result2](umn_state_result2.json) | 1:250k Digital Raster Graphic - Collars Removed: Minnesota | e9c71086-6b25-4950-8e1c-84c2794e3382 | Bounding box of state area and raster download |
|
52
|
+
| [uva_slug_colon](uva_slug_colon.json) | Norfolk 2005 Police Stations | uva-Norfolk:police_point | Multipoint dataset with WMS and WFS and a colon in the slug and layer ID |
|