geoblacklight 1.9.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.rubocop.yml +4 -14
- data/.rubocop_todo.yml +51 -48
- data/README.md +3 -0
- data/Rakefile +1 -2
- data/app/assets/javascripts/geoblacklight/basemaps.js +3 -3
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/download.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/home.js +3 -2
- data/app/assets/javascripts/geoblacklight/modules/util.js +8 -0
- data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +19 -0
- data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +15 -13
- data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +3 -3
- data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +4 -2
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +20 -12
- data/app/assets/javascripts/geoblacklight/viewers/map.js +2 -1
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -5
- data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +43 -0
- data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +4 -1
- data/app/assets/stylesheets/geoblacklight/application.scss +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +33 -13
- data/app/assets/stylesheets/geoblacklight/modules/home.scss +22 -19
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +1 -1
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +7 -0
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +7 -8
- data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +9 -0
- data/app/assets/stylesheets/geoblacklight/modules/relations.scss +15 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +7 -2
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +60 -0
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +55 -35
- data/app/controllers/download_controller.rb +5 -4
- data/app/controllers/relation_controller.rb +11 -1
- data/app/helpers/carto_helper.rb +2 -9
- data/app/helpers/geoblacklight_helper.rb +15 -28
- data/app/models/concerns/geoblacklight/solr_document.rb +4 -0
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +18 -1
- data/app/presenters/geoblacklight/document_presenter.rb +2 -2
- data/app/views/catalog/_document_action.html.erb +2 -2
- data/app/views/catalog/_document_split.html.erb +5 -3
- data/app/views/catalog/_downloads_secondary.html.erb +39 -0
- data/app/views/catalog/_facet_tag_layout.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +30 -38
- data/app/views/catalog/_index_split_default.html.erb +1 -2
- data/app/views/catalog/_metadata.html.erb +3 -3
- data/app/views/catalog/_show_default_attribute_table.html.erb +16 -14
- data/app/views/catalog/_show_default_viewer_container.html.erb +5 -3
- data/app/views/catalog/_show_default_viewer_information.html.erb +3 -1
- data/app/views/catalog/_show_downloads.html.erb +12 -9
- data/app/views/catalog/_show_tools.html.erb +25 -0
- data/app/views/catalog/_web_services.html.erb +1 -1
- data/app/views/catalog/_web_services_wfs.html.erb +1 -1
- data/app/views/catalog/_web_services_wms.html.erb +1 -1
- data/app/views/catalog/index.html.erb +9 -8
- data/app/views/relation/_ancestors.html.erb +2 -2
- data/app/views/relation/_descendants.html.erb +3 -3
- data/app/views/relation/index.html.erb +8 -8
- data/app/views/shared/_header_navbar.html.erb +28 -17
- data/config/locales/geoblacklight.en.yml +2 -2
- data/geoblacklight.gemspec +5 -4
- data/lib/generators/geoblacklight/install_generator.rb +3 -12
- data/lib/generators/geoblacklight/templates/Procfile +3 -0
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +33 -5
- data/lib/generators/geoblacklight/templates/package.json +14 -0
- data/lib/generators/geoblacklight/templates/settings.yml +15 -1
- data/lib/generators/geoblacklight/templates/webpacker.yml +67 -0
- data/lib/generators/geoblacklight/webpacker_generator.rb +35 -0
- data/lib/geoblacklight.rb +2 -4
- data/lib/geoblacklight/controller_override.rb +27 -22
- data/lib/geoblacklight/engine.rb +0 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/tasks/geoblacklight.rake +18 -0
- data/schema/geoblacklight-schema.md +72 -59
- data/schema/geometry-type-values.md +1 -0
- data/schema/references.md +22 -0
- data/schema/schema-commentary.md +198 -0
- data/schema/subjects.md +41 -0
- data/schema/type-values.md +4 -2
- data/solr/conf/core.properties +5 -0
- data/solr/conf/schema.xml +11 -1
- data/solr/conf/solrconfig.xml +1 -1
- data/spec/controllers/catalog_controller_spec.rb +17 -1
- data/spec/factories/user.rb +2 -2
- data/spec/features/download_layer_spec.rb +19 -15
- data/spec/features/esri_viewer_spec.rb +2 -2
- data/spec/features/home_page_spec.rb +6 -2
- data/spec/features/index_map_spec.rb +15 -25
- data/spec/features/layer_opacity_spec.rb +1 -1
- data/spec/features/layer_preview_spec.rb +3 -2
- data/spec/features/linkified_attribute_table_spec.rb +3 -4
- data/spec/features/relations_spec.rb +1 -1
- data/spec/features/search_bar_spec.rb +2 -2
- data/spec/features/search_results_map_spec.rb +2 -2
- data/spec/features/search_results_overlap_ratio_spec.rb +55 -0
- data/spec/features/search_spec.rb +13 -0
- data/spec/features/show_page_metadata_spec.rb +1 -1
- data/spec/features/sms_spec.rb +15 -0
- data/spec/features/split_view.html.erb_spec.rb +24 -15
- data/spec/features/web_services_modal_spec.rb +0 -2
- data/spec/fixtures/solr_documents/README.md +38 -0
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +39 -18
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +37 -0
- data/spec/fixtures/solr_documents/index-map-polygon.json +37 -0
- data/spec/fixtures/solr_documents/{point_index_map.json → index_map_point.json} +1 -1
- data/spec/fixtures/solr_documents/princeton-child1.json +30 -0
- data/spec/fixtures/solr_documents/princeton-child2.json +30 -0
- data/spec/fixtures/solr_documents/princeton-parent.json +25 -0
- data/spec/helpers/carto_helper_spec.rb +1 -20
- data/spec/helpers/geoblacklight_helper_spec.rb +4 -22
- data/spec/lib/geoblacklight/document_presenter_spec.rb +1 -1
- data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -1
- data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +10 -0
- data/spec/spec_helper.rb +6 -3
- data/spec/teaspoon_env.rb +31 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +5 -0
- data/spec/test_app_templates/solr_documents +1 -0
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +39 -0
- data/template.rb +4 -2
- data/vendor/assets/images/layers-2x.png +0 -0
- data/vendor/assets/images/layers.png +0 -0
- data/vendor/assets/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/marker-icon.png +0 -0
- data/vendor/assets/images/marker-shadow.png +0 -0
- data/vendor/assets/javascripts/esri-leaflet.js.map +1 -0
- data/vendor/assets/javascripts/leaflet-src.js.map +1 -0
- data/vendor/assets/javascripts/leaflet.js.erb +13922 -0
- data/vendor/assets/stylesheets/leaflet.css +635 -0
- metadata +87 -33
- data/app/assets/stylesheets/geoblacklight/modules/twitter-typeahead.scss +0 -14
- data/app/views/catalog/_search_form_no_navbar.html.erb +0 -22
- data/app/views/catalog/_show_default.html.erb +0 -13
- data/app/views/catalog/_upper_metadata.html.erb +0 -20
- data/spec/fixtures/solr_documents/umn_metro_result2.json +0 -39
@@ -6,6 +6,12 @@ class CatalogController < ApplicationController
|
|
6
6
|
include Blacklight::Catalog
|
7
7
|
|
8
8
|
configure_blacklight do |config|
|
9
|
+
|
10
|
+
# Ensures that JSON representations of Solr Documents can be retrieved using
|
11
|
+
# the path /catalog/:id/raw
|
12
|
+
# Please see https://github.com/projectblacklight/blacklight/pull/2006/
|
13
|
+
config.raw_endpoint.enabled = true
|
14
|
+
|
9
15
|
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
10
16
|
## @see https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html
|
11
17
|
## @see https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Theq.altParameter
|
@@ -26,6 +32,7 @@ class CatalogController < ApplicationController
|
|
26
32
|
:q => '{!raw f=layer_slug_s v=$id}'
|
27
33
|
}
|
28
34
|
|
35
|
+
|
29
36
|
# solr field configuration for search results/index views
|
30
37
|
# config.index.show_link = 'title_display'
|
31
38
|
# config.index.record_display_type = 'format'
|
@@ -35,6 +42,9 @@ class CatalogController < ApplicationController
|
|
35
42
|
# solr field configuration for document/show views
|
36
43
|
|
37
44
|
config.show.display_type_field = 'format'
|
45
|
+
config.show.partials << 'show_default_viewer_container'
|
46
|
+
config.show.partials << 'show_default_attribute_table'
|
47
|
+
config.show.partials << 'show_default_viewer_information'
|
38
48
|
|
39
49
|
##
|
40
50
|
# Configure the index document presenter.
|
@@ -127,10 +137,17 @@ class CatalogController < ApplicationController
|
|
127
137
|
config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
|
128
138
|
config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
|
129
139
|
config.add_show_field Settings.FIELDS.PART_OF, label: 'Collection', itemprop: 'isPartOf'
|
130
|
-
config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial',
|
131
|
-
config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords',
|
140
|
+
config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true
|
141
|
+
config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords', link_to_facet: true
|
132
142
|
config.add_show_field Settings.FIELDS.TEMPORAL, label: 'Year', itemprop: 'temporal'
|
133
|
-
config.add_show_field Settings.FIELDS.PROVENANCE, label: 'Held by',
|
143
|
+
config.add_show_field Settings.FIELDS.PROVENANCE, label: 'Held by', link_to_facet: true
|
144
|
+
config.add_show_field(
|
145
|
+
Settings.FIELDS.REFERENCES,
|
146
|
+
label: 'More details at',
|
147
|
+
accessor: [:external_url],
|
148
|
+
if: proc { |_, _, doc| doc.external_url },
|
149
|
+
helper_method: :render_references_url
|
150
|
+
)
|
134
151
|
|
135
152
|
# "fielded" search configuration. Used by pulldown among other places.
|
136
153
|
# For supported keys in hash, see rdoc for Blacklight::SearchFields
|
@@ -213,6 +230,17 @@ class CatalogController < ApplicationController
|
|
213
230
|
# mean") suggestion is offered.
|
214
231
|
config.spell_max = 5
|
215
232
|
|
233
|
+
# Nav actions from Blacklight
|
234
|
+
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
|
235
|
+
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
|
236
|
+
|
237
|
+
# Tools from Blacklight
|
238
|
+
config.add_results_collection_tool(:sort_widget)
|
239
|
+
config.add_results_collection_tool(:per_page_widget)
|
240
|
+
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
|
241
|
+
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
|
242
|
+
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
|
243
|
+
|
216
244
|
# Custom tools for GeoBlacklight
|
217
245
|
config.add_show_tools_partial :web_services, if: proc { |_context, _config, options| options[:document] && (Settings.WEBSERVICES_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
|
218
246
|
config.add_show_tools_partial :metadata, if: proc { |_context, _config, options| options[:document] && (Settings.METADATA_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
|
@@ -228,8 +256,8 @@ class CatalogController < ApplicationController
|
|
228
256
|
# 'worldAntique'
|
229
257
|
# 'worldEco'
|
230
258
|
# 'flatBlue'
|
231
|
-
# 'midnightCommander'
|
232
|
-
|
259
|
+
# 'midnightCommander'
|
260
|
+
|
233
261
|
config.basemap_provider = 'positron'
|
234
262
|
|
235
263
|
# Configuration for autocomplete suggestor
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "internal",
|
3
|
+
"private": true,
|
4
|
+
"dependencies": {
|
5
|
+
"@rails/webpacker": "https://github.com/rails/webpacker.git"
|
6
|
+
},
|
7
|
+
"devDependencies": {
|
8
|
+
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
9
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
10
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
11
|
+
"babel-preset-env": "^1.7.0",
|
12
|
+
"webpack-dev-server": "^3.1.14"
|
13
|
+
}
|
14
|
+
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
|
3
3
|
|
4
4
|
# Carto OneClick Service https://carto.com/engine/open-in-carto/
|
5
|
-
CARTO_ONECLICK_LINK: 'http://oneclick.
|
5
|
+
CARTO_ONECLICK_LINK: 'http://oneclick.carto.com/'
|
6
6
|
|
7
7
|
# Download path can be configured using this setting
|
8
8
|
#DOWNLOAD_PATH: "./tmp/cache/downloads"
|
@@ -13,6 +13,9 @@ GEOMETRY_FIELD: 'solr_geom'
|
|
13
13
|
# The bq boost value for spatial search matches within a bounding box
|
14
14
|
BBOX_WITHIN_BOOST: '10'
|
15
15
|
|
16
|
+
# The bf boost value for overlap ratio
|
17
|
+
OVERLAP_RATIO_BOOST: '2'
|
18
|
+
|
16
19
|
# Solr field mappings
|
17
20
|
FIELDS:
|
18
21
|
:FILE_FORMAT: 'dc_format_s'
|
@@ -78,6 +81,17 @@ LEAFLET:
|
|
78
81
|
MAP:
|
79
82
|
LAYERS:
|
80
83
|
DETECT_RETINA: true
|
84
|
+
INDEX:
|
85
|
+
DEFAULT: &default
|
86
|
+
color: "#1eb300"
|
87
|
+
weight: "1"
|
88
|
+
radius: "4"
|
89
|
+
UNAVAILABLE:
|
90
|
+
<<: *default
|
91
|
+
color: "#b3001e"
|
92
|
+
SELECTED:
|
93
|
+
<<: *default
|
94
|
+
color: "#006bde"
|
81
95
|
VIEWERS:
|
82
96
|
WMS:
|
83
97
|
<<: *opacity_control
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: packs
|
6
|
+
public_output_path: packs
|
7
|
+
cache_path: tmp/cache/webpacker
|
8
|
+
|
9
|
+
# Additional paths webpack should lookup modules
|
10
|
+
# ['app/assets', 'engine/foo/app/assets']
|
11
|
+
resolved_paths: []
|
12
|
+
|
13
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
14
|
+
cache_manifest: false
|
15
|
+
|
16
|
+
extensions:
|
17
|
+
- .js
|
18
|
+
- .sass
|
19
|
+
- .scss
|
20
|
+
- .css
|
21
|
+
- .module.sass
|
22
|
+
- .module.scss
|
23
|
+
- .module.css
|
24
|
+
- .png
|
25
|
+
- .svg
|
26
|
+
- .gif
|
27
|
+
- .jpeg
|
28
|
+
- .jpg
|
29
|
+
|
30
|
+
development: &development
|
31
|
+
<<: *default
|
32
|
+
compile: true
|
33
|
+
|
34
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
35
|
+
dev_server:
|
36
|
+
https: false
|
37
|
+
host: localhost
|
38
|
+
port: 3035
|
39
|
+
public: localhost:3035
|
40
|
+
hmr: false
|
41
|
+
# Inline should be set to true if using HMR
|
42
|
+
inline: true
|
43
|
+
overlay: true
|
44
|
+
compress: true
|
45
|
+
disable_host_check: true
|
46
|
+
use_local_ip: false
|
47
|
+
quiet: false
|
48
|
+
headers:
|
49
|
+
'Access-Control-Allow-Origin': '*'
|
50
|
+
watch_options:
|
51
|
+
ignored: /node_modules/
|
52
|
+
|
53
|
+
|
54
|
+
test:
|
55
|
+
<<: *development
|
56
|
+
|
57
|
+
# Compile test packs to a separate directory
|
58
|
+
public_output_path: packs-test
|
59
|
+
|
60
|
+
production:
|
61
|
+
<<: *default
|
62
|
+
|
63
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
64
|
+
compile: false
|
65
|
+
|
66
|
+
# Cache manifest.json for performance
|
67
|
+
cache_manifest: true
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Geoblacklight
|
4
|
+
class Webpacker < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
|
7
|
+
desc 'Integrate Webpacker for GeoBlacklight'
|
8
|
+
|
9
|
+
def webpacker_install
|
10
|
+
run 'bundle exec rails webpacker:install --force'
|
11
|
+
end
|
12
|
+
|
13
|
+
def webpacker_config
|
14
|
+
copy_file 'webpacker.yml', 'config/webpacker.yml'
|
15
|
+
end
|
16
|
+
|
17
|
+
def procfile
|
18
|
+
copy_file 'Procfile', 'Procfile'
|
19
|
+
end
|
20
|
+
|
21
|
+
def javascript_install
|
22
|
+
# This overrides the default dependencies specified using
|
23
|
+
# webpacker:install
|
24
|
+
copy_file 'package.json', 'package.json'
|
25
|
+
yarn_available = system('yarn --version')
|
26
|
+
if yarn_available
|
27
|
+
run 'yarn install'
|
28
|
+
run 'yarn upgrade'
|
29
|
+
else
|
30
|
+
run 'npm install'
|
31
|
+
run 'npm update'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/geoblacklight.rb
CHANGED
@@ -5,7 +5,7 @@ module Geoblacklight
|
|
5
5
|
require 'geoblacklight/bounding_box'
|
6
6
|
require 'geoblacklight/catalog_helper_override'
|
7
7
|
require 'geoblacklight/constants'
|
8
|
-
require 'geoblacklight/controller_override'
|
8
|
+
# require 'geoblacklight/controller_override'
|
9
9
|
require 'geoblacklight/exceptions'
|
10
10
|
require 'geoblacklight/geoblacklight_helper_behavior'
|
11
11
|
require 'geoblacklight/view_helper_override'
|
@@ -35,15 +35,13 @@ module Geoblacklight
|
|
35
35
|
require 'geoblacklight/relation/relation_response'
|
36
36
|
|
37
37
|
def self.inject!
|
38
|
-
CatalogController.send(:include, Geoblacklight::ControllerOverride)
|
38
|
+
# CatalogController.send(:include, Geoblacklight::ControllerOverride)
|
39
39
|
CatalogController.send(:include, Geoblacklight::CatalogHelperOverride)
|
40
40
|
CatalogController.send(:include, Geoblacklight::ViewHelperOverride)
|
41
41
|
CatalogController.send(:helper, Geoblacklight::ViewHelperOverride) unless
|
42
42
|
CatalogController.helpers.is_a?(Geoblacklight::ViewHelperOverride)
|
43
43
|
SearchHistoryController.send(:helper, Geoblacklight::ViewHelperOverride) unless
|
44
44
|
SearchHistoryController.helpers.is_a?(Geoblacklight::ViewHelperOverride)
|
45
|
-
SavedSearchesController.send(:helper, Geoblacklight::ViewHelperOverride) unless
|
46
|
-
SavedSearchesController.helpers.is_a?(Geoblacklight::ViewHelperOverride)
|
47
45
|
end
|
48
46
|
|
49
47
|
def self.logger
|
@@ -1,22 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
1
|
+
# @TODO: Remove
|
2
|
+
#
|
3
|
+
# Blacklight 7.0 introduces ActionBuilder, which adds controller methods from
|
4
|
+
# CatalogController config.add_show_tools_partial statements
|
5
|
+
#
|
6
|
+
# module Geoblacklight
|
7
|
+
# module ControllerOverride
|
8
|
+
# extend ActiveSupport::Concern
|
9
|
+
# def web_services
|
10
|
+
# @response, @document = search_service.fetch(params[:id])
|
11
|
+
# respond_to do |format|
|
12
|
+
# format.html do
|
13
|
+
# return render layout: false if request.xhr?
|
14
|
+
# end
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# def metadata
|
19
|
+
# @response, @document = search_service.fetch(params[:id])
|
20
|
+
# respond_to do |format|
|
21
|
+
# format.html do
|
22
|
+
# return render layout: false if request.xhr?
|
23
|
+
# end
|
24
|
+
# end
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
# end
|
data/lib/geoblacklight/engine.rb
CHANGED
@@ -20,6 +20,24 @@ namespace :geoblacklight do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
desc 'Run Solr and GeoBlacklight for interactive development with Webpack enabled'
|
24
|
+
task :webpack do |_t|
|
25
|
+
require 'solr_wrapper'
|
26
|
+
SolrWrapper.wrap(port: '8983') do |solr|
|
27
|
+
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path('../../', File.dirname(__FILE__)), 'solr', 'conf')) do
|
28
|
+
puts "\nSolr server running: http://localhost:#{solr.port}/solr/#/blacklight-core"
|
29
|
+
puts "\n^C to stop"
|
30
|
+
puts ' '
|
31
|
+
begin
|
32
|
+
Rake::Task['geoblacklight:solr:seed'].invoke
|
33
|
+
system "foreman start"
|
34
|
+
rescue Interrupt
|
35
|
+
puts 'Shutting down...'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
23
41
|
namespace :index do
|
24
42
|
desc "Put sample data into solr"
|
25
43
|
task :seed => :environment do
|
@@ -1,32 +1,33 @@
|
|
1
1
|
## GeoBlacklight 1.0 Metadata Schema
|
2
|
-
|
2
|
+
This is an overview of the GeoBlacklight Metadata Schema, Version 1.0. For more information on applications of these elements, visit the [Schema Commentary document](/schema/schema-commentary.md).
|
3
3
|
## Brief
|
4
4
|
|
5
5
|
| Label | uri| Required?|
|
6
6
|
|------------------- |-----------------------|:----------:|
|
7
|
-
| [Identifier](#identifier) | dc_identifier_s
|
8
|
-
| [Rights](#rights) | dc_rights_s
|
9
|
-
| [Title](#title) | dc_title_s
|
10
|
-
| [Provenance](#provenance) | dct_provenance_s
|
11
|
-
| [Schema Version](#schema-version) | geoblacklight_version
|
12
|
-
| [Slug](#slug) | layer_slug_s
|
13
|
-
| [Bounding Box](#bounding-box) | solr_geom
|
14
|
-
| [
|
15
|
-
| [
|
16
|
-
| [
|
17
|
-
| [
|
18
|
-
| [
|
19
|
-
| [
|
20
|
-
| [
|
21
|
-
| [
|
22
|
-
| [
|
23
|
-
| [
|
24
|
-
| [
|
25
|
-
| [
|
26
|
-
| [
|
27
|
-
| [
|
28
|
-
| [
|
29
|
-
| [
|
7
|
+
| [Identifier](#identifier) | `dc_identifier_s`| X|
|
8
|
+
| [Rights](#rights) | `dc_rights_s`| X|
|
9
|
+
| [Title](#title) | `dc_title_s`| X|
|
10
|
+
| [Provenance](#provenance) | `dct_provenance_s`| X|
|
11
|
+
| [Schema Version](#schema-version) | `geoblacklight_version`| X|
|
12
|
+
| [Slug](#slug) | `layer_slug_s`| X|
|
13
|
+
| [Bounding Box](#bounding-box) | `solr_geom`| X|
|
14
|
+
| [Solr Year](#solr-year) | `solr_year_i`||
|
15
|
+
| [Creator](#creator) | `dc_creator_sm`||
|
16
|
+
| [Description](#description) | `dc_description_s`||
|
17
|
+
| [Format](#format) | `dc_format_s`||
|
18
|
+
| [Language](#language) | `dc_language_sm`||
|
19
|
+
| [Publisher](#publisher) | `dc_publisher_sm`||
|
20
|
+
| [Source](#source) | `dc_source_sm`||
|
21
|
+
| [Subject](#subject) | `dc_subject_sm`||
|
22
|
+
| [Type](#type) | `dc_type_s`||
|
23
|
+
| [Is Part Of](#is-part-of) | `dct_isPartOf_sm`||
|
24
|
+
| [Date Issued](#date-issued) | `dct_issued_s`||
|
25
|
+
| [References](#references) | `dct_references_s`||
|
26
|
+
| [Spatial Coverage](#spatial-coverage) | `dct_spatial_sm`||
|
27
|
+
| [Temporal Coverage](#temporal-coverage) | `dct_temporal_sm`||
|
28
|
+
| [Geometry Type](#geometry-type) | `layer_geom_type_s`||
|
29
|
+
| [Layer ID](#layer-id) | `layer_id_s`||
|
30
|
+
| [Modified Date](#modified-date) | `layer_modified_dt`|||
|
30
31
|
|
31
32
|
|
32
33
|
## Details
|
@@ -38,7 +39,7 @@
|
|
38
39
|
| Required | yes|
|
39
40
|
| Type | string|
|
40
41
|
| Description | Unique identifier for layer as a URI. It should be globally unique across all institutions, assumed not to be end-user visible|
|
41
|
-
| Entry Guidelines | This is usually
|
42
|
+
| Entry Guidelines | This is usually in the form of http://institution/id.|
|
42
43
|
| Controlled Vocabulary | no|
|
43
44
|
| Element Set | Dublin Core Metadata Element Set|
|
44
45
|
| Example | "http://purl.stanford.edu/vr593vj7147"|
|
@@ -50,7 +51,7 @@
|
|
50
51
|
| uri | `dc_rights_s`|
|
51
52
|
| Required | yes|
|
52
53
|
| Type | string|
|
53
|
-
| Description |
|
54
|
+
| Description | Signals access in the geoportal and is indicated by a padlock icon. Users need to sign in to download restricted items|
|
54
55
|
| Entry Guidelines | Choose either Public or Restricted|
|
55
56
|
| Controlled Vocabulary | "Public" or "Restricted"|
|
56
57
|
| Element Set | Dublin Core Metadata Element Set|
|
@@ -74,8 +75,8 @@
|
|
74
75
|
| uri | `dct_provenance_s`|
|
75
76
|
| Required | yes|
|
76
77
|
| Type | string|
|
77
|
-
| Description | The name of the institution that holds the resource or acts as the custodian for the metadata record
|
78
|
-
| Entry Guidelines |
|
78
|
+
| Description | The name of the institution that holds the resource or acts as the custodian for the metadata record|
|
79
|
+
| Entry Guidelines | The value for this field should be one of the agreed upon shortened names for each institution. This will embed the correct icon into the search results and item pages.|
|
79
80
|
| Controlled Vocabulary | This repository contains the insitutions that have shared icons: https://github.com/geoblacklight/geoblacklight-icons|
|
80
81
|
| Element Set | DCMI Metadata Terms|
|
81
82
|
| Example | "Stanford"|
|
@@ -86,7 +87,7 @@
|
|
86
87
|
| uri | `geoblacklight_version` |
|
87
88
|
| Required | yes|
|
88
89
|
| Type | string|
|
89
|
-
| Description | Indicates which version of the GeoBlacklight schema is in use
|
90
|
+
| Description | Indicates which version of the GeoBlacklight schema is in use|
|
90
91
|
| Entry Guidelines | Only current value is "1.0"|
|
91
92
|
| Controlled Vocabulary | no|
|
92
93
|
| Element Set | GeoBlacklight|
|
@@ -98,8 +99,8 @@
|
|
98
99
|
| uri | `layer_slug_s`|
|
99
100
|
| Required | yes|
|
100
101
|
| Type | string|
|
101
|
-
| Description | This is a string appended to the base URL of a GeoBlacklight installation to create a unique landing page for each resource. It is visible to the user and
|
102
|
-
| Entry Guidelines | This string must be a globally unique value. The value should be alpha-numeric characters separated by dashes
|
102
|
+
| Description | This is a string appended to the base URL of a GeoBlacklight installation to create a unique landing page for each resource. It is visible to the user and serves the purpose of forming a persistent URL for each catalog item.|
|
103
|
+
| Entry Guidelines | This string must be a globally unique value. The value should be alpha-numeric characters separated by dashes.|
|
103
104
|
| Controlled Vocabulary | no|
|
104
105
|
| Element Set | GeoBlacklight|
|
105
106
|
| Example | "stanford-andhra-pradesh-village-boundaries"|
|
@@ -110,12 +111,24 @@
|
|
110
111
|
| uri | `solr_geom`|
|
111
112
|
| Required | yes|
|
112
113
|
| Type | string|
|
113
|
-
| Description | The rectangular extents of the resource. Note that this field is indexed as a Solr spatial (RPT) field
|
114
|
+
| Description | The rectangular extents of the resource. Note that this field is indexed as a Solr spatial (RPT) field|
|
114
115
|
| Entry Guidelines | Bounding box of the layer as a ENVELOPE WKT (from the CQL standard) using coordinates in (West, East, North, South) order. The pattern is: ENVELOPE(.*,.*,.*,.*)|
|
115
116
|
| Controlled Vocabulary | no|
|
116
117
|
| Element Set | GeoBlacklight|
|
117
118
|
| Example | "ENVELOPE(76.76, 84.76, 19.91, 12.62)"|
|
118
119
|
|
120
|
+
### Solr Year
|
121
|
+
| Label | Solr Year|
|
122
|
+
|:------------------------------|:---------------------------------------------------------|
|
123
|
+
| uri | `solr_year_i`|
|
124
|
+
| Required | no|
|
125
|
+
| Type | integer|
|
126
|
+
| Description | A four digit integer representing a year of temporal coverage or date issued for the resource. This field is used to populate the Year facet and the optional [Blacklight Range Limit gem](https://github.com/projectblacklight/blacklight_range_limit)|
|
127
|
+
| Entry Guidelines | This field must be an integer.|
|
128
|
+
| Controlled Vocabulary | no|
|
129
|
+
| Element Set | GeoBlacklight|
|
130
|
+
| Example | "1982"|
|
131
|
+
|
119
132
|
### Creator
|
120
133
|
| Label | Creator|
|
121
134
|
|:------------------------------|:---------------------------------------------------------|
|
@@ -124,7 +137,7 @@
|
|
124
137
|
| Type | array|
|
125
138
|
| Description | The person(s) or organization that created the resource|
|
126
139
|
| Entry Guidelines | This may be an individual or an organization. If available, it should match with the Library of Congress Name Authority File.|
|
127
|
-
| Controlled Vocabulary |
|
140
|
+
| Controlled Vocabulary | The suggested controlled vocabulary is the [Library of Congress Name Authority File](http://id.loc.gov/authorities/names.html).|
|
128
141
|
| Element Set | Dublin Core Metadata Element Set|
|
129
142
|
| Example | "George Washington", "Thomas Jefferson"|
|
130
143
|
|
@@ -135,10 +148,10 @@
|
|
135
148
|
| Required | no|
|
136
149
|
| Type | string|
|
137
150
|
| Description | At minimum, this is a reiteration of the title in sentence format. Other relevant information, such as data creation methods, data sources, and special licenses, may also be included.|
|
138
|
-
| Entry Guidelines |
|
151
|
+
| Entry Guidelines | This is a plain text field.|
|
139
152
|
| Controlled Vocabulary | no|
|
140
153
|
| Element Set | Dublin Core Metadata Element Set|
|
141
|
-
| Example | "
|
154
|
+
| Example | "This polygon shapefile represents boundaries of election districts in New York City. It was harvested from the NYC Open Data Portal."|
|
142
155
|
|
143
156
|
### Format
|
144
157
|
| Label | Format|
|
@@ -146,7 +159,7 @@
|
|
146
159
|
| uri | `dc_format_s`|
|
147
160
|
| Required | no|
|
148
161
|
| Type | string|
|
149
|
-
| Description | This indicates the file format of the data. If a download link is included, this value shows up on the item page display in the download widget
|
162
|
+
| Description | This indicates the file format of the data. If a download link is included, this value shows up on the item page display in the download widget|
|
150
163
|
| Entry Guidelines | Choose from set values (see Format list)|
|
151
164
|
| Controlled Vocabulary | [Format Controlled Vocabulary](/schema/format-values.md)|
|
152
165
|
| Element Set | Dublin Core Metadata Element Set|
|
@@ -159,7 +172,7 @@
|
|
159
172
|
| Required | no|
|
160
173
|
| Type | array|
|
161
174
|
| Description | Indicates the language of the data or map|
|
162
|
-
| Entry Guidelines |
|
175
|
+
| Entry Guidelines | Spell out language (in English) instead of using the ISO 639-1 code (e.g.,“French” instead of “fra”).|
|
163
176
|
| Controlled Vocabulary | no|
|
164
177
|
| Element Set | Dublin Core Metadata Element Set|
|
165
178
|
| Example | "English"|
|
@@ -167,14 +180,14 @@
|
|
167
180
|
### Publisher
|
168
181
|
| Label | Publisher|
|
169
182
|
|:------------------------------|:---------------------------------------------------------|
|
170
|
-
| uri | `
|
183
|
+
| uri | `dc_publisher_s`|
|
171
184
|
| Required | no|
|
172
185
|
| Type | array|
|
173
186
|
| Description | The organization that made the original resource available|
|
174
187
|
| Entry Guidelines | This should always be an organization.|
|
175
|
-
| Controlled Vocabulary |
|
188
|
+
| Controlled Vocabulary | The suggested controlled vocabulary is the [Library of Congress Name Authority File](http://id.loc.gov/authorities/names.html).|
|
176
189
|
| Element Set | Dublin Core Metadata Element Set|
|
177
|
-
| Example | "ML InfoMap"|
|
190
|
+
| Example | "ML InfoMap (Firm)"|
|
178
191
|
|
179
192
|
### Source
|
180
193
|
| Label | Source|
|
@@ -182,8 +195,8 @@
|
|
182
195
|
| uri | `dc_source_sm`|
|
183
196
|
| Required | no|
|
184
197
|
| Type | array|
|
185
|
-
| Description | This is used
|
186
|
-
| Entry Guidelines | This is only added to the child records. Enter the layer_slug_s of the parent record(s) into this field
|
198
|
+
| Description | This is used to indicate parent/child relationships between data layers and activates the Data Relations widget in GeoBlacklight|
|
199
|
+
| Entry Guidelines | This is only added to the child records. Enter the layer_slug_s of the parent record(s) into this field.|
|
187
200
|
| Controlled Vocabulary | no|
|
188
201
|
| Element Set | Dublin Core Metadata Element Set|
|
189
202
|
| Example | "stanford-vr593vj7147"|
|
@@ -195,8 +208,8 @@
|
|
195
208
|
| Required | no|
|
196
209
|
| Type | array|
|
197
210
|
| Description | These are theme or topic keywords|
|
198
|
-
| Entry Guidelines | These should be consistent and chosen from a controlled vocabulary.
|
199
|
-
| Controlled Vocabulary | Recommended thesauri are ISO Topic Categories and Library of Congress Subject Headings
|
211
|
+
| Entry Guidelines | These should be consistent and chosen from a controlled vocabulary. Use sentence style capitalization, where only the first word of a phrase is capitalized.|
|
212
|
+
| Controlled Vocabulary | Recommended thesauri are [ISO Topic Categories](https://www2.usgs.gov/science/about/thesaurus-full.php?thcode=15) and Library of Congress Subject Headings.|
|
200
213
|
| Element Set | Dublin Core Metadata Element Set|
|
201
214
|
| Example | "Census", "Human settlements"|
|
202
215
|
|
@@ -207,7 +220,7 @@
|
|
207
220
|
| uri | `dc_type_s`|
|
208
221
|
| Required | no|
|
209
222
|
| Type | string|
|
210
|
-
| Description | This is a general element to indicate the larger genre of the resource
|
223
|
+
| Description | This is a general element to indicate the larger genre of the resource|
|
211
224
|
| Entry Guidelines | Choose from Dublin Core Type values|
|
212
225
|
| Controlled Vocabulary | [Type Controlled Vocabulary](/schema/type-values.md)|
|
213
226
|
| Element Set | Dublin Core Metadata Element Set|
|
@@ -222,20 +235,20 @@
|
|
222
235
|
| Description | Holding entity for the layer, such as the title of a collection|
|
223
236
|
| Entry Guidelines | Plain text that is indexed in the Collections facet|
|
224
237
|
| Controlled Vocabulary | no|
|
225
|
-
| Element Set | DCMI Metadata Terms|
|
238
|
+
| Element Set | [DCMI Metadata Terms](http://dublincore.org/documents/dcmi-terms/)|
|
226
239
|
| Example | "Village Maps of India"|
|
227
240
|
|
228
241
|
### Date Issued
|
229
242
|
| Label | Date Issued|
|
230
243
|
|:------------------------------|:---------------------------------------------------------|
|
231
|
-
| uri | `
|
244
|
+
| uri | `dct_issued_s`|
|
232
245
|
| Required | no|
|
233
|
-
| Type |
|
246
|
+
| Type | string|
|
234
247
|
| Description | This is the publication date for the resource|
|
235
|
-
| Entry Guidelines | Use the XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)|
|
248
|
+
| Entry Guidelines | Use any date format, such as the XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)|
|
236
249
|
| Controlled Vocabulary | no|
|
237
|
-
| Element Set | DCMI Metadata Terms|
|
238
|
-
| Example | "2015-01-
|
250
|
+
| Element Set | [DCMI Metadata Terms](http://dublincore.org/documents/dcmi-terms/)|
|
251
|
+
| Example | "2015-01-01"|
|
239
252
|
|
240
253
|
### References
|
241
254
|
| Label | References|
|
@@ -243,9 +256,9 @@
|
|
243
256
|
| uri | `dct_references_s`|
|
244
257
|
| Required | no|
|
245
258
|
| Type | string|
|
246
|
-
| Description | This element is a hash of key/value pairs for different types of external links. It external services and references using the CatInterOp approach
|
259
|
+
| Description | This element is a hash of key/value pairs for different types of external links. It integrates external services and references using the CatInterOp approach|
|
247
260
|
| Entry Guidelines | See [External Services](https://github.com/geoblacklight/geoblacklight/wiki/Schema#external-services)|
|
248
|
-
| Controlled Vocabulary | [References URIs](
|
261
|
+
| Controlled Vocabulary | [References URIs](/schema/references.md)|
|
249
262
|
| Element Set | DCMI Metadata Terms|
|
250
263
|
| Example | "dct_references_s": "{\"http://schema.org/url\":\"http://purl.stanford.edu/bm662dm5913\",\"http://schema.org/downloadUrl\":\"http://stacks.stanford.edu/file/druid:bm662dm5913/data.zip\"}"|
|
251
264
|
|
@@ -256,8 +269,8 @@
|
|
256
269
|
| Required | no|
|
257
270
|
| Type | array|
|
258
271
|
| Description | This field is for place name keywords|
|
259
|
-
| Entry Guidelines |
|
260
|
-
| Controlled Vocabulary | Recommended thesaurus is GeoNames|
|
272
|
+
| Entry Guidelines | Place name text strings should be specified out to the nation level. It is typical for the place name to represent the largest extent the data layer represents.|
|
273
|
+
| Controlled Vocabulary | Recommended thesaurus is [GeoNames](https://www.geonames.org/)|
|
261
274
|
| Element Set | DCMI Metadata Terms|
|
262
275
|
| Example | "Philadelphia, Pennsylvania, United States"|
|
263
276
|
|
@@ -267,7 +280,7 @@
|
|
267
280
|
| uri | `dct_temporal_sm`|
|
268
281
|
| Required | no|
|
269
282
|
| Type | array|
|
270
|
-
| Description | This represents the "Ground Condition" of the resource, meaning the time period data was collected or is intended to represent. Displays on the item page in the Year value
|
283
|
+
| Description | This represents the "Ground Condition" of the resource, meaning the time period data was collected or is intended to represent. Displays on the item page in the Year value|
|
271
284
|
| Entry Guidelines | This is a text string and can indicate uncertainty|
|
272
285
|
| Controlled Vocabulary | no|
|
273
286
|
| Element Set | DCMI Metadata Terms|
|
@@ -279,7 +292,7 @@
|
|
279
292
|
| uri | `layer_geom_type_s`|
|
280
293
|
| Required | no|
|
281
294
|
| Type | string|
|
282
|
-
| Description | This shows up as Data type in GeoBlacklight and each value has an associated icon
|
295
|
+
| Description | This element shows up as Data type in GeoBlacklight, and each value has an associated icon|
|
283
296
|
| Entry Guidelines | Choose from set values (see Controlled Vocabulary Lists)|
|
284
297
|
| Controlled Vocabulary | [Geometry Type Controlled Vocabulary](/schema/geometry-type-values.md)|
|
285
298
|
| Element Set | GeoBlacklight|
|
@@ -291,8 +304,8 @@
|
|
291
304
|
| uri | `layer_id_s`|
|
292
305
|
| Required | no|
|
293
306
|
| Type | string|
|
294
|
-
| Description |
|
295
|
-
| Entry Guidelines | Only the layer name is added here. The base service endpoint URLs (e.g. "https://maps-public.geo.nyu.edu/geoserver/sdr/wms") are added to
|
307
|
+
| Description | Indicates the layer id for any WMS or WFS web services listed in the dct_references_s field|
|
308
|
+
| Entry Guidelines | Only the layer name is added here. The base service endpoint URLs (e.g. "https://maps-public.geo.nyu.edu/geoserver/sdr/wms") are added to the `dct_references_s` field.|
|
296
309
|
| Controlled Vocabulary | no|
|
297
310
|
| Element Set | GeoBlacklight|
|
298
311
|
| Example | "druid:vr593vj7147"|
|