hydra-head 3.0.0pre1

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