geoblacklight_admin 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +58 -59
- data/Rakefile +25 -10
- data/app/assets/javascripts/geoblacklight_admin.js +1 -1
- data/app/assets/stylesheets/geoblacklight_admin/modules/_forms.scss +108 -0
- data/app/controllers/admin/documents_controller.rb +22 -13
- data/app/controllers/admin/search_controller.rb +2 -1
- data/app/controllers/admin/users_controller.rb +1 -1
- data/app/indexers/document_indexer.rb +1 -1
- data/app/jobs/export_job.rb +7 -5
- data/app/jobs/export_json_bulk_job.rb +95 -0
- data/app/jobs/export_json_job.rb +14 -12
- data/app/models/blacklight_api.rb +6 -6
- data/app/models/blacklight_api_facets.rb +7 -2
- data/app/models/blacklight_api_ids.rb +3 -4
- data/app/models/bulk_action.rb +1 -1
- data/app/views/admin/document_accesses/destroy_all.html.erb +1 -1
- data/app/views/admin/document_downloads/destroy_all.html.erb +1 -1
- data/app/views/admin/documents/_form_nav.html.erb +3 -1
- data/app/views/admin/documents/_json_file.jbuilder +14 -0
- data/app/views/admin/documents/_result_selected_options.html.erb +3 -1
- data/app/views/admin/documents/fetch.json_file.jbuilder +9 -0
- data/app/views/admin/documents/index.json_file.jbuilder +9 -0
- data/app/views/admin/elements/index.html.erb +1 -1
- data/app/views/admin/form_elements/index.html.erb +1 -1
- data/app/views/admin/shared/_navbar.html.erb +3 -3
- data/app/views/admin/shared/_toast.html.erb +1 -1
- data/app/views/admin/users/index.html.erb +1 -1
- data/config/locales/documents.en.yml +3 -0
- data/db/migrate/20230316183001_add_geoblacklight_admin_gem.rb +1 -0
- data/db/seeds.rb +0 -1
- data/db/seeds_elements.csv +56 -55
- data/db/seeds_elements.numbers +0 -0
- data/db/seeds_form_elements.csv +65 -64
- data/db/seeds_form_elements.numbers +0 -0
- data/lib/generators/geoblacklight_admin/config_generator.rb +31 -76
- data/lib/generators/geoblacklight_admin/install_generator.rb +1 -9
- data/lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json +12 -6
- data/lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb +315 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb +2 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/mime_types.rb +15 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/pagy.rb +2 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/simple_form.rb +178 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/simple_form_bootstrap.rb +365 -0
- data/lib/generators/geoblacklight_admin/templates/config/settings.yml +74 -22
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/results_controller.js +10 -0
- data/lib/generators/geoblacklight_admin/templates/package.json +2 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/schema.xml +3 -3
- data/lib/generators/geoblacklight_admin/views_generator.rb +2 -2
- data/lib/geoblacklight_admin/version.rb +1 -1
- data/lib/tasks/geoblacklight_admin.rake +6 -6
- metadata +24 -17
- data/lib/generators/geoblacklight_admin/example_docs_generator.rb +0 -18
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/confirmations/new.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/invitations/edit.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/invitations/new.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/mailer/invitation_instructions.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/mailer/invitation_instructions.text.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/passwords/edit.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/passwords/new.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/registrations/edit.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/registrations/new.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/sessions/new.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/shared/_links.html.erb +0 -0
- /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/unlocks/new.html.erb +0 -0
data/app/jobs/export_json_job.rb
CHANGED
@@ -3,22 +3,23 @@
|
|
3
3
|
require "json"
|
4
4
|
require "pathname"
|
5
5
|
|
6
|
-
#
|
6
|
+
# ExportJsonJob
|
7
7
|
class ExportJsonJob < ApplicationJob
|
8
8
|
queue_as :default
|
9
9
|
|
10
|
-
def perform(current_user, query_params, export_service)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
def perform(request, current_user, query_params, export_service)
|
11
|
+
logger.debug("\n\n Background Job: ♞")
|
12
|
+
logger.debug("Request: #{request.inspect}")
|
13
|
+
logger.debug("User: #{current_user.inspect}")
|
14
|
+
logger.debug("Query: #{query_params.inspect}")
|
15
|
+
logger.debug("Export Service: #{export_service.inspect}")
|
16
|
+
logger.debug("\n\n")
|
16
17
|
|
17
18
|
# Test broadcast
|
18
19
|
ActionCable.server.broadcast("export_channel", {data: "Hello from Export JSON Job!"})
|
19
20
|
|
20
21
|
# Query params into Doc ids
|
21
|
-
document_ids = query_params[:ids] || crawl_query(query_params)
|
22
|
+
document_ids = query_params[:ids] || crawl_query(request, query_params)
|
22
23
|
|
23
24
|
# Rails.logger.debug("Document Ids: #{document_ids}")
|
24
25
|
|
@@ -47,7 +48,7 @@ class ExportJsonJob < ApplicationJob
|
|
47
48
|
tree.dirname.mkpath
|
48
49
|
Rails.logger.debug tree.inspect
|
49
50
|
|
50
|
-
json_output = DocumentsController.render("_#{query_params[:format]}",
|
51
|
+
json_output = Admin::DocumentsController.render("_#{query_params[:format]}",
|
51
52
|
locals: {document: doc})
|
52
53
|
|
53
54
|
json_obj = JSON.parse(json_output)
|
@@ -103,15 +104,16 @@ class ExportJsonJob < ApplicationJob
|
|
103
104
|
})
|
104
105
|
end
|
105
106
|
|
106
|
-
def crawl_query(query_params, doc_ids = [])
|
107
|
+
def crawl_query(request, query_params, doc_ids = [])
|
107
108
|
logger.debug("\n\n CRAWL Query: #{query_params}")
|
108
|
-
|
109
|
+
logger.debug("\n\n CRAWL Query Request: #{request}")
|
110
|
+
api_results = BlacklightApiIds.new(request, query_params)
|
109
111
|
logger.debug("API Results: #{api_results.results.inspect}")
|
110
112
|
|
111
113
|
doc_ids << api_results.results.pluck("id")
|
112
114
|
|
113
115
|
unless api_results.meta["pages"]["next_page"].nil?
|
114
|
-
crawl_query(query_params.merge!({page: api_results.meta["pages"]["next_page"]}),
|
116
|
+
crawl_query(request, query_params.merge!({page: api_results.meta["pages"]["next_page"]}),
|
115
117
|
doc_ids)
|
116
118
|
end
|
117
119
|
|
@@ -1,28 +1,28 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "httparty"
|
4
|
+
|
3
5
|
# BlacklightApi
|
4
6
|
class BlacklightApi
|
5
7
|
include HTTParty
|
6
8
|
default_timeout 300
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
def initialize(**args)
|
10
|
+
def initialize(request, args)
|
11
11
|
defaults = {
|
12
12
|
q: "*",
|
13
13
|
page: 1,
|
14
14
|
sort: "score+desc%2C+dc_title_sort+asc",
|
15
15
|
rows: 20
|
16
16
|
}
|
17
|
-
|
18
|
-
@options = defaults.merge(
|
17
|
+
@request = request
|
18
|
+
@options = defaults.merge(args)
|
19
19
|
append_facets(@options[:f], @options)
|
20
20
|
append_daterange(@options[:f], @options)
|
21
21
|
@options.compact!
|
22
22
|
end
|
23
23
|
|
24
24
|
def fetch
|
25
|
-
@fetch ||= self.class.get("
|
25
|
+
@fetch ||= self.class.get("#{@request}#{BLACKLIGHT_JSON_API}", query: @options)
|
26
26
|
end
|
27
27
|
|
28
28
|
def results
|
@@ -1,12 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "httparty"
|
4
|
+
|
3
5
|
# BlacklightApiFacets
|
4
6
|
class BlacklightApiFacets
|
5
7
|
include HTTParty
|
6
|
-
|
8
|
+
|
9
|
+
def initialize(request)
|
10
|
+
@request = request
|
11
|
+
end
|
7
12
|
|
8
13
|
def fetch
|
9
|
-
@fetch ||= self.class.get("
|
14
|
+
@fetch ||= self.class.get("#{@request}#{BLACKLIGHT_JSON_API_FACETS}", query: {})
|
10
15
|
end
|
11
16
|
|
12
17
|
def facets
|
@@ -5,9 +5,7 @@ class BlacklightApiIds
|
|
5
5
|
include HTTParty
|
6
6
|
default_timeout 300
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
def initialize(args = {})
|
8
|
+
def initialize(request, args = {})
|
11
9
|
defaults = {
|
12
10
|
q: "*",
|
13
11
|
page: 1,
|
@@ -15,6 +13,7 @@ class BlacklightApiIds
|
|
15
13
|
rows: 1000
|
16
14
|
}
|
17
15
|
|
16
|
+
@request = request
|
18
17
|
@options = defaults.merge(**args)
|
19
18
|
append_facets(@options[:f], @options)
|
20
19
|
append_daterange(@options[:f], @options)
|
@@ -24,7 +23,7 @@ class BlacklightApiIds
|
|
24
23
|
def fetch
|
25
24
|
Rails.logger.debug { "BlacklightApiIds > fetch > query: #{@options.inspect}" }
|
26
25
|
|
27
|
-
@fetch ||= self.class.get("
|
26
|
+
@fetch ||= self.class.get("#{@request}#{BLACKLIGHT_JSON_API_IDS}", query: @options)
|
28
27
|
end
|
29
28
|
|
30
29
|
def results
|
data/app/models/bulk_action.rb
CHANGED
@@ -69,7 +69,7 @@ class BulkAction < ApplicationRecord
|
|
69
69
|
def api_documents(uri)
|
70
70
|
qargs = Rack::Utils.parse_nested_query(uri.query)
|
71
71
|
query_params = {q: qargs["q"], f: qargs["f"], page: qargs["page"], rows: 1_000_000}
|
72
|
-
api_documents = BlacklightApiIds.new(**query_params)
|
72
|
+
api_documents = BlacklightApiIds.new(request, **query_params)
|
73
73
|
create_documents(api_documents.load_all)
|
74
74
|
end
|
75
75
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div class="make-me-sticky mt-4 ml-4">
|
2
2
|
<nav class="nav flex-column ml-4 mt-6">
|
3
|
-
|
3
|
+
<% if @document.persisted? %>
|
4
|
+
<strong class="mt-4"><%= link_to "GBL♦Admin | View in GeoBlacklight", solr_document_url(@document), { class: 'btn btn-warning' } %></strong>
|
5
|
+
<% end %>
|
4
6
|
|
5
7
|
<%- form_elements = FormElement.all.order(position: :asc) %>
|
6
8
|
<%- form_elements.each do |form_element| %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Required
|
4
|
+
json.set! :gbl_mdVersion_s, "BTAA Aardvark"
|
5
|
+
|
6
|
+
Element.exportable.each do |elm|
|
7
|
+
if document.send(elm.export_value).is_a?(Array)
|
8
|
+
if document.send(elm.export_value).any?(&:present?)
|
9
|
+
json.set! elm.solr_field.to_s.to_sym, document.send(elm.export_value)
|
10
|
+
end
|
11
|
+
else
|
12
|
+
json.set! elm.solr_field.to_s.to_sym, document.send(elm.export_value) unless document.send(elm.export_value).blank?
|
13
|
+
end
|
14
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<span id="result-selected-options" class="hidden" data-scope="pageset" data-controller="results" data-resultset="<%= admin_documents_path( params.to_unsafe_h.merge({rows: '1000000'})) %>" data-pageset="/fetch?">
|
2
2
|
|
3
3
|
<%= form_with(model: BulkAction.new, html: { id: 'result-action-form', data: { type: "html", action: "submit->results#setPubState" }, style: 'display:inline'}, url: admin_bulk_actions_path) do |form| -%>
|
4
|
+
<%= form.hidden_field :request, value: "#{request.protocol}#{request.host}:#{request.port}" %>
|
4
5
|
<%= form.hidden_field :scope, value: "-" %>
|
5
6
|
<%= form.hidden_field :field_name, value: "" %>
|
6
7
|
<%= form.hidden_field :field_value, value: "" %>
|
@@ -16,7 +17,8 @@
|
|
16
17
|
CSV
|
17
18
|
</a>
|
18
19
|
<div class="dropdown-divider"></div>
|
19
|
-
<a class="dropdown-item" data-action="click->results#
|
20
|
+
<a class="dropdown-item" data-action="click->results#exportJsonFile" href="javascript:void(0);">JSON (Single File)</a>
|
21
|
+
<a class="dropdown-item" data-action="click->results#exportJsonAardvark" href="javascript:void(0);">JSON (Tree Directory)</a>
|
20
22
|
<a class="dropdown-item" data-action="click->results#exportJsonBtaaAardvark" href="javascript:void(0);">JSON (BTAA Aardvark)</a>
|
21
23
|
<a class="dropdown-item" data-action="click->results#exportJsonGBLv1" href="javascript:void(0);">JSON (GBL v1.0)</a>
|
22
24
|
<div class="dropdown-divider"></div>
|
@@ -68,12 +68,12 @@
|
|
68
68
|
</li>
|
69
69
|
<% if user_signed_in? %>
|
70
70
|
<li class="nav-item">
|
71
|
-
<%= link_to
|
71
|
+
<%= link_to "Sign out", destroy_user_session_path, { :method => :delete, class: 'nav-link'} %>
|
72
72
|
</li>
|
73
73
|
<li class="nav-item">
|
74
|
-
<%= link_to
|
74
|
+
<%= link_to(current_user.email, edit_user_registration_path, {class: 'nav-link'}) %>
|
75
75
|
</li>
|
76
|
-
|
76
|
+
<% else %>
|
77
77
|
<li class="nav-item">
|
78
78
|
<%= link_to('Sign in', new_user_session_path, {class: 'nav-link'}) %>
|
79
79
|
</li>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!-- Toast -->
|
2
2
|
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" style="position:relative; top:0; right:0;" data-delay="5000">
|
3
3
|
<div class="toast-header">
|
4
|
-
<strong class="mr-auto">
|
4
|
+
<strong class="mr-auto">GBL ADMIN</strong>
|
5
5
|
<small class="text-muted">just now</small>
|
6
6
|
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
7
7
|
<span aria-hidden="true">×</span>
|
@@ -163,6 +163,7 @@ class AddGeoblacklightAdminGem < ActiveRecord::Migration[6.1]
|
|
163
163
|
|
164
164
|
create_table 'bulk_actions', force: :cascade do |t|
|
165
165
|
t.string 'name'
|
166
|
+
t.string 'request', null: false
|
166
167
|
t.string 'scope', null: false
|
167
168
|
t.string 'field_name', null: false
|
168
169
|
t.string 'field_value', null: false
|
data/db/seeds.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require 'csv'
|
4
4
|
|
5
|
-
# frozen_string_literal: true
|
6
5
|
# This file should contain all the record creation needed to seed the database with its default values.
|
7
6
|
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
|
8
7
|
#
|
data/db/seeds_elements.csv
CHANGED
@@ -1,56 +1,57 @@
|
|
1
1
|
label,solr_field,field_definition,field_type,required,repeatable,formable,placeholder_text,data_entry_hint,test_fixture_example,controlled_vocabulary,js_behaviors,html_attributes,display_only_on_persisted,importable,import_deliminated,import_transformation_method,exportable,export_transformation_method,indexable,index_transformation_method,validation_method,position
|
2
|
-
Title,dct_title_s,https://opengeometadata.org/
|
3
|
-
Alternative Title,dct_alternative_sm,https://opengeometadata.org/
|
4
|
-
Description,dct_description_sm,https://opengeometadata.org/
|
5
|
-
Language,dct_language_sm,https://opengeometadata.org/
|
6
|
-
|
7
|
-
|
8
|
-
Creator
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
Resource
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
Geometry,locn_geometry,https://opengeometadata.org/
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Is
|
30
|
-
|
31
|
-
Is
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
Accrual
|
47
|
-
|
48
|
-
Date
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
2
|
+
Title,dct_title_s,https://opengeometadata.org/ogm-aardvark/#title,string,TRUE,FALSE,TRUE,,"Theme: city, state, temporal coverage",title,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,title,presence,1
|
3
|
+
Alternative Title,dct_alternative_sm,https://opengeometadata.org/ogm-aardvark/#alternative-title,string,FALSE,TRUE,TRUE,,,alternative-title1|alternative-title2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,2
|
4
|
+
Description,dct_description_sm,https://opengeometadata.org/ogm-aardvark/#description,text,FALSE,TRUE,TRUE,,,description1|description2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,3
|
5
|
+
Language,dct_language_sm,https://opengeometadata.org/ogm-aardvark/#language,string,FALSE,TRUE,TRUE,,,language1|language2,languages,autocomplete,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,4
|
6
|
+
Display Note,gbl_displayNote_sm,https://opengeometadata.org/ogm-aardvark/#display-note,string,FALSE,TRUE,TRUE,,"Prefix the string with ""Danger:"", ""Info:"", ""Tip:"", or ""Warning:"" to specify the type of note.",Danger: This text will be displayed in a red box|Info: This text will be displayed in a blue box,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,5
|
7
|
+
B1G Language,b1g_language_sm,https://geobtaa.github.io/metadata/b1g-custom-elements/#language-string,string,FALSE,TRUE,TRUE,,,b1g_language1|b1g_language2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,iso_language_mapping,,6
|
8
|
+
Creator,dct_creator_sm,https://opengeometadata.org/ogm-aardvark/#creator,string,FALSE,TRUE,TRUE,,,creator1|creator2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,7
|
9
|
+
Creator ID,b1g_creatorID_sm,https://geobtaa.github.io/metadata/b1g-custom-elements/#creator-id,string,FALSE,TRUE,TRUE,,,creatorID1|creatorID2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,8
|
10
|
+
Publisher,dct_publisher_sm,https://opengeometadata.org/ogm-aardvark/#publisher,string,FALSE,TRUE,TRUE,,,publisher1|publisher2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,9
|
11
|
+
Provider,schema_provider_s,https://opengeometadata.org/ogm-aardvark/#provider,string,FALSE,FALSE,TRUE,,,Provider,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,10
|
12
|
+
Resource Class,gbl_resourceClass_sm,https://opengeometadata.org/ogm-aardvark/#resource-class,string,TRUE,TRUE,TRUE,,,Geospatial data|Maps,resource_classes,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,presence,11
|
13
|
+
Resource Type,gbl_resourceType_sm,https://opengeometadata.org/ogm-aardvark/#resource-type,string,FALSE,TRUE,TRUE,,,resource-type1|resource-type2,resource_types,autocomplete,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,12
|
14
|
+
Subject,dct_subject_sm,https://opengeometadata.org/ogm-aardvark/#subject,string,FALSE,TRUE,TRUE,,,subject1|subject2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,13
|
15
|
+
Theme,dcat_theme_sm,https://opengeometadata.org/ogm-aardvark/#theme,string,FALSE,TRUE,TRUE,,,Farming|Biota,themes,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,14
|
16
|
+
Keyword,dcat_keyword_sm,https://opengeometadata.org/ogm-aardvark/#keyword,string,FALSE,TRUE,TRUE,,,keyword1|keyword2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,15
|
17
|
+
Temporal Coverage,dct_temporal_sm,https://opengeometadata.org/ogm-aardvark/#temporal-coverage,string,FALSE,TRUE,TRUE,,,2019|2020,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,16
|
18
|
+
Date Issued,dct_issued_s,https://opengeometadata.org/ogm-aardvark/#date-issued,string,FALSE,FALSE,TRUE,,YYYY,1/1/20,,datepicker-years,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,17
|
19
|
+
Index Year,gbl_indexYear_im,https://opengeometadata.org/ogm-aardvark/#index-year,integer,FALSE,TRUE,TRUE,,YYYY,2020|2021,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,18
|
20
|
+
Date Range,gbl_dateRange_drsim,https://opengeometadata.org/ogm-aardvark/#date-range,string,FALSE,TRUE,TRUE,YYYY-YYYY,,2020-2020,,mask,"{:""data-inputmask""=>""'mask': '9999-9999'""}",FALSE,TRUE,TRUE,,TRUE,date_range_json,TRUE,date_range_json,Document::DateRangeValidator,19
|
21
|
+
Spatial Coverage,dct_spatial_sm,https://opengeometadata.org/ogm-aardvark/#spatial-coverage,string,FALSE,TRUE,TRUE,,,spatial-coverage1|spatial-coverage2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,20
|
22
|
+
Geometry,locn_geometry,https://opengeometadata.org/ogm-aardvark/#geometry,string,FALSE,FALSE,TRUE,,"WKT - An ENVELOPE, POLYGON, or MULTIPOLYGON value. Use ENVELOPE(-180,180,90,-90) for a whole earth geometry.","POLYGON((-88.11 41.75, -84.75 41.75, -84.75 37.86, -88.11 37.86, -88.11 41.75))",,,,FALSE,TRUE,FALSE,,TRUE,derive_locn_geometry,TRUE,derive_locn_geometry,Document::GeomValidator,21
|
23
|
+
Bounding Box,dcat_bbox,https://opengeometadata.org/ogm-aardvark/#bounding-box,string,FALSE,FALSE,TRUE,,"W,S,E,N - A centroid will be derived from this value.","-95.0379,40.6333,-91.198,43.1373",,,,FALSE,TRUE,FALSE,,TRUE,derive_dcat_bbox,TRUE,derive_dcat_bbox,Document::BboxValidator,22
|
24
|
+
Centroid,dcat_centroid,https://opengeometadata.org/ogm-aardvark/#centroid,string,FALSE,FALSE,TRUE,,,"39.805,-86.43",,,,FALSE,TRUE,FALSE,,TRUE,derive_dcat_centroid,TRUE,derive_dcat_centroid,,23
|
25
|
+
Georeferenced,gbl_georeferenced_b,https://opengeometadata.org/ogm-aardvark/#georeferenced,boolean,FALSE,FALSE,TRUE,,,FALSE,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,24
|
26
|
+
GeoNames,b1g_geonames_sm,https://geobtaa.github.io/metadata/b1g-custom-elements/#geonames,string,FALSE,TRUE,TRUE,,,geonames1|geonames2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,25
|
27
|
+
Relation,dct_relation_sm,https://opengeometadata.org/ogm-aardvark/#relation,string,FALSE,TRUE,TRUE,,,relation1|relation2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,26
|
28
|
+
Member Of,pcdm_memberOf_sm,https://opengeometadata.org/ogm-aardvark/#member-of,string,FALSE,TRUE,TRUE,,,member-of1|member-of2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,27
|
29
|
+
Is Part Of,dct_isPartOf_sm,https://opengeometadata.org/ogm-aardvark/#is-part-of,string,FALSE,TRUE,TRUE,,,is-part-of1|is-part-of2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,28
|
30
|
+
Source,dct_source_sm,https://opengeometadata.org/ogm-aardvark/#source,string,FALSE,TRUE,TRUE,,,source1|source2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,29
|
31
|
+
Is Version Of,dct_isVersionOf_sm,https://opengeometadata.org/ogm-aardvark/#is-version-of,string,FALSE,TRUE,TRUE,,,version1|version2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,30
|
32
|
+
Replaces,dct_replaces_sm,https://opengeometadata.org/ogm-aardvark/#replaces,string,FALSE,TRUE,TRUE,,,replaces1|replaces2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,31
|
33
|
+
Is Replaced By,dct_isReplacedBy_sm,https://opengeometadata.org/ogm-aardvark/#is-replaced-by,string,FALSE,TRUE,TRUE,,,is-replaced-by1|is-replaced-by2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,32
|
34
|
+
Rights,dct_rights_sm,https://opengeometadata.org/ogm-aardvark/#rights_1,string,FALSE,TRUE,TRUE,,,rights,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,33
|
35
|
+
Rights Holder,dct_rightsHolder_sm,https://opengeometadata.org/ogm-aardvark/#rights-holder,string,FALSE,TRUE,TRUE,,,rights-holder1|rights-holder2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,34
|
36
|
+
License,dct_license_sm,https://opengeometadata.org/ogm-aardvark/#license,string,FALSE,TRUE,TRUE,,,license1|license2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,35
|
37
|
+
Access Rights,dct_accessRights_s,https://opengeometadata.org/ogm-aardvark/#access-rights,string,TRUE,FALSE,TRUE,,,access-rights1|access-rights2,access_rights,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,presence,36
|
38
|
+
Format,dct_format_s,https://opengeometadata.org/ogm-aardvark/#format,string,FALSE,FALSE,TRUE,,,format,formats,autocomplete,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,37
|
39
|
+
File Size,gbl_fileSize_s,https://opengeometadata.org/ogm-aardvark/#file-size,string,FALSE,FALSE,TRUE,,,60mb,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,38
|
40
|
+
Reference,dct_references_s,https://opengeometadata.org/ogm-aardvark/#references,text,FALSE,TRUE,TRUE,,URIs and Values,,reference_values,,,FALSE,TRUE,FALSE,build_dct_references,TRUE,references_json,TRUE,references_json,,39
|
41
|
+
WxS Identifier,gbl_wxsIdentifier_s,https://opengeometadata.org/ogm-aardvark/#wxs-identifier,string,FALSE,FALSE,TRUE,,,wxs-identifier,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,40
|
42
|
+
B1G Image URL,b1g_image_ss,https://geobtaa.github.io/metadata/b1g-custom-elements/#image,string,FALSE,FALSE,TRUE,,,image,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,41
|
43
|
+
ID,geomg_id_s,https://opengeometadata.org/ogm-aardvark/#id,string,TRUE,FALSE,TRUE,,,slug,,disable_if_persisted,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,presence,42
|
44
|
+
Identifier,dct_identifier_sm,https://opengeometadata.org/ogm-aardvark/#identifier,string,FALSE,TRUE,TRUE,,,identifier1|identifier2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,43
|
45
|
+
Code,b1g_code_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#code,string,FALSE,FALSE,TRUE,,,code,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,44
|
46
|
+
Accrual Method,b1g_dct_accrualMethod_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#accrual-method,string,FALSE,FALSE,TRUE,,,accrual-method,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,45
|
47
|
+
Accrual Periodicity,b1g_dct_accrualPeriodicity_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#accrual-periodicity,string,FALSE,FALSE,TRUE,,,Annually,accrual_periodicity,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,46
|
48
|
+
Date Accessioned,b1g_dateAccessioned_sm,https://geobtaa.github.io/metadata/b1g-custom-elements/#date-accessioned,string,FALSE,TRUE,TRUE,,,date-accessioned1|date-accessioned2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,47
|
49
|
+
Date Retired,b1g_dateRetired_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#date-retired,string,FALSE,FALSE,TRUE,,YYYY-MM-DD,date-retired,,datepicker,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,48
|
50
|
+
Status,b1g_status_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#status,string,FALSE,FALSE,TRUE,,,Active,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,49
|
51
|
+
Publication State,b1g_publication_state_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#publication-state,string,TRUE,FALSE,TRUE,,,published,publication_states,,,TRUE,FALSE,FALSE,,TRUE,current_state,TRUE,current_state,,50
|
52
|
+
Suppressed Record,gbl_suppressed_b,https://opengeometadata.org/ogm-aardvark/#suppressed,boolean,FALSE,FALSE,TRUE,,,FALSE,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,51
|
53
|
+
Child Record,b1g_child_record_b,https://geobtaa.github.io/metadata/b1g-custom-elements/#child-record,boolean,FALSE,FALSE,TRUE,,,FALSE,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,,,52
|
54
|
+
Mediator,b1g_dct_mediator_sm,https://geobtaa.github.io/metadata/b1g-custom-elements/#mediator,string,FALSE,TRUE,TRUE,,,mediator1|mediator2,,,,FALSE,TRUE,TRUE,,TRUE,,TRUE,,,53
|
55
|
+
Access,b1g_access_s,https://geobtaa.github.io/metadata/b1g-custom-elements/#access,string,FALSE,FALSE,TRUE,,,access,,,,FALSE,TRUE,FALSE,,TRUE,,TRUE,access_json,,54
|
56
|
+
Created At,date_created_dtsi,,datetime,FALSE,FALSE,FALSE,,,2021-12-09 15:50:49.803415,,,,TRUE,FALSE,FALSE,,TRUE,created_at_dt,TRUE,created_at_dt,,55
|
57
|
+
Updated At,date_modified_dtsi,,datetime,FALSE,FALSE,FALSE,,,2022-12-12 17:02:03.422663,,,,TRUE,FALSE,FALSE,,TRUE,gbl_mdModified_dt,TRUE,gbl_mdModified_dt,,56
|
data/db/seeds_elements.numbers
CHANGED
Binary file
|
data/db/seeds_form_elements.csv
CHANGED
@@ -5,67 +5,68 @@ FormControl,,dct_title_s,3
|
|
5
5
|
FormControl,NULL,dct_alternative_sm,4
|
6
6
|
FormControl,,dct_description_sm,5
|
7
7
|
FormControl,,dct_language_sm,6
|
8
|
-
|
9
|
-
|
10
|
-
FormControl,,
|
11
|
-
FormControl,,
|
12
|
-
FormControl,,
|
13
|
-
|
14
|
-
|
15
|
-
FormControl,,
|
16
|
-
FormControl,,
|
17
|
-
FormControl,,
|
18
|
-
FormControl,,
|
19
|
-
|
20
|
-
|
21
|
-
FormControl,,
|
22
|
-
FormControl,,
|
23
|
-
|
24
|
-
|
25
|
-
FormControl,,
|
26
|
-
FormControl,,
|
27
|
-
FormControl,,
|
28
|
-
|
29
|
-
|
30
|
-
FormControl,,
|
31
|
-
FormControl,,
|
32
|
-
FormControl,,
|
33
|
-
FormControl,,
|
34
|
-
FormControl,,
|
35
|
-
FormControl,,
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
FormControl,,
|
40
|
-
FormControl,,
|
41
|
-
FormControl,,
|
42
|
-
|
43
|
-
|
44
|
-
FormControl,,
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
FormControl,,
|
50
|
-
FormControl,,
|
51
|
-
|
52
|
-
|
53
|
-
FormControl,,
|
54
|
-
FormControl,,
|
55
|
-
FormControl,,
|
56
|
-
|
57
|
-
|
58
|
-
FormControl,,
|
59
|
-
FormControl,,
|
60
|
-
FormControl,,
|
61
|
-
FormControl,,
|
62
|
-
FormControl,,
|
63
|
-
FormControl,,
|
64
|
-
FormControl,,
|
65
|
-
|
66
|
-
|
67
|
-
FormControl,,
|
68
|
-
FormControl,,
|
69
|
-
FormControl,,
|
70
|
-
|
71
|
-
|
8
|
+
FormControl,,gbl_displayNote_sm,7
|
9
|
+
FormGroup,Credits,,8
|
10
|
+
FormControl,,dct_creator_sm,9
|
11
|
+
FormControl,,b1g_creatorID_sm,10
|
12
|
+
FormControl,,dct_publisher_sm,11
|
13
|
+
FormControl,,schema_provider_s,12
|
14
|
+
FormGroup,Categories,,13
|
15
|
+
FormControl,,gbl_resourceClass_sm,14
|
16
|
+
FormControl,,gbl_resourceType_sm,15
|
17
|
+
FormControl,,dct_subject_sm,16
|
18
|
+
FormControl,,dcat_theme_sm,17
|
19
|
+
FormControl,,dcat_keyword_sm,18
|
20
|
+
FormGroup,Temporal,,19
|
21
|
+
FormControl,,dct_temporal_sm,20
|
22
|
+
FormControl,,dct_issued_s,21
|
23
|
+
FormControl,,gbl_dateRange_drsim,22
|
24
|
+
FormGroup,Spatial,,23
|
25
|
+
FormControl,,dct_spatial_sm,24
|
26
|
+
FormControl,,dcat_bbox,25
|
27
|
+
FormControl,,locn_geometry,26
|
28
|
+
FormControl,,b1g_geonames_sm,27
|
29
|
+
FormGroup,Relations,,28
|
30
|
+
FormControl,,dct_relation_sm,29
|
31
|
+
FormControl,,pcdm_memberOf_sm,30
|
32
|
+
FormControl,,dct_isPartOf_sm,31
|
33
|
+
FormControl,,dct_source_sm,32
|
34
|
+
FormControl,,dct_isVersionOf_sm,33
|
35
|
+
FormControl,,dct_replaces_sm,34
|
36
|
+
FormControl,,dct_isReplacedBy_sm,35
|
37
|
+
FormHeader,Distribution,,36
|
38
|
+
FormGroup,Object,,37
|
39
|
+
FormControl,,dct_format_s,38
|
40
|
+
FormControl,,gbl_fileSize_s,39
|
41
|
+
FormControl,,gbl_wxsIdentifier_s,40
|
42
|
+
FormControl,,gbl_georeferenced_b,41
|
43
|
+
FormGroup,Links,,42
|
44
|
+
FormControl,,dct_references_s,43
|
45
|
+
FormControl,,b1g_image_ss,44
|
46
|
+
FormFeature,Multiple Download Links,,45
|
47
|
+
FormHeader,Administrative,,46
|
48
|
+
FormGroup,Codes,,47
|
49
|
+
FormControl,,geomg_id_s,48
|
50
|
+
FormControl,,dct_identifier_sm,49
|
51
|
+
FormControl,,b1g_code_s,50
|
52
|
+
FormGroup,Rights,,51
|
53
|
+
FormControl,,dct_accessRights_s,52
|
54
|
+
FormControl,,dct_rightsHolder_sm,53
|
55
|
+
FormControl,,dct_license_sm,54
|
56
|
+
FormControl,,dct_rights_sm,55
|
57
|
+
FormGroup,Life Cycle,,56
|
58
|
+
FormControl,,date_created_dtsi,57
|
59
|
+
FormControl,,date_modified_dtsi,58
|
60
|
+
FormControl,,b1g_dct_accrualMethod_s,59
|
61
|
+
FormControl,,b1g_dct_accrualPeriodicity_s,60
|
62
|
+
FormControl,,b1g_dateAccessioned_sm,61
|
63
|
+
FormControl,,b1g_dateRetired_s,62
|
64
|
+
FormControl,,b1g_status_s,63
|
65
|
+
FormControl,,b1g_publication_state_s,64
|
66
|
+
FormGroup,Accessibility,,65
|
67
|
+
FormControl,,gbl_suppressed_b,66
|
68
|
+
FormControl,,b1g_child_record_b,67
|
69
|
+
FormControl,,b1g_dct_mediator_sm,68
|
70
|
+
FormControl,,b1g_access_s,69
|
71
|
+
FormHeader,Related Items,,70
|
72
|
+
FormFeature,Institutional Access Links,,71
|
Binary file
|