hydra-head 3.0.0pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +71 -0
- data/.gitmodules +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +257 -0
- data/README.textile +150 -0
- data/README_RAILS3_CHANGES.textile +42 -0
- data/Rakefile +5 -0
- data/TESTING.textile +85 -0
- data/app/controllers/assets_controller.rb +117 -0
- data/app/controllers/contributors_controller.rb +54 -0
- data/app/controllers/file_assets_controller.rb +152 -0
- data/app/controllers/permissions_controller.rb +137 -0
- data/app/controllers/user_sessions_controller.rb +14 -0
- data/app/helpers/article_metadata_helper.rb +80 -0
- data/app/helpers/blacklight_helper.rb +192 -0
- data/app/helpers/downloads_helper.rb +19 -0
- data/app/helpers/generic_content_objects_helper.rb +16 -0
- data/app/helpers/hydra_assets_helper.rb +75 -0
- data/app/helpers/hydra_djatoka_helper.rb +23 -0
- data/app/helpers/hydra_fedora_metadata_helper.rb +365 -0
- data/app/helpers/hydra_helper.rb +155 -0
- data/app/helpers/hydra_uploader_helper.rb +18 -0
- data/app/helpers/inline_editable_metadata_helper.rb +15 -0
- data/app/helpers/javascript_includes_helper.rb +93 -0
- data/app/helpers/release_process_helper.rb +32 -0
- data/app/models/audio_asset.rb +8 -0
- data/app/models/file_asset.rb +111 -0
- data/app/models/generic_content.rb +21 -0
- data/app/models/generic_image.rb +62 -0
- data/app/models/image_asset.rb +8 -0
- data/app/models/mods_asset.rb +6 -0
- data/app/models/role_mapper.rb +22 -0
- data/app/models/superuser.rb +6 -0
- data/app/models/video_asset.rb +8 -0
- data/app/views/_add_assets_links.html.erb +13 -0
- data/app/views/_brown_sidebar.html +15 -0
- data/app/views/_user_util_links.html.erb +31 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_constraints_element.html.erb +34 -0
- data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
- data/app/views/catalog/_document_list.html.erb +11 -0
- data/app/views/catalog/_edit_partials/_default.html.erb +64 -0
- data/app/views/catalog/_edit_partials/_default_details.html.erb +15 -0
- data/app/views/catalog/_email_form.html.erb +9 -0
- data/app/views/catalog/_facets.html.erb +37 -0
- data/app/views/catalog/_flash_msg.html.erb +17 -0
- data/app/views/catalog/_home.html.erb +6 -0
- data/app/views/catalog/_home_text.html.erb +10 -0
- data/app/views/catalog/_index_partials/_default.html.erb +20 -0
- data/app/views/catalog/_index_partials/_default_details.html.erb +11 -0
- data/app/views/catalog/_index_partials/_default_group.html.erb +15 -0
- data/app/views/catalog/_search_form.html.erb +12 -0
- data/app/views/catalog/_show_partials/_default.html.erb +23 -0
- data/app/views/catalog/_show_partials/_default_details.html.erb +12 -0
- data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
- data/app/views/catalog/_sms_form.html.erb +21 -0
- data/app/views/catalog/_sort_and_per_page.html.erb +22 -0
- data/app/views/catalog/_uva_tabs.html.erb +10 -0
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/show.html.erb +48 -0
- data/app/views/contributors/_add_contributor_split_button.html.erb +10 -0
- data/app/views/contributors/_edit_conference.html.erb +29 -0
- data/app/views/contributors/_edit_organization.html.erb +29 -0
- data/app/views/contributors/_edit_person.html.erb +42 -0
- data/app/views/contributors/_index.html.erb +12 -0
- data/app/views/contributors/_new.html.erb +10 -0
- data/app/views/contributors/_show_conference.html.erb +22 -0
- data/app/views/contributors/_show_organization.html.erb +29 -0
- data/app/views/contributors/_show_person.html.erb +17 -0
- data/app/views/contributors/new.html.erb +13 -0
- data/app/views/downloads/index.html.erb +1 -0
- data/app/views/file_assets/_deletable_result.html.erb +5 -0
- data/app/views/file_assets/_index.html.erb +15 -0
- data/app/views/file_assets/_new.html.erb +2 -0
- data/app/views/file_assets/_result.html.erb +16 -0
- data/app/views/file_assets/index.html.erb +5 -0
- data/app/views/fluid_infusion/_uploader.html.erb +81 -0
- data/app/views/fluid_infusion/_uploader_generic_content_objects.js.erb +38 -0
- data/app/views/fluid_infusion/_uploader_js.erb +45 -0
- data/app/views/generic_content_objects/_edit_description.html.erb +50 -0
- data/app/views/generic_content_objects/_new.html.erb +0 -0
- data/app/views/generic_content_objects/_show_description.html.erb +68 -0
- data/app/views/generic_content_objects/contributors/_edit_conference.html.erb +29 -0
- data/app/views/generic_content_objects/contributors/_edit_organization.html.erb +29 -0
- data/app/views/generic_content_objects/contributors/_edit_person.html.erb +37 -0
- data/app/views/generic_content_objects/contributors/_new.html.erb +10 -0
- data/app/views/generic_content_objects/contributors/_show_conference.html.erb +22 -0
- data/app/views/generic_content_objects/contributors/_show_organization.html.erb +22 -0
- data/app/views/generic_content_objects/contributors/_show_person.html.erb +38 -0
- data/app/views/generic_contents/_edit.html.erb +59 -0
- data/app/views/generic_contents/_index.html.erb +23 -0
- data/app/views/generic_contents/_show.html.erb +18 -0
- data/app/views/generic_contents/_show_content.html.erb +4 -0
- data/app/views/generic_images/_edit.html.erb +59 -0
- data/app/views/generic_images/_index.html.erb +24 -0
- data/app/views/generic_images/_show.html.erb +18 -0
- data/app/views/generic_images/_show_all.html.erb +14 -0
- data/app/views/generic_images/_show_content.html.erb +7 -0
- data/app/views/layouts/application.html.erb +57 -0
- data/app/views/layouts/hydra-head.html.erb +12 -0
- data/app/views/mods_assets/_edit.html.erb +49 -0
- data/app/views/mods_assets/_edit_description.html.erb +82 -0
- data/app/views/mods_assets/_edit_journal.html.erb +72 -0
- data/app/views/mods_assets/_index.html.erb +1 -0
- data/app/views/mods_assets/_index_list.html.erb +37 -0
- data/app/views/mods_assets/_index_table.html.erb +7 -0
- data/app/views/mods_assets/_progress_box.html.erb +82 -0
- data/app/views/mods_assets/_show.html.erb +44 -0
- data/app/views/mods_assets/_show_description.html.erb +44 -0
- data/app/views/mods_assets/_show_journal.html.erb +42 -0
- data/app/views/mods_assets/_show_permissions.html.erb +14 -0
- data/app/views/permissions/_edit_person_permissions.html.erb +35 -0
- data/app/views/permissions/_index.html.erb +55 -0
- data/app/views/permissions/_new.html.erb +18 -0
- data/app/views/permissions/index.html.erb +1 -0
- data/app/views/permissions/new.html.erb +1 -0
- data/app/views/shared/_delete_asset_confirmation.html.erb +17 -0
- data/app/views/user_sessions/_login_form.html.erb +10 -0
- data/app/views/user_sessions/logged_out.html.erb +1 -0
- data/config/routes.rb +12 -0
- data/fedora_conf/conf/fedora.fcfg +1021 -0
- data/hydra-head.gemspec +70 -0
- data/lib/application_controller.rb +25 -0
- data/lib/application_helper.rb +2 -0
- data/lib/engine.rb +30 -0
- data/lib/generators/hydra/head_generator.rb +152 -0
- data/lib/generators/hydra/templates/config/fedora.yml +17 -0
- data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +246 -0
- data/lib/generators/hydra/templates/config/initializers/fedora_config.rb +23 -0
- data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +29 -0
- data/lib/generators/hydra/templates/config/role_map_cucumber.yml +10 -0
- data/lib/generators/hydra/templates/config/role_map_development.yml +12 -0
- data/lib/generators/hydra/templates/config/role_map_production.yml +2 -0
- data/lib/generators/hydra/templates/config/role_map_test.yml +15 -0
- data/lib/generators/hydra/templates/config/solr.yml +10 -0
- data/lib/generators/hydra/templates/config/solr_mappings.yml +22 -0
- data/lib/generators/hydra/templates/fedora_conf/conf/fedora.fcfg +1021 -0
- data/lib/generators/hydra/templates/migrations/add_user_attributes_table.rb +15 -0
- data/lib/generators/hydra/templates/migrations/create_superusers.rb +12 -0
- data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +118 -0
- data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +332 -0
- data/lib/generators/hydra/templates/solr_conf/solr.xml +35 -0
- data/lib/hydra-head.rb +29 -0
- data/lib/hydra-head/engine.rb +9 -0
- data/lib/hydra-head/routes.rb +87 -0
- data/lib/hydra-head/version.rb +4 -0
- data/lib/hydra.rb +22 -0
- data/lib/hydra/access_controls_enforcement.rb +236 -0
- data/lib/hydra/access_controls_evaluation.rb +97 -0
- data/lib/hydra/assets_controller_helper.rb +144 -0
- data/lib/hydra/catalog.rb +64 -0
- data/lib/hydra/common_mods_index_methods.rb +42 -0
- data/lib/hydra/controller.rb +7 -0
- data/lib/hydra/file_assets_helper.rb +144 -0
- data/lib/hydra/fixtures.rb +43 -0
- data/lib/hydra/generic_content.rb +113 -0
- data/lib/hydra/generic_image.rb +100 -0
- data/lib/hydra/image.rb +177 -0
- data/lib/hydra/model_methods.rb +95 -0
- data/lib/hydra/model_mixins.rb +2 -0
- data/lib/hydra/model_mixins/common_metadata.rb +24 -0
- data/lib/hydra/model_mixins/mods_object.rb +16 -0
- data/lib/hydra/mods_article.rb +505 -0
- data/lib/hydra/mods_dataset.rb +165 -0
- data/lib/hydra/mods_generic_content.rb +494 -0
- data/lib/hydra/mods_image.rb +494 -0
- data/lib/hydra/repository_controller.rb +102 -0
- data/lib/hydra/rights_metadata.rb +189 -0
- data/lib/hydra/superuser_attributes.rb +12 -0
- data/lib/hydra/testing_server.rb +183 -0
- data/lib/hydra/user.rb +22 -0
- data/lib/mediashelf/active_fedora_helper.rb +72 -0
- data/lib/railties/all_tests.rake +23 -0
- data/lib/railties/hydra-fixtures.rake +184 -0
- data/lib/railties/hydra_jetty.rake +79 -0
- data/lib/railties/hyhead_cucumber.rake +127 -0
- data/lib/railties/hyhead_rspec.rake +137 -0
- data/lib/stanford/searchworks_helper.rb +1338 -0
- data/lib/stanford/solr_helper.rb +108 -0
- data/lib/uva/mods_index_methods.rb +24 -0
- data/solr_conf/conf/schema.xml +122 -0
- data/solr_conf/conf/solrconfig.xml +332 -0
- data/solr_conf/solr.xml +35 -0
- data/tasks/hydra-head-fixtures.rake +54 -0
- data/tasks/hydra-head.rake +247 -0
- data/tasks/hydra_jetty.rake +79 -0
- data/tasks/replicator.rake +27 -0
- data/tasks/solrizer-fedora.rake +53 -0
- data/tasks/solrizer.rake +13 -0
- data/test_support/etc/Gemfile +29 -0
- data/test_support/etc/rvmrc +32 -0
- data/test_support/features/button_add_assets.feature +22 -0
- data/test_support/features/button_add_generic_content.feature +11 -0
- data/test_support/features/button_add_image.feature +11 -0
- data/test_support/features/button_add_mods_asset.feature +11 -0
- data/test_support/features/contributor_add.feature +39 -0
- data/test_support/features/file_assets_list.feature +32 -0
- data/test_support/features/file_upload.feature +40 -0
- data/test_support/features/home_page.feature +9 -0
- data/test_support/features/html_validity.feature +47 -0
- data/test_support/features/mods_asset_contributors_edit.feature +80 -0
- data/test_support/features/mods_asset_create.feature +12 -0
- data/test_support/features/mods_asset_edit.feature +33 -0
- data/test_support/features/mods_asset_edit_without_permission.feature +10 -0
- data/test_support/features/mods_asset_search_result.feature +13 -0
- data/test_support/features/mods_asset_show.feature +39 -0
- data/test_support/features/permissions_add.feature +15 -0
- data/test_support/features/permissions_edit.feature +63 -0
- data/test_support/features/step_definitions/catalog_index_steps.rb +14 -0
- data/test_support/features/step_definitions/create_asset_steps.rb +7 -0
- data/test_support/features/step_definitions/edit_metadata_steps.rb +73 -0
- data/test_support/features/step_definitions/file_list_steps.rb +28 -0
- data/test_support/features/step_definitions/hydra_metadata_steps.rb +3 -0
- data/test_support/features/step_definitions/hydra_steps.rb +8 -0
- data/test_support/features/step_definitions/inline_editable_edit_steps.rb +77 -0
- data/test_support/features/step_definitions/search_steps.rb +88 -0
- data/test_support/features/step_definitions/searching_steps.rb +22 -0
- data/test_support/features/step_definitions/show_document_steps.rb +85 -0
- data/test_support/features/step_definitions/user_steps.rb +36 -0
- data/test_support/features/step_definitions/web_steps.rb +219 -0
- data/test_support/features/support/env.rb +55 -0
- data/test_support/features/support/paths.rb +80 -0
- data/test_support/features/switch_users.feature +14 -0
- data/test_support/features/view_catalog_index.feature +18 -0
- data/test_support/fixtures/empty_file.txt +0 -0
- data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +1212 -0
- data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +4946 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +234 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +177 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +170 -0
- data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +187 -0
- data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +676 -0
- data/test_support/fixtures/image.jp2 +0 -0
- data/test_support/fixtures/libra-oa_1.foxml.xml +2324 -0
- data/test_support/fixtures/libra-oa_2.foxml.xml +2422 -0
- data/test_support/spec/controllers/assets_controller_spec.rb +113 -0
- data/test_support/spec/controllers/catalog_controller_spec.rb +148 -0
- data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +62 -0
- data/test_support/spec/controllers/contributors_controller_spec.rb +47 -0
- data/test_support/spec/controllers/file_assets_controller_spec.rb +189 -0
- data/test_support/spec/controllers/hydra_controller_spec.rb +15 -0
- data/test_support/spec/controllers/permissions_controller_spec.rb +80 -0
- data/test_support/spec/controllers/user_sessions_controller_spec.rb +35 -0
- data/test_support/spec/generators/hydra-head_generator_spec.rb +14 -0
- data/test_support/spec/helpers/access_controls_enforcement_spec.rb +212 -0
- data/test_support/spec/helpers/access_controls_evaluation_spec.rb +35 -0
- data/test_support/spec/helpers/assets_controller_helper_spec.rb +71 -0
- data/test_support/spec/helpers/blacklight_helper_spec.rb +64 -0
- data/test_support/spec/helpers/file_assets_helper_spec.rb +107 -0
- data/test_support/spec/helpers/hydra-repository_controller_spec.rb +32 -0
- data/test_support/spec/helpers/hydra_assets_helper_spec.rb +195 -0
- data/test_support/spec/helpers/hydra_djatoka_helper_spec.rb +32 -0
- data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +215 -0
- data/test_support/spec/helpers/hydra_helper_spec.rb +73 -0
- data/test_support/spec/helpers/hydra_model_methods_spec.rb +95 -0
- data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +18 -0
- data/test_support/spec/helpers/javascript_includes_helper_spec.rb +43 -0
- data/test_support/spec/integration/file_asset_spec.rb +150 -0
- data/test_support/spec/lib/active_fedora_helper_spec.rb +56 -0
- data/test_support/spec/lib/catalog_spec.rb +16 -0
- data/test_support/spec/lib/common_mods_index_methods_spec.rb +28 -0
- data/test_support/spec/models/audio_asset_spec.rb +23 -0
- data/test_support/spec/models/file_asset_spec.rb +42 -0
- data/test_support/spec/models/generic_content_spec.rb +29 -0
- data/test_support/spec/models/generic_image_spec.rb +58 -0
- data/test_support/spec/models/hydra_rights_metadata_spec.rb +162 -0
- data/test_support/spec/models/image_asset_spec.rb +23 -0
- data/test_support/spec/models/mods_asset_spec.rb +29 -0
- data/test_support/spec/models/role_mapper_spec.rb +22 -0
- data/test_support/spec/models/user_spec.rb +52 -0
- data/test_support/spec/models/video_asset_spec.rb +23 -0
- data/test_support/spec/rcov.opts +3 -0
- data/test_support/spec/spec.opts +4 -0
- data/test_support/spec/spec_helper.rb +44 -0
- data/test_support/spec/support/matchers/helper_matcher.rb +14 -0
- data/test_support/spec/support/matchers/solr_matchers.rb +60 -0
- data/test_support/spec/unit/hydra-head-engine_spec.rb +8 -0
- data/test_support/spec/unit/hydra-head_spec.rb +8 -0
- data/test_support/spec/utilities/hydra_testing_server_spec.rb +49 -0
- data/test_support/spec/views/uploader.html.erb_spec.rb +30 -0
- data/vendor/cache/RedCloth-4.2.3.gem +0 -0
- data/vendor/cache/abstract-1.0.0.gem +0 -0
- data/vendor/cache/actionmailer-3.0.9.gem +0 -0
- data/vendor/cache/actionpack-3.0.9.gem +0 -0
- data/vendor/cache/active-fedora-2.3.3.gem +0 -0
- data/vendor/cache/activemodel-3.0.9.gem +0 -0
- data/vendor/cache/activerecord-3.0.9.gem +0 -0
- data/vendor/cache/activeresource-3.0.9.gem +0 -0
- data/vendor/cache/activesupport-3.0.9.gem +0 -0
- data/vendor/cache/arel-2.0.10.gem +0 -0
- data/vendor/cache/blacklight-3.0.0.gem +0 -0
- data/vendor/cache/block_helpers-0.3.3.gem +0 -0
- data/vendor/cache/builder-2.1.2.gem +0 -0
- data/vendor/cache/capybara-1.0.0.gem +0 -0
- data/vendor/cache/childprocess-0.2.0.gem +0 -0
- data/vendor/cache/columnize-0.3.4.gem +0 -0
- data/vendor/cache/crack-0.1.8.gem +0 -0
- data/vendor/cache/cucumber-1.0.2.gem +0 -0
- data/vendor/cache/cucumber-rails-1.0.2.gem +0 -0
- data/vendor/cache/curb-0.7.15.gem +0 -0
- data/vendor/cache/daemons-1.1.4.gem +0 -0
- data/vendor/cache/database_cleaner-0.6.7.gem +0 -0
- data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
- data/vendor/cache/equivalent-xml-0.2.7.gem +0 -0
- data/vendor/cache/erubis-2.6.6.gem +0 -0
- data/vendor/cache/facets-2.8.4.gem +0 -0
- data/vendor/cache/factory_girl-1.3.3.gem +0 -0
- data/vendor/cache/fastercsv-1.5.4.gem +0 -0
- data/vendor/cache/ffi-1.0.9.gem +0 -0
- data/vendor/cache/gherkin-2.4.5.gem +0 -0
- data/vendor/cache/haml-3.1.2.gem +0 -0
- data/vendor/cache/httparty-0.7.8.gem +0 -0
- data/vendor/cache/i18n-0.5.0.gem +0 -0
- data/vendor/cache/jettywrapper-0.0.10.gem +0 -0
- data/vendor/cache/json-1.5.3.gem +0 -0
- data/vendor/cache/json_pure-1.5.3.gem +0 -0
- data/vendor/cache/kaminari-0.12.4.gem +0 -0
- data/vendor/cache/launchy-2.0.3.gem +0 -0
- data/vendor/cache/linecache-0.46.gem +0 -0
- data/vendor/cache/logger-1.2.8.gem +0 -0
- data/vendor/cache/mail-2.2.19.gem +0 -0
- data/vendor/cache/marc-0.4.3.gem +0 -0
- data/vendor/cache/mediashelf-loggable-0.4.2.gem +0 -0
- data/vendor/cache/mime-types-1.16.gem +0 -0
- data/vendor/cache/mocha-0.9.12.gem +0 -0
- data/vendor/cache/multipart-post-1.1.2.gem +0 -0
- data/vendor/cache/nokogiri-1.5.0.gem +0 -0
- data/vendor/cache/om-1.2.5.gem +0 -0
- data/vendor/cache/polyglot-0.3.1.gem +0 -0
- data/vendor/cache/rack-1.2.3.gem +0 -0
- data/vendor/cache/rack-mount-0.6.14.gem +0 -0
- data/vendor/cache/rack-test-0.5.7.gem +0 -0
- data/vendor/cache/rails-3.0.9.gem +0 -0
- data/vendor/cache/railties-3.0.9.gem +0 -0
- data/vendor/cache/rake-0.9.2.gem +0 -0
- data/vendor/cache/rbx-require-relative-0.0.5.gem +0 -0
- data/vendor/cache/rcov-0.9.9.gem +0 -0
- data/vendor/cache/rdoc-3.8.gem +0 -0
- data/vendor/cache/rsolr-1.0.2.gem +0 -0
- data/vendor/cache/rsolr-ext-1.0.3.gem +0 -0
- data/vendor/cache/rspec-2.6.0.gem +0 -0
- data/vendor/cache/rspec-core-2.6.4.gem +0 -0
- data/vendor/cache/rspec-expectations-2.6.0.gem +0 -0
- data/vendor/cache/rspec-mocks-2.6.0.gem +0 -0
- data/vendor/cache/rspec-rails-2.6.1.gem +0 -0
- data/vendor/cache/ruby-debug-0.10.4.gem +0 -0
- data/vendor/cache/ruby-debug-base-0.10.4.gem +0 -0
- data/vendor/cache/rubyzip-0.9.4.gem +0 -0
- data/vendor/cache/sanitize-2.0.3.gem +0 -0
- data/vendor/cache/selenium-webdriver-0.2.2.gem +0 -0
- data/vendor/cache/solr-ruby-0.0.8.gem +0 -0
- data/vendor/cache/solrizer-1.1.0.gem +0 -0
- data/vendor/cache/solrizer-fedora-1.1.0.gem +0 -0
- data/vendor/cache/sqlite3-ruby-1.2.5.gem +0 -0
- data/vendor/cache/stomp-1.1.9.gem +0 -0
- data/vendor/cache/term-ansicolor-1.0.5.gem +0 -0
- data/vendor/cache/thor-0.14.6.gem +0 -0
- data/vendor/cache/treetop-1.4.9.gem +0 -0
- data/vendor/cache/trollop-1.16.2.gem +0 -0
- data/vendor/cache/tzinfo-0.3.29.gem +0 -0
- data/vendor/cache/unicode-0.4.0.gem +0 -0
- data/vendor/cache/will_paginate-2.3.15.gem +0 -0
- data/vendor/cache/xml-simple-1.1.0.gem +0 -0
- data/vendor/cache/xpath-0.1.4.gem +0 -0
- data/vendor/cache/yard-0.7.2.gem +0 -0
- metadata +1110 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
require "uva/mods_index_methods"
|
2
|
+
module Hydra
|
3
|
+
class ModsDataset < ActiveFedora::NokogiriDatastream
|
4
|
+
include Hydra::CommonModsIndexMethods
|
5
|
+
set_terminology do |t|
|
6
|
+
t.root(:path=>"mods", :xmlns=>"http://www.loc.gov/mods/v3", :schema=>"http://www.loc.gov/standards/mods/v3/mods-3-2.xsd")
|
7
|
+
|
8
|
+
# Common MODS info -- might eventually be put into its own shared terminology.
|
9
|
+
|
10
|
+
t.title_info(:path=>"titleInfo") {
|
11
|
+
t.main_title(:path=>"title", :label=>"title")
|
12
|
+
t.language(:path=>{:attribute=>"lang"})
|
13
|
+
}
|
14
|
+
t.title(:proxy=>[:title_info, :main_title])
|
15
|
+
t.abstract
|
16
|
+
t.subject {
|
17
|
+
t.topic(:index_as=>[:facetable])
|
18
|
+
}
|
19
|
+
t.topic_tag(:path=>"subject", :default_content_path=>"topic")
|
20
|
+
t.identifier {
|
21
|
+
t.type_(:path=>{:attribute=>"type"})
|
22
|
+
}
|
23
|
+
# This is a mods:name. The underscore is purely to avoid namespace conflicts.
|
24
|
+
t.name_ {
|
25
|
+
t.namePart(:index_as=>[:searchable, :displayable, :facetable, :sortable], :required=>:true, :type=>:string, :label=>"generic name")
|
26
|
+
t.affiliation
|
27
|
+
t.institution(:path=>"affiliation")
|
28
|
+
t.displayForm
|
29
|
+
t.role(:ref=>[:role])
|
30
|
+
t.description
|
31
|
+
t.date(:path=>"namePart", :attributes=>{:type=>"date"})
|
32
|
+
t.last_name(:path=>"namePart", :attributes=>{:type=>"family"})
|
33
|
+
t.first_name(:path=>"namePart", :attributes=>{:type=>"given"}, :label=>"first name")
|
34
|
+
t.terms_of_address(:path=>"namePart", :attributes=>{:type=>"termsOfAddress"})
|
35
|
+
}
|
36
|
+
# lookup :person, :first_name
|
37
|
+
t.person(:ref=>:name, :attributes=>{:type=>"personal"})
|
38
|
+
t.organization(:ref=>:name, :attributes=>{:type=>"institutional"})
|
39
|
+
t.conference(:ref=>:name, :attributes=>{:type=>"conference"})
|
40
|
+
|
41
|
+
t.role {
|
42
|
+
t.text(:path=>"roleTerm",:attributes=>{:type=>"text"})
|
43
|
+
t.code(:path=>"roleTerm",:attributes=>{:type=>"code"})
|
44
|
+
}
|
45
|
+
|
46
|
+
# Dataset-specific Terms
|
47
|
+
|
48
|
+
# In datasets, we're calling the abstract "methodology"
|
49
|
+
t.methodology(:path=>"abstract")
|
50
|
+
|
51
|
+
# Most of these are forcing non-bibliographic information into mods by using the note field pretty freely
|
52
|
+
t.note
|
53
|
+
t.gps(:index_as=>[:facetable],:path=>"note",:attributes=>{:type=>"location"})
|
54
|
+
t.timespan_start(:path=>"note",:attributes=>{:type=>"timespan-start"})
|
55
|
+
t.timespan_end(:path=>"note",:attributes=>{:type=>"timespan-end"})
|
56
|
+
t.region(:index_as=>[:facetable],:path=>"note",:attributes=>{:type=>"region"})
|
57
|
+
t.site(:index_as=>[:facetable],:path=>"note",:attributes=>{:type=>"site"})
|
58
|
+
t.ecosystem(:index_as=>[:facetable],:path=>"note",:attributes=>{:type=>"ecosystem"})
|
59
|
+
end
|
60
|
+
|
61
|
+
# It would be nice if we could declare properties with refined info like this
|
62
|
+
# accessor :grant_agency, :relative_xpath=>'oxns:mods/oxns:name[contains(oxns:role/oxns:roleTerm, "Funder")]'
|
63
|
+
|
64
|
+
# Generates an empty Mods Article (used when you call ModsArticle.new without passing in existing xml)
|
65
|
+
def self.xml_template
|
66
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
67
|
+
xml.mods(:version=>"3.3", "xmlns:xlink"=>"http://www.w3.org/1999/xlink",
|
68
|
+
"xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
|
69
|
+
"xmlns"=>"http://www.loc.gov/mods/v3",
|
70
|
+
"xsi:schemaLocation"=>"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd") {
|
71
|
+
xml.titleInfo(:lang=>"") {
|
72
|
+
xml.title
|
73
|
+
}
|
74
|
+
xml.name(:type=>"personal") {
|
75
|
+
xml.namePart(:type=>"given")
|
76
|
+
xml.namePart(:type=>"family")
|
77
|
+
xml.affiliation
|
78
|
+
xml.role {
|
79
|
+
xml.roleTerm(:authority=>"marcrelator", :type=>"text")
|
80
|
+
}
|
81
|
+
}
|
82
|
+
xml.name(:type=>"corporate") {
|
83
|
+
xml.namePart
|
84
|
+
xml.affiliation
|
85
|
+
xml.role {
|
86
|
+
xml.roleTerm("Funder", :authority=>"marcrelator", :type=>"text")
|
87
|
+
}
|
88
|
+
}
|
89
|
+
xml.typeOfResource "software, multimedia"
|
90
|
+
xml.genre("dataset", :authority=>"dct")
|
91
|
+
xml.language {
|
92
|
+
xml.languageTerm("eng", :authority=>"iso639-2b", :type=>"code")
|
93
|
+
}
|
94
|
+
xml.abstract
|
95
|
+
xml.subject {
|
96
|
+
xml.topic
|
97
|
+
}
|
98
|
+
xml.note(:type=>"completeness")
|
99
|
+
xml.note(:type=>"interval")
|
100
|
+
xml.note(:type=>"datatype")
|
101
|
+
xml.note(:type=>"timespan-start")
|
102
|
+
xml.note(:type=>"timespan-end")
|
103
|
+
xml.note(:type=>"location")
|
104
|
+
xml.note(:type=>"grant")
|
105
|
+
xml.note(:type=>"data quality")
|
106
|
+
xml.note(:type=>"contact-name")
|
107
|
+
xml.note(:type=>"contact-email")
|
108
|
+
}
|
109
|
+
end
|
110
|
+
return builder.doc
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.person_relator_terms
|
114
|
+
{"anl" => "Analyst",
|
115
|
+
"aut" => "Author",
|
116
|
+
"clb" => "Collaborator",
|
117
|
+
"com" => "Compiler",
|
118
|
+
"cre" => "Creator",
|
119
|
+
"ctb" => "Contributor",
|
120
|
+
"dpt" => "Depositor",
|
121
|
+
"dtc" => "Data contributor ",
|
122
|
+
"dtm" => "Data manager ",
|
123
|
+
"edt" => "Editor",
|
124
|
+
"lbr" => "Laboratory ",
|
125
|
+
"ldr" => "Laboratory director ",
|
126
|
+
"pdr" => "Project director",
|
127
|
+
"prg" => "Programmer",
|
128
|
+
"res" => "Researcher",
|
129
|
+
"rth" => "Research team head",
|
130
|
+
"rtm" => "Research team member"
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
def self.completed_choices
|
135
|
+
["Time Series",
|
136
|
+
"Snapshot / Sample"
|
137
|
+
]
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
def self.interval_choices
|
142
|
+
["Monthly",
|
143
|
+
"Quarterly",
|
144
|
+
"Semi-annually",
|
145
|
+
"Annually",
|
146
|
+
"Irregular"
|
147
|
+
]
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.data_type_choices
|
151
|
+
["transect","observation","data logging","remote sensing"]
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.valid_child_types
|
155
|
+
["data", "supporting file", "profile", "lorem ipsum", "dolor"]
|
156
|
+
end
|
157
|
+
def to_solr(solr_doc=Hash.new)
|
158
|
+
super(solr_doc)
|
159
|
+
solr_doc.merge!(extract_person_full_names)
|
160
|
+
solr_doc.merge!(extract_person_organizations)
|
161
|
+
solr_doc.merge!(:object_type_facet => "Dataset")
|
162
|
+
solr_doc
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
@@ -0,0 +1,494 @@
|
|
1
|
+
module Hydra
|
2
|
+
class ModsGenericContent < ActiveFedora::NokogiriDatastream
|
3
|
+
include Hydra::CommonModsIndexMethods
|
4
|
+
|
5
|
+
set_terminology do |t|
|
6
|
+
t.root(:path=>"mods", :xmlns=>"http://www.loc.gov/mods/v3", :schema=>"http://www.loc.gov/standards/mods/v3/mods-3-2.xsd")
|
7
|
+
|
8
|
+
t.title_info(:path=>"titleInfo") {
|
9
|
+
t.main_title(:path=>"title", :label=>"title")
|
10
|
+
t.language(:index_as=>[:facetable],:path=>{:attribute=>"lang"})
|
11
|
+
}
|
12
|
+
|
13
|
+
t.language{
|
14
|
+
t.lang_code(:index_as=>[:facetable], :path=>"languageTerm", :attributes=>{:type=>"code"})
|
15
|
+
}
|
16
|
+
t.abstract
|
17
|
+
t.subject {
|
18
|
+
t.topic
|
19
|
+
}
|
20
|
+
t.topic_tag(:index_as=>[:facetable],:path=>"subject", :default_content_path=>"topic")
|
21
|
+
|
22
|
+
# mods:physicaldescription/mods:extent - used for storing file size in human-readable form.
|
23
|
+
t.physical_description(:path => "physicalDescription") {
|
24
|
+
t.extent( :path => "extent")
|
25
|
+
}
|
26
|
+
|
27
|
+
# This is a mods:name. The underscore is purely to avoid namespace conflicts.
|
28
|
+
t.name_ {
|
29
|
+
# this is a namepart
|
30
|
+
t.namePart(:type=>:string, :label=>"generic name")
|
31
|
+
# affiliations are great
|
32
|
+
t.affiliation
|
33
|
+
t.institution(:path=>"affiliation", :index_as=>[:facetable], :label=>"organization")
|
34
|
+
t.displayForm
|
35
|
+
t.role(:ref=>[:role])
|
36
|
+
t.description
|
37
|
+
t.date(:path=>"namePart", :attributes=>{:type=>"date"})
|
38
|
+
t.last_name(:path=>"namePart", :attributes=>{:type=>"family"})
|
39
|
+
t.first_name(:path=>"namePart", :attributes=>{:type=>"given"}, :label=>"first name")
|
40
|
+
t.terms_of_address(:path=>"namePart", :attributes=>{:type=>"termsOfAddress"})
|
41
|
+
}
|
42
|
+
# lookup :person, :first_name
|
43
|
+
t.person(:ref=>:name, :attributes=>{:type=>"personal"}, :index_as=>[:facetable])
|
44
|
+
t.organization(:ref=>:name, :attributes=>{:type=>"corporate"}, :index_as=>[:facetable])
|
45
|
+
t.conference(:ref=>:name, :attributes=>{:type=>"conference"}, :index_as=>[:facetable])
|
46
|
+
t.role {
|
47
|
+
t.text(:path=>"roleTerm",:attributes=>{:type=>"text"})
|
48
|
+
t.code(:path=>"roleTerm",:attributes=>{:type=>"code"})
|
49
|
+
}
|
50
|
+
t.journal(:path=>'relatedItem', :attributes=>{:type=>"host"}) {
|
51
|
+
t.title_info(:index_as=>[:facetable],:ref=>[:title_info])
|
52
|
+
t.origin_info(:path=>"originInfo") {
|
53
|
+
t.publisher
|
54
|
+
t.date_issued(:path=>"dateIssued")
|
55
|
+
}
|
56
|
+
t.issn(:path=>"identifier", :attributes=>{:type=>"issn"})
|
57
|
+
t.issue(:path=>"part") {
|
58
|
+
t.volume(:path=>"detail", :attributes=>{:type=>"volume"}, :default_content_path=>"number")
|
59
|
+
t.level(:path=>"detail", :attributes=>{:type=>"number"}, :default_content_path=>"number")
|
60
|
+
t.extent
|
61
|
+
t.pages(:path=>"extent", :attributes=>{:unit=>"pages"}) {
|
62
|
+
t.start
|
63
|
+
t.end
|
64
|
+
}
|
65
|
+
t.start_page(:proxy=>[:pages, :start])
|
66
|
+
t.end_page(:proxy=>[:pages, :end])
|
67
|
+
t.publication_date(:path=>"date")
|
68
|
+
}
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# accessor :title, :term=>[:mods, :title_info, :main_title]
|
73
|
+
|
74
|
+
# Generates an empty Mods Generic Content (used when you call ModsGenericContent.new without passing in existing xml)
|
75
|
+
def self.xml_template
|
76
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
77
|
+
xml.mods(:version=>"3.3", "xmlns:xlink"=>"http://www.w3.org/1999/xlink",
|
78
|
+
"xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
|
79
|
+
"xmlns"=>"http://www.loc.gov/mods/v3",
|
80
|
+
"xsi:schemaLocation"=>"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd") {
|
81
|
+
xml.titleInfo(:lang=>"") {
|
82
|
+
xml.title
|
83
|
+
}
|
84
|
+
xml.name(:type=>"personal") {
|
85
|
+
xml.namePart(:type=>"given")
|
86
|
+
xml.namePart(:type=>"family")
|
87
|
+
xml.affiliation
|
88
|
+
xml.role {
|
89
|
+
xml.roleTerm(:authority=>"marcrelator", :type=>"text")
|
90
|
+
}
|
91
|
+
}
|
92
|
+
xml.typeOfResource
|
93
|
+
xml.genre(:authority=>"marcgt")
|
94
|
+
xml.language {
|
95
|
+
xml.languageTerm(:authority=>"iso639-2b", :type=>"code")
|
96
|
+
}
|
97
|
+
# mods:physicaldescription/mods:extent - used for storing file size in human-readable form.
|
98
|
+
xml.physicalDescription {
|
99
|
+
xml.extent
|
100
|
+
}
|
101
|
+
xml.abstract
|
102
|
+
xml.subject {
|
103
|
+
xml.topic
|
104
|
+
}
|
105
|
+
xml.relatedItem(:type=>"host") {
|
106
|
+
xml.titleInfo {
|
107
|
+
xml.title
|
108
|
+
}
|
109
|
+
xml.identifier(:type=>"issn")
|
110
|
+
xml.originInfo {
|
111
|
+
xml.publisher
|
112
|
+
xml.dateIssued
|
113
|
+
}
|
114
|
+
xml.part {
|
115
|
+
xml.detail(:type=>"volume") {
|
116
|
+
xml.number
|
117
|
+
}
|
118
|
+
xml.detail(:type=>"number") {
|
119
|
+
xml.number
|
120
|
+
}
|
121
|
+
xml.extent(:unit=>"pages") {
|
122
|
+
xml.start
|
123
|
+
xml.end
|
124
|
+
}
|
125
|
+
xml.date
|
126
|
+
}
|
127
|
+
}
|
128
|
+
xml.location {
|
129
|
+
xml.url
|
130
|
+
}
|
131
|
+
}
|
132
|
+
end
|
133
|
+
return builder.doc
|
134
|
+
end
|
135
|
+
|
136
|
+
# Generates a new Person node
|
137
|
+
def self.person_template
|
138
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
139
|
+
xml.name(:type=>"personal") {
|
140
|
+
xml.namePart(:type=>"family")
|
141
|
+
xml.namePart(:type=>"given")
|
142
|
+
xml.affiliation
|
143
|
+
xml.role {
|
144
|
+
xml.roleTerm(:type=>"text")
|
145
|
+
}
|
146
|
+
}
|
147
|
+
end
|
148
|
+
return builder.doc.root
|
149
|
+
end
|
150
|
+
|
151
|
+
def self.full_name_template
|
152
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
153
|
+
xml.full_name(:type => "personal")
|
154
|
+
end
|
155
|
+
return builder.doc.root
|
156
|
+
end
|
157
|
+
|
158
|
+
# Generates a new Organization node
|
159
|
+
# Uses mods:name[@type="corporate"]
|
160
|
+
def self.organization_template
|
161
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
162
|
+
xml.name(:type=>"corporate") {
|
163
|
+
xml.namePart
|
164
|
+
xml.role {
|
165
|
+
xml.roleTerm(:authority=>"marcrelator", :type=>"text")
|
166
|
+
}
|
167
|
+
}
|
168
|
+
end
|
169
|
+
return builder.doc.root
|
170
|
+
end
|
171
|
+
|
172
|
+
# Generates a new Conference node
|
173
|
+
def self.conference_template
|
174
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
175
|
+
xml.name(:type=>"conference") {
|
176
|
+
xml.namePart
|
177
|
+
xml.role {
|
178
|
+
xml.roleTerm(:authority=>"marcrelator", :type=>"text")
|
179
|
+
}
|
180
|
+
}
|
181
|
+
end
|
182
|
+
return builder.doc.root
|
183
|
+
end
|
184
|
+
|
185
|
+
# Inserts a new contributor (mods:name) into the mods document
|
186
|
+
# creates contributors of type :person, :organization, or :conference
|
187
|
+
def insert_contributor(type, opts={})
|
188
|
+
case type.to_sym
|
189
|
+
when :person
|
190
|
+
node = Hydra::ModsGenericContent.person_template
|
191
|
+
nodeset = self.find_by_terms(:person)
|
192
|
+
when :organization
|
193
|
+
node = Hydra::ModsGenericContent.organization_template
|
194
|
+
nodeset = self.find_by_terms(:organization)
|
195
|
+
when :conference
|
196
|
+
node = Hydra::ModsGenericContent.conference_template
|
197
|
+
nodeset = self.find_by_terms(:conference)
|
198
|
+
else
|
199
|
+
ActiveFedora.logger.warn("#{type} is not a valid argument for Hydra::ModsGenericContent.insert_contributor")
|
200
|
+
node = nil
|
201
|
+
index = nil
|
202
|
+
end
|
203
|
+
|
204
|
+
unless nodeset.nil?
|
205
|
+
if nodeset.empty?
|
206
|
+
self.ng_xml.root.add_child(node)
|
207
|
+
index = 0
|
208
|
+
else
|
209
|
+
nodeset.after(node)
|
210
|
+
index = nodeset.length
|
211
|
+
end
|
212
|
+
self.dirty = true
|
213
|
+
end
|
214
|
+
|
215
|
+
return node, index
|
216
|
+
end
|
217
|
+
|
218
|
+
# Remove the contributor entry identified by @contributor_type and @index
|
219
|
+
def remove_contributor(contributor_type, index)
|
220
|
+
self.find_by_terms( {contributor_type.to_sym => index.to_i} ).first.remove
|
221
|
+
self.dirty = true
|
222
|
+
end
|
223
|
+
|
224
|
+
def self.common_relator_terms
|
225
|
+
{"aut" => "Author",
|
226
|
+
"clb" => "Collaborator",
|
227
|
+
"com" => "Compiler",
|
228
|
+
"ctb" => "Contributor",
|
229
|
+
"cre" => "Creator",
|
230
|
+
"edt" => "Editor",
|
231
|
+
"ill" => "Illustrator",
|
232
|
+
"oth" => "Other",
|
233
|
+
"trl" => "Translator",
|
234
|
+
}
|
235
|
+
end
|
236
|
+
|
237
|
+
def self.person_relator_terms
|
238
|
+
{"aut" => "Author",
|
239
|
+
"clb" => "Collaborator",
|
240
|
+
"com" => "Compiler",
|
241
|
+
"cre" => "Creator",
|
242
|
+
"ctb" => "Contributor",
|
243
|
+
"edt" => "Editor",
|
244
|
+
"ill" => "Illustrator",
|
245
|
+
"res" => "Researcher",
|
246
|
+
"rth" => "Research team head",
|
247
|
+
"rtm" => "Research team member",
|
248
|
+
"trl" => "Translator"
|
249
|
+
}
|
250
|
+
end
|
251
|
+
|
252
|
+
def self.conference_relator_terms
|
253
|
+
{
|
254
|
+
"hst" => "Host"
|
255
|
+
}
|
256
|
+
end
|
257
|
+
|
258
|
+
def self.organization_relator_terms
|
259
|
+
{
|
260
|
+
"fnd" => "Funder",
|
261
|
+
"hst" => "Host"
|
262
|
+
}
|
263
|
+
end
|
264
|
+
|
265
|
+
def self.dc_relator_terms
|
266
|
+
{"acp" => "Art copyist",
|
267
|
+
"act" => "Actor",
|
268
|
+
"adp" => "Adapter",
|
269
|
+
"aft" => "Author of afterword, colophon, etc.",
|
270
|
+
"anl" => "Analyst",
|
271
|
+
"anm" => "Animator",
|
272
|
+
"ann" => "Annotator",
|
273
|
+
"ant" => "Bibliographic antecedent",
|
274
|
+
"app" => "Applicant",
|
275
|
+
"aqt" => "Author in quotations or text abstracts",
|
276
|
+
"arc" => "Architect",
|
277
|
+
"ard" => "Artistic director ",
|
278
|
+
"arr" => "Arranger",
|
279
|
+
"art" => "Artist",
|
280
|
+
"asg" => "Assignee",
|
281
|
+
"asn" => "Associated name",
|
282
|
+
"att" => "Attributed name",
|
283
|
+
"auc" => "Auctioneer",
|
284
|
+
"aud" => "Author of dialog",
|
285
|
+
"aui" => "Author of introduction",
|
286
|
+
"aus" => "Author of screenplay",
|
287
|
+
"aut" => "Author",
|
288
|
+
"bdd" => "Binding designer",
|
289
|
+
"bjd" => "Bookjacket designer",
|
290
|
+
"bkd" => "Book designer",
|
291
|
+
"bkp" => "Book producer",
|
292
|
+
"bnd" => "Binder",
|
293
|
+
"bpd" => "Bookplate designer",
|
294
|
+
"bsl" => "Bookseller",
|
295
|
+
"ccp" => "Conceptor",
|
296
|
+
"chr" => "Choreographer",
|
297
|
+
"clb" => "Collaborator",
|
298
|
+
"cli" => "Client",
|
299
|
+
"cll" => "Calligrapher",
|
300
|
+
"clt" => "Collotyper",
|
301
|
+
"cmm" => "Commentator",
|
302
|
+
"cmp" => "Composer",
|
303
|
+
"cmt" => "Compositor",
|
304
|
+
"cng" => "Cinematographer",
|
305
|
+
"cnd" => "Conductor",
|
306
|
+
"cns" => "Censor",
|
307
|
+
"coe" => "Contestant -appellee",
|
308
|
+
"col" => "Collector",
|
309
|
+
"com" => "Compiler",
|
310
|
+
"cos" => "Contestant",
|
311
|
+
"cot" => "Contestant -appellant",
|
312
|
+
"cov" => "Cover designer",
|
313
|
+
"cpc" => "Copyright claimant",
|
314
|
+
"cpe" => "Complainant-appellee",
|
315
|
+
"cph" => "Copyright holder",
|
316
|
+
"cpl" => "Complainant",
|
317
|
+
"cpt" => "Complainant-appellant",
|
318
|
+
"cre" => "Creator",
|
319
|
+
"crp" => "Correspondent",
|
320
|
+
"crr" => "Corrector",
|
321
|
+
"csl" => "Consultant",
|
322
|
+
"csp" => "Consultant to a project",
|
323
|
+
"cst" => "Costume designer",
|
324
|
+
"ctb" => "Contributor",
|
325
|
+
"cte" => "Contestee-appellee",
|
326
|
+
"ctg" => "Cartographer",
|
327
|
+
"ctr" => "Contractor",
|
328
|
+
"cts" => "Contestee",
|
329
|
+
"ctt" => "Contestee-appellant",
|
330
|
+
"cur" => "Curator",
|
331
|
+
"cwt" => "Commentator for written text",
|
332
|
+
"dfd" => "Defendant",
|
333
|
+
"dfe" => "Defendant-appellee",
|
334
|
+
"dft" => "Defendant-appellant",
|
335
|
+
"dgg" => "Degree grantor",
|
336
|
+
"dis" => "Dissertant",
|
337
|
+
"dln" => "Delineator",
|
338
|
+
"dnc" => "Dancer",
|
339
|
+
"dnr" => "Donor",
|
340
|
+
"dpc" => "Depicted",
|
341
|
+
"dpt" => "Depositor",
|
342
|
+
"drm" => "Draftsman",
|
343
|
+
"drt" => "Director",
|
344
|
+
"dsr" => "Designer",
|
345
|
+
"dst" => "Distributor",
|
346
|
+
"dtc" => "Data contributor ",
|
347
|
+
"dte" => "Dedicatee",
|
348
|
+
"dtm" => "Data manager ",
|
349
|
+
"dto" => "Dedicator",
|
350
|
+
"dub" => "Dubious author",
|
351
|
+
"edt" => "Editor",
|
352
|
+
"egr" => "Engraver",
|
353
|
+
"elg" => "Electrician ",
|
354
|
+
"elt" => "Electrotyper",
|
355
|
+
"eng" => "Engineer",
|
356
|
+
"etr" => "Etcher",
|
357
|
+
"exp" => "Expert",
|
358
|
+
"fac" => "Facsimilist",
|
359
|
+
"fld" => "Field director ",
|
360
|
+
"flm" => "Film editor",
|
361
|
+
"fmo" => "Former owner",
|
362
|
+
"fpy" => "First party",
|
363
|
+
"fnd" => "Funder",
|
364
|
+
"frg" => "Forger",
|
365
|
+
"gis" => "Geographic information specialist ",
|
366
|
+
"grt" => "Graphic technician",
|
367
|
+
"hnr" => "Honoree",
|
368
|
+
"hst" => "Host",
|
369
|
+
"ill" => "Illustrator",
|
370
|
+
"ilu" => "Illuminator",
|
371
|
+
"ins" => "Inscriber",
|
372
|
+
"inv" => "Inventor",
|
373
|
+
"itr" => "Instrumentalist",
|
374
|
+
"ive" => "Interviewee",
|
375
|
+
"ivr" => "Interviewer",
|
376
|
+
"lbr" => "Laboratory ",
|
377
|
+
"lbt" => "Librettist",
|
378
|
+
"ldr" => "Laboratory director ",
|
379
|
+
"led" => "Lead",
|
380
|
+
"lee" => "Libelee-appellee",
|
381
|
+
"lel" => "Libelee",
|
382
|
+
"len" => "Lender",
|
383
|
+
"let" => "Libelee-appellant",
|
384
|
+
"lgd" => "Lighting designer",
|
385
|
+
"lie" => "Libelant-appellee",
|
386
|
+
"lil" => "Libelant",
|
387
|
+
"lit" => "Libelant-appellant",
|
388
|
+
"lsa" => "Landscape architect",
|
389
|
+
"lse" => "Licensee",
|
390
|
+
"lso" => "Licensor",
|
391
|
+
"ltg" => "Lithographer",
|
392
|
+
"lyr" => "Lyricist",
|
393
|
+
"mcp" => "Music copyist",
|
394
|
+
"mfr" => "Manufacturer",
|
395
|
+
"mdc" => "Metadata contact",
|
396
|
+
"mod" => "Moderator",
|
397
|
+
"mon" => "Monitor",
|
398
|
+
"mrk" => "Markup editor",
|
399
|
+
"msd" => "Musical director",
|
400
|
+
"mte" => "Metal-engraver",
|
401
|
+
"mus" => "Musician",
|
402
|
+
"nrt" => "Narrator",
|
403
|
+
"opn" => "Opponent",
|
404
|
+
"org" => "Originator",
|
405
|
+
"orm" => "Organizer of meeting",
|
406
|
+
"oth" => "Other",
|
407
|
+
"own" => "Owner",
|
408
|
+
"pat" => "Patron",
|
409
|
+
"pbd" => "Publishing director",
|
410
|
+
"pbl" => "Publisher",
|
411
|
+
"pdr" => "Project director",
|
412
|
+
"pfr" => "Proofreader",
|
413
|
+
"pht" => "Photographer",
|
414
|
+
"plt" => "Platemaker",
|
415
|
+
"pma" => "Permitting agency",
|
416
|
+
"pmn" => "Production manager",
|
417
|
+
"pop" => "Printer of plates",
|
418
|
+
"ppm" => "Papermaker",
|
419
|
+
"ppt" => "Puppeteer",
|
420
|
+
"prc" => "Process contact",
|
421
|
+
"prd" => "Production personnel",
|
422
|
+
"prf" => "Performer",
|
423
|
+
"prg" => "Programmer",
|
424
|
+
"prm" => "Printmaker",
|
425
|
+
"pro" => "Producer",
|
426
|
+
"prt" => "Printer",
|
427
|
+
"pta" => "Patent applicant",
|
428
|
+
"pte" => "Plaintiff -appellee",
|
429
|
+
"ptf" => "Plaintiff",
|
430
|
+
"pth" => "Patent holder",
|
431
|
+
"ptt" => "Plaintiff-appellant",
|
432
|
+
"rbr" => "Rubricator",
|
433
|
+
"rce" => "Recording engineer",
|
434
|
+
"rcp" => "Recipient",
|
435
|
+
"red" => "Redactor",
|
436
|
+
"ren" => "Renderer",
|
437
|
+
"res" => "Researcher",
|
438
|
+
"rev" => "Reviewer",
|
439
|
+
"rps" => "Repository",
|
440
|
+
"rpt" => "Reporter",
|
441
|
+
"rpy" => "Responsible party",
|
442
|
+
"rse" => "Respondent-appellee",
|
443
|
+
"rsg" => "Restager",
|
444
|
+
"rsp" => "Respondent",
|
445
|
+
"rst" => "Respondent-appellant",
|
446
|
+
"rth" => "Research team head",
|
447
|
+
"rtm" => "Research team member",
|
448
|
+
"sad" => "Scientific advisor",
|
449
|
+
"sce" => "Scenarist",
|
450
|
+
"scl" => "Sculptor",
|
451
|
+
"scr" => "Scribe",
|
452
|
+
"sds" => "Sound designer",
|
453
|
+
"sec" => "Secretary",
|
454
|
+
"sgn" => "Signer",
|
455
|
+
"sht" => "Supporting host",
|
456
|
+
"sng" => "Singer",
|
457
|
+
"spk" => "Speaker",
|
458
|
+
"spn" => "Sponsor",
|
459
|
+
"spy" => "Second party",
|
460
|
+
"srv" => "Surveyor",
|
461
|
+
"std" => "Set designer",
|
462
|
+
"stl" => "Storyteller",
|
463
|
+
"stm" => "Stage manager",
|
464
|
+
"stn" => "Standards body",
|
465
|
+
"str" => "Stereotyper",
|
466
|
+
"tcd" => "Technical director",
|
467
|
+
"tch" => "Teacher",
|
468
|
+
"ths" => "Thesis advisor",
|
469
|
+
"trc" => "Transcriber",
|
470
|
+
"trl" => "Translator",
|
471
|
+
"tyd" => "Type designer",
|
472
|
+
"tyg" => "Typographer",
|
473
|
+
"vdg" => "Videographer",
|
474
|
+
"voc" => "Vocalist",
|
475
|
+
"wam" => "Writer of accompanying material",
|
476
|
+
"wdc" => "Woodcutter",
|
477
|
+
"wde" => "Wood -engraver",
|
478
|
+
"wit" => "Witness"}
|
479
|
+
end
|
480
|
+
|
481
|
+
def self.valid_child_types
|
482
|
+
["data", "supporting file", "profile", "lorem ipsum", "dolor"]
|
483
|
+
end
|
484
|
+
|
485
|
+
def to_solr(solr_doc=Hash.new)
|
486
|
+
super(solr_doc)
|
487
|
+
solr_doc.merge!(extract_person_full_names)
|
488
|
+
solr_doc.merge!(extract_person_organizations)
|
489
|
+
solr_doc.merge!(:object_type_facet => "Generic content")
|
490
|
+
solr_doc
|
491
|
+
end
|
492
|
+
|
493
|
+
end
|
494
|
+
end
|