enju_biblio 0.3.13 → 0.4.0.beta.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 +2 -3
- data/app/controllers/agents_controller.rb +6 -0
- data/app/controllers/content_types_controller.rb +1 -1
- data/app/controllers/items_controller.rb +10 -18
- data/app/controllers/manifestations_controller.rb +85 -80
- data/app/controllers/resource_import_results_controller.rb +2 -6
- data/app/controllers/series_statements_controller.rb +6 -0
- data/app/helpers/enju_biblio/application_helper.rb +5 -5
- data/app/helpers/manifestations_helper.rb +12 -12
- data/app/models/agent.rb +4 -13
- data/app/models/agent_import_file.rb +1 -1
- data/app/models/agent_relationship_type.rb +8 -7
- data/app/models/agent_type.rb +10 -7
- data/app/models/carrier_type.rb +14 -11
- data/app/models/content_type.rb +10 -7
- data/app/models/create_type.rb +8 -7
- data/app/models/doi_record.rb +36 -0
- data/app/models/form_of_work.rb +11 -8
- data/app/models/frequency.rb +11 -8
- data/app/models/identifier.rb +1 -1
- data/app/models/identifier_type.rb +1 -0
- data/app/models/import_request.rb +3 -4
- data/app/models/isbn_record.rb +51 -0
- data/app/models/isbn_record_and_manifestation.rb +18 -0
- data/app/models/issn_record.rb +49 -0
- data/app/models/issn_record_and_manifestation.rb +18 -0
- data/app/models/item.rb +7 -55
- data/app/models/language.rb +10 -9
- data/app/models/license.rb +9 -7
- data/app/models/manifestation.rb +271 -158
- data/app/models/manifestation_relationship_type.rb +9 -7
- data/app/models/medium_of_performance.rb +11 -8
- data/app/models/periodical.rb +33 -0
- data/app/models/periodical_and_manifestation.rb +16 -0
- data/app/models/picture_file.rb +2 -0
- data/app/models/produce_type.rb +8 -7
- data/app/models/realize_type.rb +8 -7
- data/app/models/resource_export_file.rb +8 -6
- data/app/models/resource_export_file_state_machine.rb +1 -1
- data/app/models/resource_import_file.rb +62 -153
- data/app/views/agent_import_results/index.txt.erb +3 -0
- data/app/views/agent_relationship_types/index.html.erb +1 -1
- data/app/views/agent_relationship_types/show.html.erb +1 -1
- data/app/views/agent_relationships/_form.html.erb +1 -1
- data/app/views/agent_types/index.html.erb +1 -1
- data/app/views/agent_types/show.html.erb +1 -1
- data/app/views/agents/_agent.html.erb +1 -1
- data/app/views/agents/_agent_list.html.erb +2 -2
- data/app/views/agents/_form.html.erb +4 -4
- data/app/views/agents/_index_agent.html.erb +1 -1
- data/app/views/agents/_index_agent_merge_list.html.erb +1 -1
- data/app/views/agents/_index_expression.html.erb +2 -2
- data/app/views/agents/_index_manifestation.html.erb +2 -2
- data/app/views/agents/_index_work.html.erb +2 -2
- data/app/views/agents/index.atom.builder +1 -1
- data/app/views/agents/index.rss.builder +3 -3
- data/app/views/agents/show.html+phone.erb +2 -2
- data/app/views/agents/show.html.erb +2 -2
- data/app/views/carrier_types/index.html.erb +2 -2
- data/app/views/carrier_types/show.html.erb +3 -3
- data/app/views/content_types/index.html.erb +1 -1
- data/app/views/content_types/show.html.erb +1 -1
- data/app/views/countries/index.html.erb +1 -1
- data/app/views/countries/show.html.erb +1 -1
- data/app/views/create_types/index.html.erb +1 -1
- data/app/views/create_types/show.html.erb +1 -1
- data/app/views/creates/_form.html.erb +1 -1
- data/app/views/form_of_works/index.html.erb +1 -1
- data/app/views/form_of_works/show.html.erb +1 -1
- data/app/views/frequencies/index.html.erb +1 -1
- data/app/views/frequencies/show.html.erb +1 -1
- data/app/views/identifier_types/index.html.erb +1 -1
- data/app/views/identifier_types/show.html.erb +1 -1
- data/app/views/items/_form.html.erb +13 -33
- data/app/views/items/index.html+phone.erb +3 -3
- data/app/views/items/index.html.erb +3 -3
- data/app/views/items/show.html+phone.erb +5 -5
- data/app/views/items/show.html.erb +119 -134
- data/app/views/languages/index.html.erb +1 -1
- data/app/views/languages/show.html.erb +1 -1
- data/app/views/layouts/agents.html.erb +2 -2
- data/app/views/layouts/items.html.erb +1 -1
- data/app/views/layouts/manifestations.html.erb +4 -4
- data/app/views/licenses/index.html.erb +1 -1
- data/app/views/licenses/show.html.erb +1 -1
- data/app/views/manifestation_relationship_types/index.html.erb +1 -1
- data/app/views/manifestation_relationship_types/show.html.erb +1 -1
- data/app/views/manifestation_relationships/_form.html.erb +1 -1
- data/app/views/manifestations/_call_number.html.erb +3 -3
- data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
- data/app/views/manifestations/_classification_facet.html.erb +2 -2
- data/app/views/manifestations/_export_detail.html.erb +0 -1
- data/app/views/manifestations/_export_list.html.erb +3 -4
- data/app/views/manifestations/_form.html.erb +8 -31
- data/app/views/manifestations/_identifier_fields.html.erb +1 -1
- data/app/views/manifestations/_language_facet.html.erb +1 -1
- data/app/views/manifestations/_library_facet.html.erb +1 -1
- data/app/views/manifestations/_manifestation.txt.erb +1 -1
- data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
- data/app/views/manifestations/_reservable_facet.html.erb +2 -2
- data/app/views/manifestations/_show_creators.html.erb +1 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +13 -37
- data/app/views/manifestations/_show_detail_user.html.erb +13 -25
- data/app/views/manifestations/_show_holding.html+phone.erb +3 -3
- data/app/views/manifestations/_show_holding.html.erb +2 -2
- data/app/views/manifestations/explain.sru +9 -0
- data/app/views/manifestations/index.atom.builder +1 -1
- data/app/views/manifestations/index.html.erb +7 -7
- data/app/views/manifestations/index.opds.builder +1 -1
- data/app/views/manifestations/index.rdf.builder +3 -3
- data/app/views/manifestations/index.rss.builder +3 -3
- data/app/views/manifestations/index.sru.builder +101 -0
- data/app/views/manifestations/index.txt.erb +1 -0
- data/app/views/manifestations/show.txt.erb +1 -0
- data/app/views/medium_of_performances/index.html.erb +1 -1
- data/app/views/medium_of_performances/show.html.erb +1 -1
- data/app/views/notifier/manifestation_info.en.text.erb +1 -1
- data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
- data/app/views/picture_files/edit.html.erb +0 -4
- data/app/views/produce_types/index.html.erb +1 -1
- data/app/views/produce_types/show.html.erb +1 -1
- data/app/views/produces/_form.html.erb +1 -1
- data/app/views/realize_types/index.html.erb +1 -1
- data/app/views/realize_types/show.html.erb +1 -1
- data/app/views/realizes/_form.html.erb +1 -1
- data/app/views/resource_import_files/_results.html.erb +0 -6
- data/app/views/resource_import_files/new.html.erb +2 -2
- data/app/views/resource_import_results/index.html.erb +11 -0
- data/app/views/resource_import_results/index.txt.erb +3 -0
- data/app/views/series_statements/_form.html.erb +8 -6
- data/app/views/series_statements/show.html.erb +0 -12
- data/config/locales/translation_en.yml +1 -28
- data/config/locales/translation_ja.yml +3 -30
- data/config/routes.rb +0 -2
- data/db/migrate/20081027150907_create_picture_files.rb +2 -0
- data/db/migrate/20160319144230_create_issn_records.rb +11 -0
- data/db/migrate/20160506144040_create_isbn_records.rb +11 -0
- data/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
- data/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
- data/db/migrate/20190102034126_create_doi_records.rb +13 -0
- data/db/migrate/20190311154610_create_periodicals.rb +10 -0
- data/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
- data/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
- data/lib/enju_biblio/openurl.rb +1 -5
- data/lib/enju_biblio/porta_cql.rb +282 -0
- data/lib/enju_biblio/sru.rb +83 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/enju_biblio.rb +2 -0
- data/lib/generators/enju_biblio/setup/setup_generator.rb +0 -2
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_relationship_types.yml +3 -3
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_types.yml +2 -4
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/carrier_types.yml +8 -26
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +12 -24
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/create_types.yml +4 -22
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/form_of_works.yml +1 -1
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/frequencies.yml +9 -18
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/languages.yml +2 -4
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/licenses.yml +2 -2
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/manifestation_relationship_types.yml +2 -4
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/medium_of_performances.yml +15 -0
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/produce_types.yml +2 -19
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/realize_types.yml +3 -21
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/assigns_a_newly_created_import_request_as_import_request.yml +121 -0
- data/spec/controllers/content_types_controller_spec.rb +1 -1
- data/spec/controllers/items_controller_spec.rb +1 -59
- data/spec/controllers/manifestations_controller_spec.rb +19 -49
- data/spec/dummy/app/helpers/application_helper.rb +1 -1
- data/spec/dummy/app/models/user.rb +4 -0
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/setup +1 -3
- data/spec/dummy/bin/update +4 -2
- data/spec/dummy/bin/yarn +3 -3
- data/spec/dummy/config/application.rb +1 -2
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/config/initializers/assets.rb +2 -2
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +1 -0
- data/spec/dummy/db/migrate/113_create_events.rb +2 -4
- data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +1 -0
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
- data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
- data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160815045420_add_most_recent_to_bookmark_stat_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20170116150432_create_jpno_records.rb +10 -0
- data/spec/dummy/db/migrate/20171126072934_create_ndla_records.rb +10 -0
- data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107172413_add_constraints_to_most_recent_for_bookmark_stat_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180709023035_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
- data/spec/dummy/db/migrate/20180709023036_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
- data/spec/dummy/db/migrate/20180709023037_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
- data/spec/dummy/db/migrate/20180709023038_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
- data/spec/dummy/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
- data/spec/dummy/db/migrate/20180709023040_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
- data/spec/dummy/db/migrate/20180709161346_add_created_at_to_tag.rb +6 -0
- data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
- data/spec/dummy/db/migrate/20190501043418_create_ndl_bib_id_records.rb +10 -0
- data/spec/dummy/db/migrate/20190508160525_create_retains.rb +10 -0
- data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
- data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
- data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
- data/spec/dummy/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
- data/spec/dummy/db/schema.rb +335 -221
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/create_types.rb +8 -7
- data/spec/factories/produce_types.rb +8 -7
- data/spec/factories/realize_types.rb +8 -7
- data/spec/factories/series_statement.rb +3 -4
- data/spec/fixtures/agent_relationship_types.yml +8 -7
- data/spec/fixtures/agent_types.yml +11 -10
- data/spec/fixtures/carrier_types.yml +16 -15
- data/spec/fixtures/content_types.yml +20 -31
- data/spec/fixtures/create_types.yml +12 -15
- data/spec/fixtures/creates.yml +0 -2
- data/spec/fixtures/form_of_works.yml +11 -10
- data/spec/fixtures/frequencies.yml +17 -25
- data/spec/fixtures/items.yml +11 -12
- data/spec/fixtures/languages.yml +11 -11
- data/spec/fixtures/libraries.yml +30 -30
- data/spec/fixtures/library_groups.yml +11 -6
- data/spec/fixtures/licenses.yml +8 -7
- data/spec/fixtures/manifestation_relationship_types.yml +12 -11
- data/spec/fixtures/manifestations.yml +0 -1
- data/spec/fixtures/medium_of_performances.yml +10 -9
- data/spec/fixtures/picture_files.yml +2 -0
- data/spec/fixtures/produce_types.yml +10 -11
- data/spec/fixtures/produces.yml +0 -2
- data/spec/fixtures/profiles.yml +8 -5
- data/spec/fixtures/realize_types.yml +11 -13
- data/spec/fixtures/realizes.yml +0 -2
- data/spec/fixtures/request_status_types.yml +14 -14
- data/spec/fixtures/request_types.yml +13 -13
- data/spec/fixtures/resource_export_files.yml +1 -1
- data/spec/fixtures/resource_import_results.yml +2 -2
- data/spec/fixtures/roles.yml +22 -5
- data/spec/fixtures/shelves.yml +16 -16
- data/spec/fixtures/user_groups.yml +12 -12
- data/spec/fixtures/user_has_roles.yml +3 -4
- data/spec/fixtures/users.yml +0 -3
- data/spec/models/agent_relationship_type_spec.rb +8 -7
- data/spec/models/agent_type_spec.rb +8 -7
- data/spec/models/carrier_type_spec.rb +12 -11
- data/spec/models/content_type_spec.rb +8 -7
- data/spec/models/create_type_spec.rb +8 -7
- data/spec/models/doi_record_spec.rb +19 -0
- data/spec/models/form_of_work_spec.rb +8 -7
- data/spec/models/frequency_spec.rb +8 -7
- data/spec/models/item_spec.rb +0 -7
- data/spec/models/language_spec.rb +10 -9
- data/spec/models/license_spec.rb +8 -7
- data/spec/models/manifestation_relationship_type_spec.rb +8 -7
- data/spec/models/manifestation_spec.rb +81 -24
- data/spec/models/medium_of_performance_spec.rb +8 -7
- data/spec/models/periodical_and_manifestation_spec.rb +17 -0
- data/spec/models/periodical_spec.rb +16 -0
- data/spec/models/picture_file_spec.rb +2 -0
- data/spec/models/produce_type_spec.rb +8 -7
- data/spec/models/realize_type_spec.rb +8 -7
- data/spec/models/resource_export_file_spec.rb +9 -62
- data/spec/models/resource_import_file_spec.rb +14 -44
- data/spec/rails_helper.rb +8 -4
- data/spec/system/manifestations_spec.rb +0 -30
- data/spec/views/items/index.html.erb_spec.rb +6 -7
- data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
- data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -0
- data/spec/views/manifestations/{index.txt.ruby_spec.rb → index.txt.erb_spec.rb} +1 -1
- data/spec/views/manifestations/{show.txt.ruby_spec.rb → show.txt.erb_spec.rb} +2 -2
- data/spec/views/resource_import_results/show.html.erb_spec.rb +1 -1
- metadata +560 -718
- data/app/controllers/item_custom_properties_controller.rb +0 -69
- data/app/controllers/manifestation_custom_properties_controller.rb +0 -69
- data/app/models/item_custom_property.rb +0 -18
- data/app/models/item_custom_value.rb +0 -17
- data/app/models/manifestation_custom_property.rb +0 -18
- data/app/models/manifestation_custom_value.rb +0 -17
- data/app/policies/item_custom_property_policy.rb +0 -21
- data/app/policies/manifestation_custom_property_policy.rb +0 -21
- data/app/views/agent_import_results/index.txt.ruby +0 -5
- data/app/views/item_custom_properties/_form.html.erb +0 -32
- data/app/views/item_custom_properties/edit.html.erb +0 -13
- data/app/views/item_custom_properties/index.html.erb +0 -43
- data/app/views/item_custom_properties/new.html.erb +0 -12
- data/app/views/item_custom_properties/show.html.erb +0 -28
- data/app/views/items/_item.json.jbuilder +0 -17
- data/app/views/items/index.json.jbuilder +0 -5
- data/app/views/items/show.json.jbuilder +0 -1
- data/app/views/manifestation_custom_properties/_form.html.erb +0 -32
- data/app/views/manifestation_custom_properties/edit.html.erb +0 -13
- data/app/views/manifestation_custom_properties/index.html.erb +0 -43
- data/app/views/manifestation_custom_properties/new.html.erb +0 -12
- data/app/views/manifestation_custom_properties/show.html.erb +0 -28
- data/app/views/manifestations/index.txt.ruby +0 -7
- data/app/views/manifestations/show.json.jbuilder +0 -2
- data/app/views/manifestations/show.txt.ruby +0 -5
- data/app/views/resource_import_results/index.txt.ruby +0 -5
- data/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
- data/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
- data/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
- data/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
- data/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
- data/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/agents.yml +0 -19
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_import_custom_values.yml +0 -121
- data/spec/cassette_library/resource_import_results/index_txt_ruby/renders_a_list_of_resource_import_results.yml +0 -121
- data/spec/controllers/item_custom_properties_controller_spec.rb +0 -449
- data/spec/controllers/manifestation_custom_properties_controller_spec.rb +0 -449
- data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +0 -18
- data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +0 -17
- data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +0 -15
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +0 -30
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
- data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +0 -5
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
- data/spec/factories/item_custom_property.rb +0 -6
- data/spec/factories/item_custom_value.rb +0 -6
- data/spec/factories/manifestation_custom_property.rb +0 -6
- data/spec/factories/manifestation_custom_value.rb +0 -6
- data/spec/fixtures/carrier_type_has_checkout_types.yml +0 -31
- data/spec/fixtures/checkout_stat_has_manifestations.yml +0 -24
- data/spec/fixtures/checkout_stat_has_users.yml +0 -24
- data/spec/fixtures/checkout_types.yml +0 -34
- data/spec/fixtures/circulation_statuses.yml +0 -136
- data/spec/fixtures/inventory_files.yml +0 -40
- data/spec/fixtures/item_custom_properties.yml +0 -24
- data/spec/fixtures/manifestation_checkout_stats.yml +0 -29
- data/spec/fixtures/manifestation_custom_properties.yml +0 -24
- data/spec/fixtures/manifestation_reserve_stats.yml +0 -29
- data/spec/fixtures/reserve_stat_has_manifestations.yml +0 -24
- data/spec/fixtures/reserve_stat_has_users.yml +0 -24
- data/spec/fixtures/reserve_transitions.yml +0 -104
- data/spec/fixtures/reserves.yml +0 -143
- data/spec/fixtures/use_restrictions.yml +0 -93
- data/spec/fixtures/user_checkout_stats.yml +0 -28
- data/spec/fixtures/user_group_has_checkout_types.yml +0 -111
- data/spec/fixtures/user_reserve_stats.yml +0 -28
- data/spec/models/item_custom_property_spec.rb +0 -18
- data/spec/models/item_custom_value_spec.rb +0 -17
- data/spec/models/manifestation_custom_property_spec.rb +0 -18
- data/spec/models/manifestation_custom_value_spec.rb +0 -17
- data/spec/requests/item_custom_properties_spec.rb +0 -129
- data/spec/requests/manifestation_custom_properties_spec.rb +0 -129
- data/spec/routing/item_custom_properties_routing_spec.rb +0 -38
- data/spec/routing/manifestation_custom_properties_routing_spec.rb +0 -38
- data/spec/system/items_spec.rb +0 -121
- data/spec/system/series_statements_spec.rb +0 -16
- data/spec/views/agent_import_results/index.html.erb_spec.rb +0 -29
- data/spec/views/agent_import_results/index.txt.ruby_spec.rb +0 -20
- data/spec/views/agent_import_results/show.html.erb_spec.rb +0 -24
- data/spec/views/item_custom_properties/edit.html.erb_spec.rb +0 -21
- data/spec/views/item_custom_properties/index.html.erb_spec.rb +0 -25
- data/spec/views/item_custom_properties/new.html.erb_spec.rb +0 -21
- data/spec/views/item_custom_properties/show.html.erb_spec.rb +0 -16
- data/spec/views/items/index.json.jbuilder_spec.rb +0 -15
- data/spec/views/items/show.json.jbuilder_spec.rb +0 -15
- data/spec/views/manifestation_custom_properties/edit.html.erb_spec.rb +0 -21
- data/spec/views/manifestation_custom_properties/index.html.erb_spec.rb +0 -25
- data/spec/views/manifestation_custom_properties/new.html.erb_spec.rb +0 -21
- data/spec/views/manifestation_custom_properties/show.html.erb_spec.rb +0 -16
- data/spec/views/manifestations/show.json.jbuilder_spec.rb +0 -16
- data/spec/views/resource_import_results/index.txt.ruby_spec.rb +0 -22
@@ -0,0 +1,282 @@
|
|
1
|
+
require 'strscan'
|
2
|
+
|
3
|
+
class QueryError < RuntimeError; end
|
4
|
+
class QuerySyntaxError < QueryError; end
|
5
|
+
|
6
|
+
class Cql
|
7
|
+
def initialize(line)
|
8
|
+
@logic = nil
|
9
|
+
@query = split_clause_text(line).collect{|txt| Clause.new(txt)}
|
10
|
+
|
11
|
+
from_day, @query = extract_with_index(@query, /from/io)
|
12
|
+
@from = comp_date(from_day)
|
13
|
+
until_day, @query = extract_with_index(@query, /until/io)
|
14
|
+
@until = comp_date(until_day)
|
15
|
+
sort_by, @query = extract_with_index(@query, /sortBy/io)
|
16
|
+
@sort_by = sort_by ? sort_by.terms.first : ''
|
17
|
+
end
|
18
|
+
|
19
|
+
attr_reader :query, :from, :until, :sort_by, :logic
|
20
|
+
|
21
|
+
def ==(other)
|
22
|
+
instance_variables.all? do |val|
|
23
|
+
instance_variable_get(val) == other.instance_variable_get(val)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_sunspot
|
28
|
+
(@query.collect{|c| c.to_sunspot} + date_range(@from, @until)).join(" #{@logic} ")
|
29
|
+
end
|
30
|
+
|
31
|
+
def split_clause_text(line)
|
32
|
+
clauses = []
|
33
|
+
|
34
|
+
s = StringScanner.new(line)
|
35
|
+
text = ''
|
36
|
+
while s.rest?
|
37
|
+
case
|
38
|
+
when s.scan(/\s+/)
|
39
|
+
text << s.matched
|
40
|
+
when s.scan(/"(?:[^"\\]|\\.)*"/)
|
41
|
+
text << s.matched
|
42
|
+
when s.scan(/(AND|OR)/i)
|
43
|
+
logic = s.matched.upcase
|
44
|
+
if @logic
|
45
|
+
raise QuerySyntaxError unless @logic == logic
|
46
|
+
else
|
47
|
+
@logic = logic
|
48
|
+
end
|
49
|
+
clauses << text.strip
|
50
|
+
text = ''
|
51
|
+
when s.scan(/\S*/)
|
52
|
+
text << s.matched
|
53
|
+
end
|
54
|
+
end
|
55
|
+
clauses << text.strip
|
56
|
+
clauses.collect{|txt| txt.gsub(/(\A\(|\)\Z)/, '')}
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
def extract_with_index(arr, reg)
|
61
|
+
element, rest = arr.partition{|c| reg =~ c.index }
|
62
|
+
[element.last, rest]
|
63
|
+
end
|
64
|
+
|
65
|
+
def date_range(from_date, until_date)
|
66
|
+
unless from_date == '*' and until_date == '*'
|
67
|
+
["pub_date_dm:[#{from_date} TO #{until_date}]"]
|
68
|
+
else
|
69
|
+
[]
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def comp_date(date)
|
74
|
+
if date
|
75
|
+
text = date.terms[0]
|
76
|
+
date_text = case text
|
77
|
+
when /\A\d{4}-\d{2}-\d{2}\Z/
|
78
|
+
text
|
79
|
+
when /\A\d{4}-\d{2}\Z/
|
80
|
+
(text + '-01')
|
81
|
+
when /\A\d{4}\Z/
|
82
|
+
(text + '-01-01')
|
83
|
+
else
|
84
|
+
raise QuerySyntaxError, text.to_s
|
85
|
+
end
|
86
|
+
begin
|
87
|
+
Time.zone.parse(date_text).utc.iso8601.to_s
|
88
|
+
rescue
|
89
|
+
raise QuerySyntaxError, date.to_s
|
90
|
+
end
|
91
|
+
else
|
92
|
+
'*'
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
class ScannerError < QuerySyntaxError; end
|
98
|
+
class AdapterError < QuerySyntaxError; end
|
99
|
+
|
100
|
+
class Clause
|
101
|
+
INDEX = /(dpid|dpgroupid|title|creator|publisher|ndc|description|subject|isbn|issn|jpno|from|until|anywhere|porta_type|digitalize_type|webget_type|payment_type|ndl_agent_type|ndlc|itemno)/io
|
102
|
+
SORT_BY = /sortBy/io
|
103
|
+
RELATION = /(=|exact|\^|any|all)/io
|
104
|
+
|
105
|
+
MATCH_ALL = %w[title creator publisher]
|
106
|
+
MATCH_EXACT = %w[dpid dpgroupid isbn issn jpno porta_type digitalize_type webget_type payment_type ndl_agent_type itemno]
|
107
|
+
MATCH_PART = %w[description subject]
|
108
|
+
MATCH_AHEAD = %w[ndc ndlc]
|
109
|
+
MATCH_DATE = %w[from until]
|
110
|
+
MATCH_ANYWHERE = %w[anywhere]
|
111
|
+
LOGIC_ALL = %w[title creator publisher description subject anywhere]
|
112
|
+
LOGIC_ANY = %w[dpid ndl_agent_type]
|
113
|
+
LOGIC_EQUAL = %w[dpgroupid ndc isbn issn jpno from until porta_type digitalize_type webget_type payment_type ndlc itemno]
|
114
|
+
MULTIPLE = %w[dpid title creator publisher description subject anywhere ndl_agent_type]
|
115
|
+
|
116
|
+
def initialize(text)
|
117
|
+
unless text.empty?
|
118
|
+
@index, @relation, @terms = scan(text)
|
119
|
+
porta_adapter
|
120
|
+
@field = @index
|
121
|
+
else
|
122
|
+
@index = ''
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
attr_reader :index, :relation, :terms
|
127
|
+
|
128
|
+
def ==(other)
|
129
|
+
instance_variables.all? do |val|
|
130
|
+
instance_variable_get(val) == other.instance_variable_get(val)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def scan(text)
|
135
|
+
ss = StringScanner.new(text)
|
136
|
+
index = ''
|
137
|
+
relation = ''
|
138
|
+
terms = []
|
139
|
+
|
140
|
+
if ss.scan(INDEX) or ss.scan(SORT_BY)
|
141
|
+
index = ss[0]
|
142
|
+
end
|
143
|
+
# else
|
144
|
+
# raise ScannerError, "index or the sortBy is requested in '#{text}'"
|
145
|
+
# end
|
146
|
+
ss.scan(/\s+/)
|
147
|
+
if ss.scan(RELATION)
|
148
|
+
relation = ss[0].upcase
|
149
|
+
end
|
150
|
+
# else
|
151
|
+
# raise ScannerError, "relation is requested in '#{text}'"
|
152
|
+
# end
|
153
|
+
ss.scan(/\s+/)
|
154
|
+
if ss.scan(/.+/)
|
155
|
+
terms = ss[0].gsub(/(\A\"|\"\Z)/, '').split
|
156
|
+
else
|
157
|
+
raise ScannerError, "search term(s) is requested in '#{text}'"
|
158
|
+
end
|
159
|
+
|
160
|
+
[index, relation, terms]
|
161
|
+
end
|
162
|
+
|
163
|
+
def porta_adapter
|
164
|
+
logic_adapter
|
165
|
+
multiple_adapter
|
166
|
+
end
|
167
|
+
|
168
|
+
def logic_adapter
|
169
|
+
case
|
170
|
+
when LOGIC_ALL.include?(@index)
|
171
|
+
raise AdapterError unless %w[ALL ANY = EXACT ^].include?(@relation)
|
172
|
+
when LOGIC_ANY.include?(@index)
|
173
|
+
raise AdapterError unless %w[ANY =].include?(@relation)
|
174
|
+
when LOGIC_EQUAL.include?(@index)
|
175
|
+
raise AdapterError unless %w[=].include?(@relation)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
def multiple_adapter
|
180
|
+
unless MULTIPLE.include?(@index)
|
181
|
+
raise AdapterError if @terms.size > 1
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def to_sunspot
|
186
|
+
case
|
187
|
+
when MATCH_ALL.include?(@index)
|
188
|
+
to_sunspot_match_all
|
189
|
+
when MATCH_EXACT.include?(@index)
|
190
|
+
to_sunspot_match_exact
|
191
|
+
when MATCH_PART.include?(@index)
|
192
|
+
to_sunspot_match_part
|
193
|
+
when MATCH_AHEAD.include?(@index)
|
194
|
+
to_sunspot_match_ahead
|
195
|
+
when MATCH_ANYWHERE.include?(@index)
|
196
|
+
to_sunspot_match_anywhere
|
197
|
+
when @index.empty?
|
198
|
+
@terms.join(' ')
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
def to_sunspot_match_all
|
203
|
+
term = @terms.join(' ')
|
204
|
+
case @relation
|
205
|
+
when /\A=\Z/
|
206
|
+
unless /\A\^(.+)/ =~ term
|
207
|
+
"%s_%s:(%s)" % [@field, :text, term]
|
208
|
+
else
|
209
|
+
ahead_tarm = $1.gsub("\s", '').downcase
|
210
|
+
"connect_%s_%s:(%s*)" % [@field, :s, ahead_tarm]
|
211
|
+
end
|
212
|
+
when /\AEXACT\Z/
|
213
|
+
"%s_%s:(%s)" % [@field, :sm, term.gsub(' ', '')]
|
214
|
+
when /\AANY\Z/
|
215
|
+
"%s_%s:(%s)" % [@field, :text, multiple_to_sunspot(@terms, :any)]
|
216
|
+
when /\AALL\Z/
|
217
|
+
"%s_%s:(%s)" % [@field, :text, multiple_to_sunspot(@terms, :all)]
|
218
|
+
else
|
219
|
+
raise QuerySyntaxError
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
def to_sunspot_match_exact
|
224
|
+
case @relation
|
225
|
+
when /\A=\Z/
|
226
|
+
term = @terms.join(' ')
|
227
|
+
type = @field != 'issn' ? :sm : :s
|
228
|
+
"%s_%s:(%s)" % [@field, type, term]
|
229
|
+
when /\AANY\Z/
|
230
|
+
"%s_%s:(%s)" % [@field, :sm, multiple_to_sunspot(@terms, :any)]
|
231
|
+
else
|
232
|
+
raise QuerySyntaxError
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
def to_sunspot_match_part
|
237
|
+
case @relation
|
238
|
+
when /\A=\Z/
|
239
|
+
term = @terms.join(' ')
|
240
|
+
"%s_%s:(%s)" % [@field, :text, trim_ahead(term)]
|
241
|
+
when /\AANY\Z/
|
242
|
+
"%s_%s:(%s)" % [@field, :text, multiple_to_sunspot(@terms, :any)]
|
243
|
+
when /\AALL\Z/
|
244
|
+
"%s_%s:(%s)" % [@field, :text, multiple_to_sunspot(@terms, :all)]
|
245
|
+
else
|
246
|
+
raise QuerySyntaxError
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
def to_sunspot_match_ahead
|
251
|
+
"%s_%s:(%s*)" % [@field, :s, @terms.first]
|
252
|
+
end
|
253
|
+
|
254
|
+
def to_sunspot_match_anywhere
|
255
|
+
case @relation
|
256
|
+
when /\A=\Z/
|
257
|
+
term = @terms.join(' ')
|
258
|
+
"(%s)" % [trim_ahead(term)]
|
259
|
+
when /\AANY\Z/
|
260
|
+
"(%s)" % [multiple_to_sunspot(@terms, :any)]
|
261
|
+
when /\AALL\Z/
|
262
|
+
"(%s)" % [multiple_to_sunspot(@terms, :all)]
|
263
|
+
else
|
264
|
+
raise QuerySyntaxError
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
|
269
|
+
private
|
270
|
+
def multiple_to_sunspot(terms, relation)
|
271
|
+
boolean = relation == :any ? ' OR ' : ' AND '
|
272
|
+
(terms.map{|t| trim_ahead(t)}.join(boolean)).to_s
|
273
|
+
end
|
274
|
+
|
275
|
+
def trim_ahead(term)
|
276
|
+
term.sub(/\A\^+/,'')
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
if $PROGRAM_NAME == __FILE__
|
281
|
+
require 'porta_cql_test'
|
282
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'enju_biblio/porta_cql'
|
2
|
+
|
3
|
+
class QueryArgumentError < QueryError; end
|
4
|
+
|
5
|
+
class Sru
|
6
|
+
ASC_KEYS = %w(title creator) unless Object.const_defined?(:ASC_KEYS)
|
7
|
+
DESC_KEYS = %w(created_at updated_at date_of_publication) unless Object.const_defined?(:DESC_KEYS)
|
8
|
+
SORT_KEYS = ASC_KEYS + DESC_KEYS unless Object.const_defined?(:SORY_KEYS)
|
9
|
+
MULTI_KEY_MAP = {'title' => 'sort_title'} unless Object.const_defined?(:MULTI_KEY_MAP)
|
10
|
+
def initialize(params)
|
11
|
+
raise QueryArgumentError, 'sru :query is required item.' unless params.key?(:query)
|
12
|
+
|
13
|
+
@cql = Cql.new(params[:query])
|
14
|
+
@version = params.key?(:version) ? params[:version] : '1.2'
|
15
|
+
@start = params.key?(:startRecord) ? params[:startRecord].to_i : 1
|
16
|
+
@maximum = params.key?(:maximumRecords) ? params[:maximumRecords].to_i : 200
|
17
|
+
@maximum = 1000 if 1000 < @maximum
|
18
|
+
@packing = params.key?(:recordPacking) ? params[:recordPacking] : 'string'
|
19
|
+
@schema = params.key?(:recordSchema) ? params[:recordSchema] : 'dc'
|
20
|
+
@sort_key = params[:sortKeys]
|
21
|
+
|
22
|
+
@manifestations = []
|
23
|
+
@extra_response_data = {}
|
24
|
+
end
|
25
|
+
|
26
|
+
attr_reader :version, :cql, :start, :maximum, :packing, :schema, :path, :ascending
|
27
|
+
attr_reader :manifestations, :extra_response_data, :number_of_records, :next_record_position
|
28
|
+
|
29
|
+
def sort_by
|
30
|
+
sort = {sort_by: 'created_at', order: 'desc'}
|
31
|
+
unless '1.1' == @version
|
32
|
+
@path, @ascending = @cql.sort_by.split('/')
|
33
|
+
else
|
34
|
+
@path, @ascending = @sort_key.split(',') if @sort_key
|
35
|
+
end
|
36
|
+
# TODO ソート基準が入手しやすさの場合の処理
|
37
|
+
if SORT_KEYS.include?(@path)
|
38
|
+
if MULTI_KEY_MAP.keys.include?(@path)
|
39
|
+
sort[:sort_by] = MULTI_KEY_MAP[@path]
|
40
|
+
else
|
41
|
+
sort[:sort_by] = @path
|
42
|
+
end
|
43
|
+
sort[:order] = 'asc' if ASC_KEYS.include?(@path)
|
44
|
+
case @ascending
|
45
|
+
when /\A(1|ascending)\Z/
|
46
|
+
sort[:order] = 'asc'
|
47
|
+
when /\A(0|descending)\Z/
|
48
|
+
sort[:order] = 'desc'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
sort
|
52
|
+
end
|
53
|
+
|
54
|
+
def search
|
55
|
+
sunspot_query = @cql.to_sunspot
|
56
|
+
search = Sunspot.new_search(Manifestation)
|
57
|
+
search.build do
|
58
|
+
fulltext sunspot_query
|
59
|
+
paginate page: 1, per_page: 10000
|
60
|
+
end
|
61
|
+
@manifestations = search.execute!.results
|
62
|
+
@extra_response_data = get_extra_response_data
|
63
|
+
@number_of_records, @next_record_position = get_number_of_records
|
64
|
+
|
65
|
+
@manifestations
|
66
|
+
end
|
67
|
+
|
68
|
+
def get_extra_response_data
|
69
|
+
# TODO: NDL で必要な項目が決定し、更に enju にそのフィールドが設けられた後で正式な実装を行なう。
|
70
|
+
if @search.respond_to?(:erd)
|
71
|
+
@schema == 'dc' ? @search.erd : {}
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def get_number_of_records
|
76
|
+
# TODO: sunspot での取得方法が分かり次第、正式な実装を行なう。
|
77
|
+
@schema == 'dc' ? [1405, 1406] : [40,11]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
if $PROGRAM_NAME == __FILE__
|
82
|
+
require 'sru_test'
|
83
|
+
end
|
data/lib/enju_biblio/version.rb
CHANGED
data/lib/enju_biblio.rb
CHANGED
@@ -5,8 +5,6 @@ class EnjuBiblio::SetupGenerator < Rails::Generators::Base
|
|
5
5
|
def copy_setup_files
|
6
6
|
directory("db/fixtures", "db/fixtures/enju_biblio")
|
7
7
|
return if file == 'fixture'
|
8
|
-
inject_into_class 'app/controllers/application_controller.rb', ApplicationController,
|
9
|
-
" include EnjuBiblio::Controller\n"
|
10
8
|
append_to_file("config/schedule.rb", File.open(File.expand_path('../templates', __FILE__) + '/config/schedule.rb').read)
|
11
9
|
end
|
12
10
|
end
|
@@ -3,18 +3,18 @@
|
|
3
3
|
agent_relationship_type_00001:
|
4
4
|
id: 1
|
5
5
|
name: see_also
|
6
|
-
|
6
|
+
display_name_translations: {"en": "See also"}
|
7
7
|
note:
|
8
8
|
position: 1
|
9
9
|
agent_relationship_type_00002:
|
10
10
|
id: 2
|
11
11
|
name: member
|
12
|
-
|
12
|
+
display_name_translations: {"en": "Member"}
|
13
13
|
note:
|
14
14
|
position: 2
|
15
15
|
agent_relationship_type_00003:
|
16
16
|
id: 3
|
17
17
|
name: child
|
18
|
-
|
18
|
+
display_name_translations: {"en": "Child"}
|
19
19
|
note:
|
20
20
|
position: 3
|
@@ -2,15 +2,13 @@
|
|
2
2
|
agent_type_00001:
|
3
3
|
id: 1
|
4
4
|
name: person
|
5
|
-
|
6
|
-
ja: 個人"
|
5
|
+
display_name_translations: {"en": "Person", "ja": "個人"}
|
7
6
|
note:
|
8
7
|
position: 1
|
9
8
|
|
10
9
|
agent_type_00002:
|
11
10
|
id: 2
|
12
11
|
name: corporate_body
|
13
|
-
|
14
|
-
ja: 団体"
|
12
|
+
display_name_translations: {"en": "CorporateBody", "ja": "団体"}
|
15
13
|
note:
|
16
14
|
position: 2
|
@@ -1,39 +1,21 @@
|
|
1
1
|
---
|
2
2
|
carrier_type_00001:
|
3
|
-
name: volume
|
4
|
-
display_name: "en: Volume\r\n\
|
5
|
-
ja: 冊子体"
|
6
3
|
id: 1
|
4
|
+
name: volume
|
5
|
+
display_name_translations: {"en": "Volume", "ja": "冊子体"}
|
7
6
|
position: 1
|
8
7
|
carrier_type_00002:
|
9
|
-
name: audio_disc
|
10
|
-
display_name: "en: Audio disc\r\n\
|
11
|
-
ja: オーディオディスク"
|
12
8
|
id: 2
|
9
|
+
name: audio_disc
|
10
|
+
display_name_translations: {"en": "Audio disc", "ja": "オーディオディスク"}
|
13
11
|
position: 2
|
14
12
|
carrier_type_00003:
|
15
|
-
name: videodisc
|
16
|
-
display_name: "en: Videodisc\r\n\
|
17
|
-
ja: ビデオディスク"
|
18
13
|
id: 3
|
14
|
+
name: videodisc
|
15
|
+
display_name_translations: {"en": "Videodisc", "ja": "ビデオディスク"}
|
19
16
|
position: 3
|
20
17
|
carrier_type_00004:
|
21
|
-
name: online_resource
|
22
|
-
display_name: "en: Online resource\r\n\
|
23
|
-
ja: オンラインリソース"
|
24
18
|
id: 4
|
19
|
+
name: online_resource
|
20
|
+
display_name_translations: {"en": "Online resource", "ja": "オンラインリソース"}
|
25
21
|
position: 4
|
26
|
-
|
27
|
-
# == Schema Information
|
28
|
-
#
|
29
|
-
# Table name: carrier_types
|
30
|
-
#
|
31
|
-
# id :integer not null, primary key
|
32
|
-
# name :string(255) not null
|
33
|
-
# display_name :text
|
34
|
-
# note :text
|
35
|
-
# position :integer
|
36
|
-
# created_at :datetime not null
|
37
|
-
# updated_at :datetime not null
|
38
|
-
#
|
39
|
-
|
@@ -2,84 +2,72 @@
|
|
2
2
|
content_type_00001:
|
3
3
|
id: 1
|
4
4
|
name: text
|
5
|
-
|
6
|
-
ja: 文字"
|
5
|
+
display_name_translations: {"en": "text", "ja": "文字"}
|
7
6
|
note:
|
8
7
|
position: 1
|
9
8
|
content_type_00002:
|
10
9
|
id: 2
|
11
10
|
name: performed_music
|
12
|
-
|
13
|
-
ja: 音楽"
|
11
|
+
display_name_translations: {"en": "Performed music", "ja": "音楽"}
|
14
12
|
note: 曲の演奏など
|
15
13
|
position: 2
|
16
14
|
content_type_00003:
|
17
15
|
id: 3
|
18
16
|
name: two_dimensional_moving_image
|
19
|
-
|
20
|
-
ja: 動画"
|
17
|
+
display_name_translations: {"en": "Two-dimensional moving image", "ja": "動画"}
|
21
18
|
note:
|
22
19
|
position: 3
|
23
20
|
content_type_00004:
|
24
21
|
id: 4
|
25
22
|
name: tactile_text
|
26
|
-
|
27
|
-
ja: 点字など"
|
23
|
+
display_name_translations: {"en": "Tactile text", "ja": "点字など"}
|
28
24
|
note: 触ることのできる文字
|
29
25
|
position: 4
|
30
26
|
content_type_00005:
|
31
27
|
id: 5
|
32
28
|
name: still_image
|
33
|
-
|
34
|
-
ja: 画像"
|
29
|
+
display_name_translations: {"en": "Still image", "ja": "画像"}
|
35
30
|
note: 静止画像
|
36
31
|
position: 5
|
37
32
|
content_type_00006:
|
38
33
|
id: 6
|
39
34
|
name: cartographic_image
|
40
|
-
|
41
|
-
ja: 地図"
|
35
|
+
display_name_translations: {"en": "Cartographic image", "ja": "地図"}
|
42
36
|
note:
|
43
37
|
position: 6
|
44
38
|
content_type_00007:
|
45
39
|
id: 7
|
46
40
|
name: spoken_word
|
47
|
-
|
48
|
-
ja: 音声"
|
41
|
+
display_name_translations: {"en": "Spoken word", "ja": "音声"}
|
49
42
|
note: 読み上げ音声など
|
50
43
|
position: 7
|
51
44
|
content_type_00008:
|
52
45
|
id: 8
|
53
46
|
name: sounds
|
54
|
-
|
55
|
-
ja: 音"
|
47
|
+
display_name_translations: {"en": "Sounds", "ja": "音"}
|
56
48
|
note: 波音など
|
57
49
|
position: 8
|
58
50
|
content_type_00009:
|
59
51
|
id: 9
|
60
52
|
name: notated_music
|
61
|
-
|
62
|
-
ja: 楽譜"
|
53
|
+
display_name_translations: {"en": "Notated music", "ja": "楽譜"}
|
63
54
|
note:
|
64
55
|
position: 9
|
65
56
|
content_type_00010:
|
66
57
|
id: 10
|
67
58
|
name: three_dimensional_moving_image
|
68
|
-
|
69
|
-
ja: 3D動画"
|
59
|
+
display_name_translations: {"en": "Three-dimensional moving image", "ja": "3D動画"}
|
70
60
|
note:
|
71
61
|
position: 10
|
72
62
|
content_type_00011:
|
73
63
|
id: 11
|
74
64
|
name: other
|
75
|
-
|
76
|
-
ja: その他"
|
65
|
+
display_name_translations: {"en": "Other", "ja": "その他"}
|
77
66
|
note: LCMARCに由来
|
78
67
|
position: 11
|
79
68
|
content_type_00012:
|
80
69
|
id: 12
|
81
70
|
name: unspecified
|
82
|
-
|
83
|
-
ja: 不明"
|
71
|
+
display_name_translations: {"en": "Unspecified", "ja": "不明"}
|
84
72
|
note: LCMARCに由来
|
85
73
|
position: 12
|
@@ -2,46 +2,28 @@
|
|
2
2
|
|
3
3
|
author:
|
4
4
|
name: author
|
5
|
-
|
6
|
-
ja: 著者"
|
5
|
+
display_name_translations: {"en: Author", "ja": "著者"}
|
7
6
|
note:
|
8
7
|
position: 1
|
9
8
|
id: 1
|
10
9
|
|
11
10
|
editor:
|
12
11
|
name: editor
|
13
|
-
|
14
|
-
ja: 編者"
|
12
|
+
display_name_translations: {"en": "Editor", "ja": "編者"}
|
15
13
|
note:
|
16
14
|
position: 2
|
17
15
|
id: 2
|
18
16
|
|
19
17
|
translator:
|
20
18
|
name: translator
|
21
|
-
|
22
|
-
ja: 訳者"
|
19
|
+
display_name_translations: {"en": "Translator", "ja": "訳者"}
|
23
20
|
note:
|
24
21
|
position: 3
|
25
22
|
id: 3
|
26
23
|
|
27
24
|
illustrator:
|
28
25
|
name: illustrator
|
29
|
-
|
30
|
-
ja: 作画者"
|
26
|
+
display_name_translations: {"en": "Illustrator", "ja": "作画者"}
|
31
27
|
note:
|
32
28
|
position: 4
|
33
29
|
id: 4
|
34
|
-
|
35
|
-
# == Schema Information
|
36
|
-
#
|
37
|
-
# Table name: create_types
|
38
|
-
#
|
39
|
-
# id :integer not null, primary key
|
40
|
-
# name :string(255)
|
41
|
-
# display_name :text
|
42
|
-
# note :text
|
43
|
-
# position :integer
|
44
|
-
# created_at :datetime
|
45
|
-
# updated_at :datetime
|
46
|
-
#
|
47
|
-
|