hydra_mediated 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/HYDRA_MEDIATED_VERSION +1 -0
- data/README.md +36 -0
- data/Rakefile +5 -0
- data/app/assets/images/blacklight/bg.png +0 -0
- data/app/assets/images/blacklight/border.png +0 -0
- data/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
- data/app/assets/images/blacklight/checkmark.gif +0 -0
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/assets/images/blacklight/magnifying_glass.gif +0 -0
- data/app/assets/images/blacklight/remove.gif +0 -0
- data/app/assets/images/blacklight/separator.gif +0 -0
- data/app/assets/images/blacklight/start_over.gif +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/application.js +17 -0
- data/app/assets/javascripts/items.js.coffee +3 -0
- data/app/assets/stylesheets/application.css +14 -0
- data/app/assets/stylesheets/blacklight.css.scss +4 -0
- data/app/assets/stylesheets/items.css.scss +3 -0
- data/app/controllers/application_controller.rb +10 -0
- data/app/controllers/catalog_controller.rb +165 -0
- data/app/controllers/items_controller.rb +34 -0
- data/app/controllers/submissions_controller.rb +7 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/items_helper.rb +5 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/ability.rb +3 -0
- data/app/models/ead.rb +3 -0
- data/app/models/etd.rb +3 -0
- data/app/models/generic.rb +3 -0
- data/app/models/generic_file.rb +3 -0
- data/app/models/item.rb +4 -0
- data/app/models/solr_document.rb +33 -0
- data/app/models/user.rb +22 -0
- data/app/views/catalog/_home_text.html.erb +9 -0
- data/app/views/catalog/_show_tools.html.erb +44 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +17 -0
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/items/done.html.erb +3 -0
- data/app/views/items/edit.html.erb +25 -0
- data/app/views/items/new.html.erb +22 -0
- data/app/views/items/submit.html.erb +6 -0
- data/app/views/items/upload.html.erb +5 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/submissions/new.html.erb +13 -0
- data/config.ru +4 -0
- data/config/SolrMarc/config-test.properties +37 -0
- data/config/SolrMarc/config.properties +37 -0
- data/config/SolrMarc/index.properties +97 -0
- data/config/SolrMarc/index_scripts/dewey.bsh +47 -0
- data/config/SolrMarc/index_scripts/format.bsh +126 -0
- data/config/SolrMarc/translation_maps/README_MAPS +1 -0
- data/config/SolrMarc/translation_maps/callnumber_map.properties +407 -0
- data/config/SolrMarc/translation_maps/composition_era_map.properties +56 -0
- data/config/SolrMarc/translation_maps/country_map.properties +379 -0
- data/config/SolrMarc/translation_maps/format_map.properties +50 -0
- data/config/SolrMarc/translation_maps/instrument_map.properties +101 -0
- data/config/SolrMarc/translation_maps/language_map.properties +490 -0
- data/config/application.rb +66 -0
- data/config/boot.rb +6 -0
- data/config/database.yml +25 -0
- data/config/environment.rb +5 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +20 -0
- data/db/migrate/20130606160529_devise_create_users.rb +46 -0
- data/db/migrate/20130606160531_add_devise_guests_to_users.rb +15 -0
- data/db/migrate/20130606160536_create_searches.rb +16 -0
- data/db/migrate/20130606160537_create_bookmarks.rb +18 -0
- data/db/migrate/20130606160538_remove_editable_fields_from_bookmarks.rb +12 -0
- data/db/migrate/20130606160539_add_user_types_to_bookmarks_searches.rb +16 -0
- data/db/schema.rb +54 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/fedora_conf/conf/development/fedora.fcfg +953 -0
- data/fedora_conf/conf/test/fedora.fcfg +953 -0
- data/hydra_mediated.gemspec +22 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/hydra/mediated/ability.rb +17 -0
- data/lib/hydra/mediated/generic_file.rb +13 -0
- data/lib/hydra/mediated/item.rb +35 -0
- data/lib/hydra_mediated.rb +21 -0
- data/lib/tasks/.gitkeep +0 -0
- data/log/.gitkeep +0 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +5 -0
- data/script/rails +6 -0
- data/solr_conf/conf/schema.xml +273 -0
- data/solr_conf/conf/solrconfig.xml +167 -0
- data/solr_conf/solr.xml +35 -0
- data/spec/controllers/items_controller_spec.rb +56 -0
- data/spec/helpers/items_helper_spec.rb +8 -0
- data/spec/models/ability_spec.rb +24 -0
- data/spec/models/item_spec.rb +26 -0
- data/spec/spec_helper.rb +33 -0
- data/test/fixtures/.gitkeep +0 -0
- data/test/fixtures/users.yml +11 -0
- data/test/functional/.gitkeep +0 -0
- data/test/integration/.gitkeep +0 -0
- data/test/performance/browsing_test.rb +12 -0
- data/test/test_helper.rb +13 -0
- data/test/unit/.gitkeep +0 -0
- data/test/unit/user_test.rb +7 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +222 -0
data/app/models/user.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
class User < ActiveRecord::Base
|
2
|
+
# Connects this user object to Hydra behaviors.
|
3
|
+
include Hydra::User
|
4
|
+
# Connects this user object to Blacklights Bookmarks.
|
5
|
+
include Blacklight::User
|
6
|
+
# Include default devise modules. Others available are:
|
7
|
+
# :token_authenticatable, :confirmable,
|
8
|
+
# :lockable, :timeoutable and :omniauthable
|
9
|
+
devise :database_authenticatable, :registerable,
|
10
|
+
:recoverable, :rememberable, :trackable, :validatable
|
11
|
+
|
12
|
+
# Setup accessible (or protected) attributes for your model
|
13
|
+
attr_accessible :email, :password, :password_confirmation, :remember_me
|
14
|
+
# attr_accessible :title, :body
|
15
|
+
|
16
|
+
# Method added by Blacklight; Blacklight uses #to_s on your
|
17
|
+
# user class to get a user-displayable login/identifier for
|
18
|
+
# the account.
|
19
|
+
def to_s
|
20
|
+
email
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<%-
|
2
|
+
# Compare with render_document_functions_partial helper, and
|
3
|
+
# _document_functions partial. BL actually has two groups
|
4
|
+
# of document-related tools. "document functions" by default
|
5
|
+
# contains Bookmark functionality shown on both results and
|
6
|
+
# item view. While "document tools" contains external export type
|
7
|
+
# functions by default only on detail.
|
8
|
+
|
9
|
+
#Added Bootstrap class well and 'hidden-phone' for the tools-bar
|
10
|
+
-%>
|
11
|
+
<ul class="nav nav-list">
|
12
|
+
<li class="nav-header"><%= t('blacklight.tools.title') %></li>
|
13
|
+
<li>
|
14
|
+
<%= link_to "Edit Metadata", hydra_editor.edit_record_path(@document) %>
|
15
|
+
</li>
|
16
|
+
<li>
|
17
|
+
<%= link_to "Manage Datastreams", record_attachments_path(@document) %>
|
18
|
+
</li>
|
19
|
+
<% if @document.published? %>
|
20
|
+
<li class="disabled">
|
21
|
+
<%= link_to "Publish", '#' %>
|
22
|
+
</li>
|
23
|
+
<% else %>
|
24
|
+
<li>
|
25
|
+
<%= link_to "Publish", publish_record_path(@document), method: :post%>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
<li>
|
29
|
+
<%= link_to "View in Fedora", @document.preview_fedora_path%>
|
30
|
+
</li>
|
31
|
+
<% if @document.preview_dl_path.present? %>
|
32
|
+
<li>
|
33
|
+
<%= link_to "Preview in DL", @document.preview_dl_path%>
|
34
|
+
</li>
|
35
|
+
<% else %>
|
36
|
+
<li class="disabled">
|
37
|
+
<%= link_to "Preview in DL", '#' %>
|
38
|
+
</li>
|
39
|
+
<% end %>
|
40
|
+
<li>
|
41
|
+
<%= link_to "Purge", record_path(@document), method: :delete, confirm: "WARNING: this will permanently delete this object from all environments! Are you sure you want to Proceed?"%>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend confirmation instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Resend confirmation instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<div><%= f.label :password, "New password" %><br />
|
8
|
+
<%= f.password_field :password, :autofocus => true %></div>
|
9
|
+
|
10
|
+
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
11
|
+
<%= f.password_field :password_confirmation %></div>
|
12
|
+
|
13
|
+
<div><%= f.submit "Change my password" %></div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Forgot your password?</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Send me reset password instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
10
|
+
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
14
|
+
<%= f.password_field :password, :autocomplete => "off" %></div>
|
15
|
+
|
16
|
+
<div><%= f.label :password_confirmation %><br />
|
17
|
+
<%= f.password_field :password_confirmation %></div>
|
18
|
+
|
19
|
+
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
20
|
+
<%= f.password_field :current_password %></div>
|
21
|
+
|
22
|
+
<div><%= f.submit "Update" %></div>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<h3>Cancel my account</h3>
|
26
|
+
|
27
|
+
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
|
28
|
+
|
29
|
+
<%= link_to "Back", :back %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.label :password %><br />
|
10
|
+
<%= f.password_field :password %></div>
|
11
|
+
|
12
|
+
<div><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></div>
|
14
|
+
|
15
|
+
<div><%= f.submit "Sign up" %></div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h2>Sign in</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
4
|
+
<div><%= f.label :email %><br />
|
5
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
6
|
+
|
7
|
+
<div><%= f.label :password %><br />
|
8
|
+
<%= f.password_field :password %></div>
|
9
|
+
|
10
|
+
<% if devise_mapping.rememberable? -%>
|
11
|
+
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
12
|
+
<% end -%>
|
13
|
+
|
14
|
+
<div><%= f.submit "Sign in" %></div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Resend unlock instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<h1>Edit object level metadata</h1>
|
2
|
+
|
3
|
+
<%= form_for @item do |f| %>
|
4
|
+
<%= f.label :creator %>
|
5
|
+
<%= f.text_field :creator %>
|
6
|
+
<%= f.label :title %>
|
7
|
+
<%= f.text_field :title %>
|
8
|
+
<%= f.label :subject %>
|
9
|
+
<%= f.text_field :subject %>
|
10
|
+
<%= f.label :language %>
|
11
|
+
<%= f.text_field :language %>
|
12
|
+
etc...
|
13
|
+
|
14
|
+
<h1>Edit file level metadata</h1>
|
15
|
+
<table>
|
16
|
+
<tr><td></td><th>File name</th><th>Description</th></tr>
|
17
|
+
<tr><td>1</td><td><%= text_field_tag 'file[0][filename]' %></td><td><%= text_field_tag 'file[0][description]' %></td></tr>
|
18
|
+
<tr><td>2</td><td><%= text_field_tag 'file[1][filename]' %></td><td><%= text_field_tag 'file[1][description]' %></td></tr>
|
19
|
+
<tr><td>3</td><td><%= text_field_tag 'file[2][filename]' %></td><td><%= text_field_tag 'file[2][description]' %></td></tr>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<%= f.submit "Save and Continue", class: 'btn btn-primary' %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="main-header">
|
2
|
+
<h1>Describe Your Senior Thesis</h1>
|
3
|
+
|
4
|
+
<p>The more descriptive information you provide the better we can serve your needs.</p>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<%= form_for @item, url: mediated.items_path(), as: :item, html: {class: 'editor'} do |f| %>
|
8
|
+
<%= f.label :administrative_collection_id, "Collection" %>
|
9
|
+
<%= f.select :administrative_collection_id, available_collections %>
|
10
|
+
|
11
|
+
<% f.object.terms_for_editing.each do |term| %>
|
12
|
+
<%= render :partial => "records/edit_field", :locals => {:f =>f, :render_req => true, :key => term } %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<p>etc...</p>
|
16
|
+
|
17
|
+
<div class="actions">
|
18
|
+
<%= f.submit 'Next', class: 'btn btn-primary' %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>HydraMediated</title>
|
5
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="main-header">
|
2
|
+
<h1>What are you uploading?</h1>
|
3
|
+
|
4
|
+
<p>Before we can begin we need to know a little about what you're uploading.</p>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<ul class="resource-types">
|
8
|
+
<% Item.available_resource_types.each do |label, class_name| %>
|
9
|
+
<li><%= link_to label, mediated.new_item_path(resource_type: class_name) %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
|
13
|
+
|
data/config.ru
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# If using the solr:marc:index task, you can define environment-specific
|
2
|
+
# config files that will be used instead of 'config.properties' for
|
3
|
+
# a specific environment. config-development.properties,
|
4
|
+
# config-production.properties, etc.
|
5
|
+
|
6
|
+
# Relative paths for solrmarc.solr.war.path and solr.path are relative
|
7
|
+
# to the location of SolrMarc.jar, which for blacklight is by default
|
8
|
+
# in blacklight/config/solr_marc.
|
9
|
+
|
10
|
+
# solrmarc.solr.war.path - must point to either a war file for the version of
|
11
|
+
# Solr that you want to use, or to a directory of jar files extracted from a
|
12
|
+
# Solr war files. If this is not provided, SolrMarc can only work by
|
13
|
+
# communicating with a running Solr server.
|
14
|
+
#solrmarc.solr.war.path=../jetty/webapps/solr.war
|
15
|
+
# Path to your solr instance
|
16
|
+
#solr.path = ../jetty/solr
|
17
|
+
|
18
|
+
# Relative paths for solr.indexer can be relative to the location of
|
19
|
+
# this config.properties file.
|
20
|
+
solr.indexer = org.solrmarc.index.SolrIndexer
|
21
|
+
solr.indexer.properties = index.properties
|
22
|
+
|
23
|
+
# URL of running solr search engine to cause updates to be recognized.
|
24
|
+
# * When solr.path and solrmarc.solr.war.path are defined, this is optional,
|
25
|
+
# but if defined SolrMarc will issue a 'commit' after it's done indexing.
|
26
|
+
# * Alternately, do not define solr.path or solrmarc.solr.war.path to have
|
27
|
+
# SolrMarc use HTTP Post to add documents.
|
28
|
+
# NOTE:
|
29
|
+
# When using the solr:marc:index rake task, this value will be automatically
|
30
|
+
# looked up from your solr.yml, and the value here will NOT be used.
|
31
|
+
solr.hosturl = http://localhost:8888/solr/update
|
32
|
+
|
33
|
+
# MARC handling parameters
|
34
|
+
marc.to_utf_8 = true
|
35
|
+
marc.permissive = true
|
36
|
+
marc.default_encoding = MARC8
|
37
|
+
marc.include_errors = false
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# If using the solr:marc:index task, you can define environment-specific
|
2
|
+
# config files that will be used instead of 'config.properties' for
|
3
|
+
# a specific environment. config-development.properties,
|
4
|
+
# config-production.properties, etc.
|
5
|
+
|
6
|
+
# Relative paths for solrmarc.solr.war.path and solr.path are relative
|
7
|
+
# to the location of SolrMarc.jar, which for blacklight is by default
|
8
|
+
# in blacklight/config/solr_marc.
|
9
|
+
|
10
|
+
# solrmarc.solr.war.path - must point to either a war file for the version of
|
11
|
+
# Solr that you want to use, or to a directory of jar files extracted from a
|
12
|
+
# Solr war files. If this is not provided, SolrMarc can only work by
|
13
|
+
# communicating with a running Solr server.
|
14
|
+
# solrmarc.solr.war.path= ../../../../jetty/webapps/solr.war
|
15
|
+
# Path to your solr instance
|
16
|
+
# solr.path = ../../../../jetty/solr
|
17
|
+
|
18
|
+
# Relative paths for solr.indexer can be relative to the location of
|
19
|
+
# this config.properties file.
|
20
|
+
solr.indexer = org.solrmarc.index.SolrIndexer
|
21
|
+
solr.indexer.properties = index.properties
|
22
|
+
|
23
|
+
# URL of running solr search engine to cause updates to be recognized.
|
24
|
+
# * When solr.path and solrmarc.solr.war.path are defined, this is optional,
|
25
|
+
# but if defined SolrMarc will issue a 'commit' after it's done indexing.
|
26
|
+
# * Alternately, do not define solr.path or solrmarc.solr.war.path to have
|
27
|
+
# SolrMarc use HTTP Post to add documents.
|
28
|
+
# NOTE:
|
29
|
+
# When using the solr:marc:index rake task, this value will be automatically
|
30
|
+
# looked up from your solr.yml, and the value here will NOT be used.
|
31
|
+
solr.hosturl = http://localhost:8983/solr/update
|
32
|
+
|
33
|
+
# MARC handling parameters
|
34
|
+
marc.to_utf_8 = true
|
35
|
+
marc.permissive = true
|
36
|
+
marc.default_encoding = MARC8
|
37
|
+
marc.include_errors = false
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# for more information on solrmarc mappings,
|
2
|
+
# see http://code.google.com/p/solrmarc/w/list
|
3
|
+
#
|
4
|
+
# GenericBlacklight uses these conventions, mostly.
|
5
|
+
# _t for indexed fields (for searching)
|
6
|
+
# _display for stored fields (for display in UI)
|
7
|
+
# _facet for facet fields
|
8
|
+
# _sort for sorting fields (fields used to sort results)
|
9
|
+
#
|
10
|
+
# see jetty/solr/conf/schema.xml in Blacklight demo project
|
11
|
+
# see http://blacklight.rubyforge.org/ DEMO_README file
|
12
|
+
|
13
|
+
id = 001, first
|
14
|
+
marc_display = FullRecordAsXML
|
15
|
+
text = custom, getAllSearchableFields(100, 900)
|
16
|
+
|
17
|
+
language_facet = 008[35-37]:041a:041d, language_map.properties
|
18
|
+
# format is for facet, display, and selecting partial for display in show view
|
19
|
+
format = 007[0-1]:000[6-7]:000[6], (map.format), first
|
20
|
+
isbn_t = 020a, (pattern_map.isbn_clean)
|
21
|
+
material_type_display = custom, removeTrailingPunct(300aa)
|
22
|
+
|
23
|
+
# Title fields
|
24
|
+
# primary title
|
25
|
+
title_t = custom, getLinkedFieldCombined(245a)
|
26
|
+
title_display = custom, removeTrailingPunct(245a)
|
27
|
+
title_vern_display = custom, getLinkedField(245a)
|
28
|
+
# subtitle
|
29
|
+
subtitle_t = custom, getLinkedFieldCombined(245b)
|
30
|
+
subtitle_display = custom, removeTrailingPunct(245b)
|
31
|
+
subtitle_vern_display = custom, getLinkedField(245b)
|
32
|
+
# additional title fields
|
33
|
+
title_addl_t = custom, getLinkedFieldCombined(245abnps:130[a-z]:240[a-gk-s]:210ab:222ab:242abnp:243[a-gk-s]:246[a-gnp]:247[a-gnp])
|
34
|
+
title_added_entry_t = custom, getLinkedFieldCombined(700[gk-pr-t]:710[fgk-t]:711fgklnpst:730[a-gk-t]:740anp)
|
35
|
+
title_series_t = custom, getLinkedFieldCombined(440anpv:490av)
|
36
|
+
title_sort = custom, getSortableTitle
|
37
|
+
|
38
|
+
# Author fields
|
39
|
+
author_t = custom, getLinkedFieldCombined(100abcegqu:110abcdegnu:111acdegjnqu)
|
40
|
+
author_addl_t = custom, getLinkedFieldCombined(700abcegqu:710abcdegnu:711acdegjnqu)
|
41
|
+
author_display = custom, removeTrailingPunct(100abcdq:110[a-z]:111[a-z])
|
42
|
+
author_vern_display = custom, getLinkedField(100abcdq:110[a-z]:111[a-z])
|
43
|
+
author_sort = custom, getSortableAuthor
|
44
|
+
|
45
|
+
# Subject fields
|
46
|
+
subject_t = custom, getLinkedFieldCombined(600[a-u]:610[a-u]:611[a-u]:630[a-t]:650[a-e]:651ae:653aa:654[a-e]:655[a-c])
|
47
|
+
subject_addl_t = custom, getLinkedFieldCombined(600[v-z]:610[v-z]:611[v-z]:630[v-z]:650[v-z]:651[v-z]:654[v-z]:655[v-z])
|
48
|
+
subject_topic_facet = custom, removeTrailingPunct(600abcdq:610ab:611ab:630aa:650aa:653aa:654ab:655ab)
|
49
|
+
subject_era_facet = custom, removeTrailingPunct(650y:651y:654y:655y)
|
50
|
+
subject_geo_facet = custom, removeTrailingPunct(651a:650z)
|
51
|
+
|
52
|
+
# Publication fields
|
53
|
+
published_display = custom, removeTrailingPunct(260a)
|
54
|
+
published_vern_display = custom, getLinkedField(260a)
|
55
|
+
# used for facet and display, and copied for sort
|
56
|
+
pub_date = custom, getDate
|
57
|
+
|
58
|
+
# Call Number fields
|
59
|
+
lc_callnum_display = 050ab, first
|
60
|
+
lc_1letter_facet = 050a[0], callnumber_map.properties, first
|
61
|
+
lc_alpha_facet = 050a, (pattern_map.lc_alpha), first
|
62
|
+
lc_b4cutter_facet = 050a, first
|
63
|
+
|
64
|
+
# URL Fields
|
65
|
+
url_fulltext_display = custom, getFullTextUrls
|
66
|
+
url_suppl_display = custom, getSupplUrls
|
67
|
+
|
68
|
+
|
69
|
+
# MAPPINGS
|
70
|
+
|
71
|
+
# format mapping
|
72
|
+
# leader 06-07
|
73
|
+
map.format.aa = Book
|
74
|
+
map.format.ab = Serial
|
75
|
+
map.format.am = Book
|
76
|
+
map.format.as = Serial
|
77
|
+
map.format.ta = Book
|
78
|
+
map.format.tm = Book
|
79
|
+
# leader 06
|
80
|
+
map.format.c = Musical Score
|
81
|
+
map.format.d = Musical Score
|
82
|
+
map.format.e = Map or Globe
|
83
|
+
map.format.f = Map or Globe
|
84
|
+
map.format.i = Non-musical Recording
|
85
|
+
map.format.j = Musical Recording
|
86
|
+
map.format.k = Image
|
87
|
+
map.format.m = Computer File
|
88
|
+
# 007[0] when it doesn't clash with above
|
89
|
+
map.format.h = Microform
|
90
|
+
map.format.q = Musical Score
|
91
|
+
map.format.v = Video
|
92
|
+
# none of the above
|
93
|
+
map.format = Unknown
|
94
|
+
|
95
|
+
pattern_map.lc_alpha.pattern_0 = ^([A-Z]{1,3})\\d+.*=>$1
|
96
|
+
|
97
|
+
pattern_map.isbn_clean.pattern_0 = ([- 0-9]*[0-9]).*=>$1
|