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
@@ -1,41 +1,57 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
|
8
|
-
"
|
9
|
-
],
|
10
|
-
"
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
"dc_publisher_sm": [
|
2
|
+
"dct_title_s": "2030 Regional Development Framework Planning Areas: Metro Twin Cities, Minnesota, 2011",
|
3
|
+
"dct_alternative_sm": [
|
4
|
+
"umn_metro_result1"
|
5
|
+
],
|
6
|
+
"dct_description_sm": [
|
7
|
+
"Bounding box of metropolitan area and ArcGIS Dynamic Feature Service. ",
|
8
|
+
"The 2030 Regional Development Framework Planning Areas - 2011 updates the 2030 Regional Development Framework Planning Areas initially adopted on January 14, 2004 and ammended in 2006. This dataset reflect the agreed upon planning areas between a community and the Metropolitan Council and defined in the communities' 2030 Comprehensive Plan Update and is intended to supplement the 2030 Regional Development Framework - the planning guide for the 7-county Twin Cities metropolitan area of Minneapolis and Saint Paul, Minnesota. Planning area definitions and strategies for the planning areas are available in the 2030 Regional Development Framework document at http://www.metrocouncil.org/Planning/Planning/2030-Regional-Development-Framework.aspx (See Chapter 3). For questions about how decisions were made regarding individual communities' geographic planning areas, please contact the Metropolitan Council Regional Framework Development staff, Dan Marckel, 651-602-1548. See Currentness Reference and Lineage in Data Quality Section of this metadata for more information."
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
15
14
|
"Metropolitan Council"
|
16
15
|
],
|
17
|
-
"
|
16
|
+
"dct_publisher_sm": [
|
18
17
|
"Metropolitan Council"
|
19
18
|
],
|
20
|
-
"
|
19
|
+
"schema_provider_s": "University of Minnesota",
|
20
|
+
"gbl_resourceClass_sm": [
|
21
|
+
"Datasets",
|
22
|
+
"Web services"
|
23
|
+
],
|
24
|
+
"gbl_resourceType_sm": [
|
25
|
+
"Polygon data"
|
26
|
+
],
|
27
|
+
"dcat_theme_sm": [
|
21
28
|
"Planning and Cadastral"
|
22
29
|
],
|
23
|
-
"
|
24
|
-
|
25
|
-
"dct_isPartOf_sm": [
|
26
|
-
"Minnesota Geospatial Commons"
|
30
|
+
"dcat_keyword_sm": [
|
31
|
+
"GBL Fixture records"
|
27
32
|
],
|
28
|
-
"dct_issued_s": "2015-10-01T10:01:54.499443",
|
29
33
|
"dct_temporal_sm": [
|
30
34
|
"2014"
|
31
35
|
],
|
36
|
+
"dct_issued_s": "2015-10-01",
|
37
|
+
"gbl_indexYear_im": [
|
38
|
+
"2014"
|
39
|
+
],
|
40
|
+
"gbl_dateRange_drsim": [
|
41
|
+
"[2014 TO 2014]"
|
42
|
+
],
|
32
43
|
"dct_spatial_sm": [
|
33
|
-
"Minnesota
|
34
|
-
],
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
44
|
+
"Minnesota"
|
45
|
+
],
|
46
|
+
"locn_geometry": "ENVELOPE(-94.012,-92.732,45.415,44.471)",
|
47
|
+
"dcat_centroid_ss": "44.943,-93.372",
|
48
|
+
"dct_accessRights_s": "Public",
|
49
|
+
"dct_format_s": "Shapefile",
|
50
|
+
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_metc/plan_frmwrk2030dev_plan_ar2011/shp_plan_frmwrk2030dev_plan_ar2011.zip\",\"urn:x-esri:serviceType:ArcGIS#FeatureLayer\":\"https://arcgis.metc.state.mn.us/server/rest/services/GISLibrary/Framework2030PlanningAreas2011/FeatureServer/0\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/02236876-9c21-42f6-9870-d2562da8e44f\"}",
|
51
|
+
"id": "02236876-9c21-42f6-9870-d2562da8e44f",
|
52
|
+
"dct_identifier_sm": [
|
53
|
+
"02236876-9c21-42f6-9870-d2562da8e44f"
|
54
|
+
],
|
55
|
+
"gbl_mdModified_dt": "2021-06-01T22:14:16Z",
|
56
|
+
"gbl_mdVersion_s": "Aardvark"
|
41
57
|
}
|
@@ -1,38 +1,56 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"Minnesota Department of Natural Resources (DNR)"
|
2
|
+
"dct_title_s": "1:100k Digital Raster Graphic - Collars Removed: Minnesota",
|
3
|
+
"dct_alternative_sm": [
|
4
|
+
"umn_state_result1"
|
5
|
+
],
|
6
|
+
"dct_description_sm": [
|
7
|
+
"Bounding box of state area and static image in references. ",
|
8
|
+
"A digital raster graphic (DRG) is a scanned image of an U.S. Geological Survey (USGS) standard series topographic map, including all map collar information. The image inside the map neatline is georeferenced to the surface of the earth and fit to the Universal Transverse Mercator projection. The horizontal positional accuracy and datum of the DRG matches the accuracy and datum of the source map. The map is scanned at a minimum resolution of 250 dots per inch. DRG's are created by scanning published paper maps on high-resolution scanners. The raster image is georeferenced and fit to the UTM projection. Colors are standardized to remove scanner limitations and artifacts. The average data set size is about 6 megabytes in Tagged Image File Format (TIFF) with PackBits compression. DRG's can be easily combined with other digital cartographic products such as digital elevation models (DEM) and digital orthophoto quadrangles (DOQ). DRG's are stored as rectified TIFF files in geoTIFF format. GeoTIFF is a relatively new TIFF image storage format that incorporates georeferencing information in the header. This allows software, such as ArcView, ARC/INFO, or EPPL7 to reference the image without an additional header or world file. Within the Minnesota Department of Natural Resources Core GIS data set the DRG's have been processed to be in compliance with departmental data standards (UTM Extended Zone 15, NAD83 datum) and the map collar information has been removed to facilitate the display of the DRG's in a seamless fashion. These DRG's were clipped and transformed to UTM Zone 15 using EPPL7 Raster GIS."
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
13
12
|
],
|
14
|
-
"
|
13
|
+
"dct_creator_sm": [
|
15
14
|
"U.S. Geological Survey (USGS) and Minnesota Department of Natural Resources (DNR)"
|
16
15
|
],
|
17
|
-
"
|
16
|
+
"dct_publisher_sm": [
|
17
|
+
"Minnesota Department of Natural Resources (DNR)"
|
18
|
+
],
|
19
|
+
"schema_provider_s": "University of Minnesota",
|
20
|
+
"gbl_resourceClass_sm": [
|
21
|
+
"Datasets"
|
22
|
+
],
|
23
|
+
"gbl_resourceType_sm": [
|
24
|
+
"Raster data"
|
25
|
+
],
|
26
|
+
"dcat_theme_sm": [
|
18
27
|
"Imagery and Base Maps"
|
19
28
|
],
|
20
|
-
"
|
21
|
-
|
22
|
-
"dct_isPartOf_sm": [
|
23
|
-
"Minnesota Geospatial Commons"
|
29
|
+
"dcat_keyword_sm": [
|
30
|
+
"GBL Fixture records"
|
24
31
|
],
|
25
|
-
"dct_issued_s": "2015-11-18T11:02:15.705119",
|
26
32
|
"dct_temporal_sm": [
|
27
33
|
"2015"
|
28
34
|
],
|
35
|
+
"dct_issued_s": "2015-11-18",
|
36
|
+
"gbl_indexYear_im": [
|
37
|
+
"2015"
|
38
|
+
],
|
39
|
+
"gbl_dateRange_drsim": [
|
40
|
+
"[2015 TO 2015]"
|
41
|
+
],
|
29
42
|
"dct_spatial_sm": [
|
30
|
-
"Minnesota
|
31
|
-
],
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
43
|
+
"Minnesota"
|
44
|
+
],
|
45
|
+
"locn_geometry": "ENVELOPE(-97.612501,-88.842351,49.464145,42.906949)",
|
46
|
+
"dcat_centroid_ss": "46.185547,-93.227426",
|
47
|
+
"dct_accessRights_s": "Public",
|
48
|
+
"dct_format_s": "ArcGRID",
|
49
|
+
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://gdrs.dnr.state.mn.us/gdrs/data/pub/us_mn_state_dnr/fgdb_base_usgs_scanned_topo_100k_drg.zip\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/2eddde2f-c222-41ca-bd07-2fd74a21f4de\"}",
|
50
|
+
"id": "2eddde2f-c222-41ca-bd07-2fd74a21f4de",
|
51
|
+
"dct_identifier_sm": [
|
52
|
+
"2eddde2f-c222-41ca-bd07-2fd74a21f4de"
|
53
|
+
],
|
54
|
+
"gbl_mdModified_dt": "2021-06-01T22:14:16Z",
|
55
|
+
"gbl_mdVersion_s": "Aardvark"
|
38
56
|
}
|
@@ -1,38 +1,59 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
|
8
|
-
"
|
9
|
-
"Dataset"
|
10
|
-
],
|
11
|
-
"dc_publisher_sm": [
|
12
|
-
"Minnesota Department of Natural Resources (DNR)"
|
2
|
+
"dct_title_s": "1:250k Digital Raster Graphic - Collars Removed: Minnesota",
|
3
|
+
"dct_alternative_sm": [
|
4
|
+
"umn_state_result2"
|
5
|
+
],
|
6
|
+
"dct_description_sm": [
|
7
|
+
"Bounding box of state area and raster download. ",
|
8
|
+
"A digital raster graphic (DRG) is a scanned image of an U.S. Geological Survey (USGS) standard series topographic map, including all map collar information. The image inside the map neatline is georeferenced to the surface of the earth and fit to the Universal Transverse Mercator projection. The horizontal positional accuracy and datum of the DRG matches the accuracy and datum of the source map. The map is scanned at a minimum resolution of 250 dots per inch. DRG's are created by scanning published paper maps on high-resolution scanners. The raster image is georeferenced and fit to the UTM projection. Colors are standardized to remove scanner limitations and artifacts. The average data set size is about 6 megabytes in Tagged Image File Format (TIFF) with PackBits compression. DRG's can be easily combined with other digital cartographic products such as digital elevation models (DEM) and digital orthophoto quadrangles (DOQ). DRG's are stored as rectified TIFF files in geoTIFF format. GeoTIFF is a relatively new TIFF image storage format that incorporates georeferencing information in the header. This allows software, such as ArcView, ARC/INFO, or EPPL7 to reference the image without an additional header or world file. Within the Minnesota Department of Natural Resources Core GIS data set the DRG's have been processed to be in compliance with departmental data standards (UTM Extended Zone 15, NAD83 datum) and the map collar information has been removed to facilitate the display of the DRG's in a seamless fashion. These DRG's were clipped and transformed to UTM Zone 15 using EPPL7 Raster GIS."
|
13
9
|
],
|
14
|
-
"
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
15
14
|
"U.S. Geological Survey and Minnesota DNR"
|
16
15
|
],
|
17
|
-
"
|
16
|
+
"dct_publisher_sm": [
|
17
|
+
"Minnesota Department of Natural Resources (DNR)"
|
18
|
+
],
|
19
|
+
"schema_provider_s": "University of Minnesota",
|
20
|
+
"gbl_resourceClass_sm": [
|
21
|
+
"Datasets"
|
22
|
+
],
|
23
|
+
"gbl_resourceType_sm": [
|
24
|
+
"Raster data"
|
25
|
+
],
|
26
|
+
"dcat_theme_sm": [
|
18
27
|
"Imagery and Base Maps"
|
19
28
|
],
|
20
|
-
"
|
21
|
-
|
29
|
+
"dcat_keyword_sm": [
|
30
|
+
"GBL Fixture records"
|
31
|
+
],
|
22
32
|
"dct_isPartOf_sm": [
|
23
33
|
"Minnesota Geospatial Commons"
|
24
34
|
],
|
25
|
-
"dct_issued_s": "2015-11-18T11:02:15.187331",
|
26
35
|
"dct_temporal_sm": [
|
27
36
|
"1998"
|
28
37
|
],
|
38
|
+
"dct_issued_s": "2015-11-18",
|
39
|
+
"gbl_indexYear_im": [
|
40
|
+
"1998"
|
41
|
+
],
|
42
|
+
"gbl_dateRange_drsim": [
|
43
|
+
"[1998 TO 1998]"
|
44
|
+
],
|
29
45
|
"dct_spatial_sm": [
|
30
|
-
"Minnesota
|
31
|
-
],
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
46
|
+
"Minnesota"
|
47
|
+
],
|
48
|
+
"locn_geometry": "ENVELOPE(-97.991522,-87.177541,49.892443,42.891013)",
|
49
|
+
"dcat_centroid_ss": "46.391728,-92.5845315",
|
50
|
+
"dct_accessRights_s": "Public",
|
51
|
+
"dct_format_s": "GeoTIFF",
|
52
|
+
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_250k_drg/fgdb_base_usgs_scanned_topo_250k_drg.zip\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/e9c71086-6b25-4950-8e1c-84c2794e3382\"}",
|
53
|
+
"id": "e9c71086-6b25-4950-8e1c-84c2794e3382",
|
54
|
+
"dct_identifier_sm": [
|
55
|
+
"e9c71086-6b25-4950-8e1c-84c2794e3382"
|
56
|
+
],
|
57
|
+
"gbl_mdModified_dt": "2021-06-01T22:14:17Z",
|
58
|
+
"gbl_mdVersion_s": "Aardvark"
|
38
59
|
}
|
@@ -1,25 +1,48 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
|
2
|
+
"dct_title_s": "Norfolk 2005 Police Stations",
|
3
|
+
"dct_alternative_sm": [
|
4
|
+
"uva_slug_colon"
|
5
|
+
],
|
6
|
+
"dct_description_sm": [
|
7
|
+
"Multipoint dataset with WMS and WFS and a colon in the slug and layer ID. ",
|
8
|
+
"Police stations for Norfolk, Virginia."
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
12
|
+
],
|
13
|
+
"schema_provider_s": "UVa",
|
14
|
+
"gbl_resourceClass_sm": [
|
15
|
+
"Datasets"
|
16
|
+
],
|
17
|
+
"gbl_resourceType_sm": [
|
18
|
+
"Multipoint data"
|
19
|
+
],
|
20
|
+
"dcat_theme_sm": [
|
8
21
|
"Location"
|
9
22
|
],
|
10
|
-
"
|
11
|
-
|
12
|
-
|
13
|
-
"dct_references_s": "{\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://gis.lib.virginia.edu/geoserver/wms\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"http://gis.lib.virginia.edu/geoserver/wfs\",\"http://www.opengis.net/def/serviceType/ogc/wcs\":\"http://gis.lib.virginia.edu/geoserver/wcs\",\"http://schema.org/downloadUrl\":\"http://gis.lib.virginia.edu/geoserver/ows?service=WFS\\u0026typeName=Norfolk:police_point\\u0026request=GetFeature\\u0026outputFormat=shape-zip\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://opengeometadata.github.io/edu.virginia/382/13/iso19139.xml\"}",
|
23
|
+
"dcat_keyword_sm": [
|
24
|
+
"GBL Fixture records"
|
25
|
+
],
|
14
26
|
"dct_temporal_sm": [
|
15
|
-
"
|
16
|
-
],
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
24
|
-
"
|
27
|
+
"2015-2018"
|
28
|
+
],
|
29
|
+
"dct_issued_s": "2008-10-17",
|
30
|
+
"gbl_indexYear_im": [
|
31
|
+
"2015"
|
32
|
+
],
|
33
|
+
"gbl_dateRange_drsim": [
|
34
|
+
"[2015 TO 2018]"
|
35
|
+
],
|
36
|
+
"locn_geometry": "ENVELOPE(-76.346,-76.176,36.971,36.82)",
|
37
|
+
"dcat_centroid_ss": "36.8955,-76.261",
|
38
|
+
"dct_accessRights_s": "Public",
|
39
|
+
"dct_format_s": "Shapefile",
|
40
|
+
"gbl_wxsIdentifier_s": "Norfolk:police_point",
|
41
|
+
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://gis.lib.virginia.edu/geoserver/ows?service=WFS\\\\u0026typeName=Norfolk:police_point\\\\u0026request=GetFeature\\\\u0026outputFormat=shape-zip\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://opengeometadata.github.io/edu.virginia/382/13/iso19139.xml\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"http://gis.lib.virginia.edu/geoserver/wfs\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://www.opengis.net/def/serviceType/ogc/wms:http://gis.lib.virginia.edu/geoserver/wms\"}",
|
42
|
+
"id": "uva-Norfolk:police_point",
|
43
|
+
"dct_identifier_sm": [
|
44
|
+
"315fc8ee-3b57-4ebb-aa24-4300f1c42dc9-13"
|
45
|
+
],
|
46
|
+
"gbl_mdModified_dt": "2021-06-01T22:14:17Z",
|
47
|
+
"gbl_mdVersion_s": "Aardvark"
|
25
48
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::GeojsonDownload do
|
5
|
-
let(:document) { SolrDocument.new(
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a GeojsonDownload object with specific options' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::GeotiffDownload do
|
5
|
-
let(:document) { SolrDocument.new(
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a GeotiffDownload object with specific options' do
|
@@ -4,7 +4,7 @@ require 'spec_helper'
|
|
4
4
|
describe Geoblacklight::HglDownload do
|
5
5
|
subject(:download) { described_class.new(document, options) }
|
6
6
|
|
7
|
-
let(:document) { SolrDocument.new(
|
7
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', Settings.FIELDS.WXS_IDENTIFIER => 'cite:harvard-test') }
|
8
8
|
let(:options) { 'foo@example.com' }
|
9
9
|
|
10
10
|
describe '#initialize' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::KmzDownload do
|
5
|
-
let(:document) { SolrDocument.new(Settings.FIELDS.
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a KmzDownload object with specific options' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::ShapefileDownload do
|
5
|
-
let(:document) { SolrDocument.new(
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a ShapefileDownload object with specific options' do
|
@@ -7,7 +7,7 @@ describe Geoblacklight::Download do
|
|
7
7
|
let(:faraday_connection) { instance_double(Faraday::Connection) }
|
8
8
|
let(:faraday_response) { instance_double(Faraday::Response) }
|
9
9
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
10
|
-
let(:document) { SolrDocument.new("#{Settings.FIELDS.
|
10
|
+
let(:document) { SolrDocument.new("#{Settings.FIELDS.ID}": 'test', references_field => { 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://www.example.com/wms' }.to_json) }
|
11
11
|
let(:options) { { type: 'shapefile', extension: 'zip', service_type: 'wms', content_type: 'application/zip' } }
|
12
12
|
|
13
13
|
describe '#initialize' do
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::References do
|
5
5
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
6
|
-
let(:file_format_field) { Settings.FIELDS.
|
6
|
+
let(:file_format_field) { Settings.FIELDS.FORMAT }
|
7
7
|
let(:typical_ogp_shapefile) do
|
8
8
|
described_class.new(
|
9
9
|
SolrDocument.new(
|
@@ -135,7 +135,7 @@ describe Geoblacklight::References do
|
|
135
135
|
let(:settings_klass) { class_double('Settings').as_stubbed_const }
|
136
136
|
before do
|
137
137
|
allow(settings_klass).to receive(:METADATA_SHOWN).and_return %w[iso19139 mods]
|
138
|
-
allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(
|
138
|
+
allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(FORMAT: 'dc_format_s')
|
139
139
|
end
|
140
140
|
it 'is ordered by the configuration' do
|
141
141
|
expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'iso19139'
|
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::Relation::Ancestors do
|
5
5
|
let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
|
6
|
-
let(:ancestors) { described_class.new('nyu_2451_34502', repository) }
|
7
|
-
let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
|
6
|
+
let(:ancestors) { described_class.new('nyu_2451_34502', Settings.FIELDS.SOURCE, repository) }
|
7
|
+
let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
|
8
8
|
|
9
9
|
describe '#create_search_params' do
|
10
10
|
it 'assembles the correct search params for finding ancestor documents' do
|
11
|
-
expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.
|
11
|
+
expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.ID}}#{Settings.FIELDS.ID}:nyu_2451_34502"], fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::Relation::Descendants do
|
5
5
|
let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
|
6
|
-
let(:descendants) { described_class.new('nyu_2451_34636', repository) }
|
7
|
-
let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
|
6
|
+
let(:descendants) { described_class.new('nyu_2451_34636', Settings.FIELDS.SOURCE, repository) }
|
7
|
+
let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
|
8
8
|
|
9
9
|
describe '#create_search_params' do
|
10
10
|
it 'assembles the correct search params for finding descendant documents' do
|
11
|
-
expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.
|
11
|
+
expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -11,34 +11,49 @@ describe Geoblacklight::Relation::RelationResponse do
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
describe '#
|
14
|
+
describe '#method_missing' do
|
15
15
|
it 'returns a hash of ancestor documents' do
|
16
|
-
expect(relation_resp.
|
17
|
-
expect(relation_resp.
|
16
|
+
expect(relation_resp.SOURCE_ANCESTORS).to include('numFound')
|
17
|
+
expect(relation_resp.SOURCE_ANCESTORS).to include('docs')
|
18
18
|
end
|
19
|
-
end
|
20
19
|
|
21
|
-
describe '#descendants' do
|
22
20
|
it 'returns a hash of descendant documents' do
|
23
|
-
expect(relation_resp.
|
24
|
-
expect(relation_resp.
|
21
|
+
expect(relation_resp.SOURCE_DESCENDANTS).to include('numFound')
|
22
|
+
expect(relation_resp.SOURCE_DESCENDANTS).to include('docs')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'raises no method error' do
|
26
|
+
expect { relation_resp.FAIL }.to raise_error NoMethodError
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
|
-
describe '#
|
29
|
-
it 'returns
|
30
|
-
|
30
|
+
describe '#respond_to_missing?' do
|
31
|
+
it 'returns true for configured relationships' do
|
32
|
+
Settings.RELATIONSHIPS_SHOWN.each_key do |key|
|
33
|
+
expect(relation_resp).to respond_to(key)
|
34
|
+
end
|
31
35
|
end
|
32
|
-
|
33
|
-
|
36
|
+
|
37
|
+
it 'returns false for non-configured options' do
|
38
|
+
expect(relation_resp).not_to respond_to('fail')
|
34
39
|
end
|
40
|
+
end
|
35
41
|
|
36
|
-
|
37
|
-
|
42
|
+
describe '#query_type' do
|
43
|
+
it 'fails for a bad query type request' do
|
44
|
+
Settings.add_source!({
|
45
|
+
RELATIONSHIPS_SHOWN: {
|
46
|
+
BAD: {
|
47
|
+
field: 'dct_source_sm',
|
48
|
+
query_type: 'bad_query_type',
|
49
|
+
icon: 'pagelines-brands',
|
50
|
+
label: 'geoblacklight.relations.ancestor'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
})
|
54
|
+
Settings.reload!
|
38
55
|
|
39
|
-
|
40
|
-
expect(empty_relation_resp.empty?).to be true
|
41
|
-
end
|
56
|
+
expect { relation_resp.BAD }.to raise_error(ArgumentError)
|
42
57
|
end
|
43
58
|
end
|
44
59
|
end
|