dog_biscuits 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +115 -0
  3. data/.codeclimate.yml +52 -0
  4. data/.gitignore +24 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +45 -0
  7. data/.rubocop_todo.yml +92 -0
  8. data/.travis.yml +18 -0
  9. data/CODE_OF_CONDUCT.md +36 -0
  10. data/CONTRIBUTING.md +161 -0
  11. data/Gemfile +40 -0
  12. data/LICENSE +14 -0
  13. data/README.md +98 -0
  14. data/Rakefile +35 -0
  15. data/SUPPORT.md +5 -0
  16. data/bin/console +15 -0
  17. data/bin/setup +7 -0
  18. data/dog_biscuits.gemspec +38 -0
  19. data/lib/dog_biscuits.rb +352 -0
  20. data/lib/dog_biscuits/actors/apply_authorities.rb +32 -0
  21. data/lib/dog_biscuits/actors/singular_attributes.rb +17 -0
  22. data/lib/dog_biscuits/blacklight/commands.rb +118 -0
  23. data/lib/dog_biscuits/configuration.rb +506 -0
  24. data/lib/dog_biscuits/importers/authority.rb +65 -0
  25. data/lib/dog_biscuits/indexers/collection_indexer.rb +10 -0
  26. data/lib/dog_biscuits/indexers/concerns/indexes_common.rb +58 -0
  27. data/lib/dog_biscuits/indexers/conference_item_indexer.rb +17 -0
  28. data/lib/dog_biscuits/indexers/dataset_indexer.rb +25 -0
  29. data/lib/dog_biscuits/indexers/digital_archival_object_indexer.rb +19 -0
  30. data/lib/dog_biscuits/indexers/exam_paper_indexer.rb +10 -0
  31. data/lib/dog_biscuits/indexers/journal_article_indexer.rb +15 -0
  32. data/lib/dog_biscuits/indexers/package_indexer.rb +19 -0
  33. data/lib/dog_biscuits/indexers/published_work_indexer.rb +16 -0
  34. data/lib/dog_biscuits/indexers/thesis_indexer.rb +16 -0
  35. data/lib/dog_biscuits/models/authorities/agent.rb +78 -0
  36. data/lib/dog_biscuits/models/authorities/agents/group.rb +59 -0
  37. data/lib/dog_biscuits/models/authorities/agents/historic_person.rb +55 -0
  38. data/lib/dog_biscuits/models/authorities/agents/organisation.rb +56 -0
  39. data/lib/dog_biscuits/models/authorities/agents/person.rb +75 -0
  40. data/lib/dog_biscuits/models/authorities/concept.rb +91 -0
  41. data/lib/dog_biscuits/models/authorities/concept_scheme.rb +65 -0
  42. data/lib/dog_biscuits/models/authorities/event.rb +74 -0
  43. data/lib/dog_biscuits/models/authorities/place.rb +86 -0
  44. data/lib/dog_biscuits/models/authorities/project.rb +60 -0
  45. data/lib/dog_biscuits/models/authority.rb +42 -0
  46. data/lib/dog_biscuits/models/collections/collection.rb +32 -0
  47. data/lib/dog_biscuits/models/concerns/behaviours/pure_specific_behaviour.rb +17 -0
  48. data/lib/dog_biscuits/models/concerns/behaviours/validate_concept_related.rb +12 -0
  49. data/lib/dog_biscuits/models/concerns/behaviours/validate_concept_scheme.rb +16 -0
  50. data/lib/dog_biscuits/models/concerns/behaviours/validate_label.rb +12 -0
  51. data/lib/dog_biscuits/models/concerns/behaviours/validate_place.rb +12 -0
  52. data/lib/dog_biscuits/models/concerns/behaviours/work_behaviour.rb +21 -0
  53. data/lib/dog_biscuits/models/concerns/extended_solr_document.rb +147 -0
  54. data/lib/dog_biscuits/models/concerns/metadata_properties/archivematica/archivematica.rb +73 -0
  55. data/lib/dog_biscuits/models/concerns/metadata_properties/archives_hub/access_provided_by.rb +14 -0
  56. data/lib/dog_biscuits/models/concerns/metadata_properties/archives_hub/country_code.rb +15 -0
  57. data/lib/dog_biscuits/models/concerns/metadata_properties/archives_hub/hub_dates.rb +17 -0
  58. data/lib/dog_biscuits/models/concerns/metadata_properties/archives_hub/maintenance_agency_code.rb +15 -0
  59. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/awarding_institution.rb +13 -0
  60. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/edition.rb +13 -0
  61. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/identified_by.rb +14 -0
  62. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/part.rb +13 -0
  63. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/part_of.rb +14 -0
  64. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/series.rb +13 -0
  65. data/lib/dog_biscuits/models/concerns/metadata_properties/bibframe/subtitle.rb +14 -0
  66. data/lib/dog_biscuits/models/concerns/metadata_properties/bibo/presented_at.rb +13 -0
  67. data/lib/dog_biscuits/models/concerns/metadata_properties/bibo/publication_status.rb +13 -0
  68. data/lib/dog_biscuits/models/concerns/metadata_properties/datacite/resource_type_general.rb +13 -0
  69. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/abstract.rb +14 -0
  70. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/access_rights.rb +14 -0
  71. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/bibliographic_citation.rb +13 -0
  72. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/contributor.rb +14 -0
  73. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/creator.rb +14 -0
  74. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date.rb +13 -0
  75. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date_accepted.rb +13 -0
  76. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date_available.rb +14 -0
  77. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date_copyrighted.rb +14 -0
  78. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date_created.rb +13 -0
  79. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/date_issued.rb +14 -0
  80. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/description.rb +14 -0
  81. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/extent.rb +13 -0
  82. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/format.rb +13 -0
  83. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/identifier.rb +13 -0
  84. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/language.rb +17 -0
  85. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/publisher.rb +14 -0
  86. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/resource_type.rb +13 -0
  87. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/rights.rb +17 -0
  88. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/rights_holder.rb +14 -0
  89. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/simple_versions.rb +18 -0
  90. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/source.rb +13 -0
  91. data/lib/dog_biscuits/models/concerns/metadata_properties/dc/subject.rb +13 -0
  92. data/lib/dog_biscuits/models/concerns/metadata_properties/dwc/event_date.rb +14 -0
  93. data/lib/dog_biscuits/models/concerns/metadata_properties/edm/edm_rights.rb +13 -0
  94. data/lib/dog_biscuits/models/concerns/metadata_properties/fabio/date_collected.rb +15 -0
  95. data/lib/dog_biscuits/models/concerns/metadata_properties/foaf/based_near.rb +12 -0
  96. data/lib/dog_biscuits/models/concerns/metadata_properties/foaf/foaf_name.rb +16 -0
  97. data/lib/dog_biscuits/models/concerns/metadata_properties/frapo/output_of.rb +18 -0
  98. data/lib/dog_biscuits/models/concerns/metadata_properties/geo/geo.rb +27 -0
  99. data/lib/dog_biscuits/models/concerns/metadata_properties/geonames/country_code.rb +15 -0
  100. data/lib/dog_biscuits/models/concerns/metadata_properties/geonames/place_properties.rb +66 -0
  101. data/lib/dog_biscuits/models/concerns/metadata_properties/lc_identifiers/doi.rb +13 -0
  102. data/lib/dog_biscuits/models/concerns/metadata_properties/lc_identifiers/isbn.rb +13 -0
  103. data/lib/dog_biscuits/models/concerns/metadata_properties/lc_identifiers/official_url.rb +13 -0
  104. data/lib/dog_biscuits/models/concerns/metadata_properties/lc_identifiers/orcid.rb +13 -0
  105. data/lib/dog_biscuits/models/concerns/metadata_properties/local/for_indexing.rb +14 -0
  106. data/lib/dog_biscuits/models/concerns/metadata_properties/local/former_identifier.rb +13 -0
  107. data/lib/dog_biscuits/models/concerns/metadata_properties/local/generic_authority_terms.rb +22 -0
  108. data/lib/dog_biscuits/models/concerns/metadata_properties/local/generic_qualifier.rb +16 -0
  109. data/lib/dog_biscuits/models/concerns/metadata_properties/local/last_access.rb +15 -0
  110. data/lib/dog_biscuits/models/concerns/metadata_properties/local/main_file.rb +24 -0
  111. data/lib/dog_biscuits/models/concerns/metadata_properties/local/module_code.rb +13 -0
  112. data/lib/dog_biscuits/models/concerns/metadata_properties/local/number_of_downloads.rb +14 -0
  113. data/lib/dog_biscuits/models/concerns/metadata_properties/local/packaged_by.rb +13 -0
  114. data/lib/dog_biscuits/models/concerns/metadata_properties/local/readme_file.rb +26 -0
  115. data/lib/dog_biscuits/models/concerns/metadata_properties/local/requestor_email.rb +13 -0
  116. data/lib/dog_biscuits/models/concerns/metadata_properties/mads/related_authority.rb +14 -0
  117. data/lib/dog_biscuits/models/concerns/metadata_properties/marc_relators/advisor.rb +14 -0
  118. data/lib/dog_biscuits/models/concerns/metadata_properties/marc_relators/editor.rb +14 -0
  119. data/lib/dog_biscuits/models/concerns/metadata_properties/marc_relators/funder.rb +13 -0
  120. data/lib/dog_biscuits/models/concerns/metadata_properties/marc_relators/place_of_publication.rb +13 -0
  121. data/lib/dog_biscuits/models/concerns/metadata_properties/mods/date_valid.rb +14 -0
  122. data/lib/dog_biscuits/models/concerns/metadata_properties/owl/owl_same_as.rb +13 -0
  123. data/lib/dog_biscuits/models/concerns/metadata_properties/premis/has_restriction.rb +15 -0
  124. data/lib/dog_biscuits/models/concerns/metadata_properties/property_sets/person_properties.rb +92 -0
  125. data/lib/dog_biscuits/models/concerns/metadata_properties/pure/managing_organisation.rb +14 -0
  126. data/lib/dog_biscuits/models/concerns/metadata_properties/pure/pure.rb +28 -0
  127. data/lib/dog_biscuits/models/concerns/metadata_properties/rdf/rdf_type.rb +12 -0
  128. data/lib/dog_biscuits/models/concerns/metadata_properties/rdf/rdfs_label.rb +14 -0
  129. data/lib/dog_biscuits/models/concerns/metadata_properties/rdf/related_url.rb +13 -0
  130. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/alternate_name.rb +13 -0
  131. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/content_version.rb +13 -0
  132. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/date_published.rb +13 -0
  133. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/date_updated.rb +13 -0
  134. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/department.rb +13 -0
  135. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/end_date.rb +13 -0
  136. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/issue_number.rb +13 -0
  137. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/keyword.rb +13 -0
  138. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/location.rb +13 -0
  139. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/pagination.rb +13 -0
  140. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/start_date.rb +13 -0
  141. data/lib/dog_biscuits/models/concerns/metadata_properties/schema/volume_number.rb +13 -0
  142. data/lib/dog_biscuits/models/concerns/metadata_properties/skos/skos_labels.rb +18 -0
  143. data/lib/dog_biscuits/models/concerns/metadata_properties/skos/skos_note.rb +13 -0
  144. data/lib/dog_biscuits/models/concerns/metadata_properties/skos/skos_related.rb +13 -0
  145. data/lib/dog_biscuits/models/concerns/metadata_properties/uketd/date_of_award.rb +13 -0
  146. data/lib/dog_biscuits/models/concerns/metadata_properties/uketd/qualification.rb +17 -0
  147. data/lib/dog_biscuits/models/concerns/metadata_properties/ulcc/date_submitted.rb +14 -0
  148. data/lib/dog_biscuits/models/concerns/metadata_properties/ulcc/official_url.rb +13 -0
  149. data/lib/dog_biscuits/models/concerns/metadata_properties/ulcc/refereed.rb +13 -0
  150. data/lib/dog_biscuits/models/concerns/model_property_sets/common/common_labels.rb +9 -0
  151. data/lib/dog_biscuits/models/concerns/model_property_sets/common/common_metadata.rb +64 -0
  152. data/lib/dog_biscuits/models/concerns/model_property_sets/common/common_rights.rb +10 -0
  153. data/lib/dog_biscuits/models/concerns/model_property_sets/conference_item_metadata.rb +24 -0
  154. data/lib/dog_biscuits/models/concerns/model_property_sets/dataset_metadata.rb +36 -0
  155. data/lib/dog_biscuits/models/concerns/model_property_sets/digital_archival_object_metadata.rb +13 -0
  156. data/lib/dog_biscuits/models/concerns/model_property_sets/exam_paper_metadata.rb +14 -0
  157. data/lib/dog_biscuits/models/concerns/model_property_sets/journal_article_metadata.rb +24 -0
  158. data/lib/dog_biscuits/models/concerns/model_property_sets/package_metadata.rb +13 -0
  159. data/lib/dog_biscuits/models/concerns/model_property_sets/published_work_metadata.rb +26 -0
  160. data/lib/dog_biscuits/models/concerns/model_property_sets/thesis_metadata.rb +17 -0
  161. data/lib/dog_biscuits/models/filesets/file_set.rb +30 -0
  162. data/lib/dog_biscuits/models/to_refactor_or_remove/canvas.rb +15 -0
  163. data/lib/dog_biscuits/models/to_refactor_or_remove/contained_file.rb +13 -0
  164. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_date_certainty.rb +5 -0
  165. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_editorial_note.rb +5 -0
  166. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_entry.rb +19 -0
  167. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_entry_date.rb +10 -0
  168. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_entry_type.rb +5 -0
  169. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_is_referenced_by.rb +5 -0
  170. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_language.rb +5 -0
  171. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_marginalium.rb +5 -0
  172. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_note.rb +5 -0
  173. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_as_written.rb +5 -0
  174. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_descriptor.rb +5 -0
  175. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_descriptor_as_written.rb +5 -0
  176. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_note.rb +5 -0
  177. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_related_person.rb +5 -0
  178. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_related_place.rb +5 -0
  179. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_person_role.rb +5 -0
  180. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_place_as_written.rb +5 -0
  181. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_place_note.rb +5 -0
  182. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_place_role.rb +5 -0
  183. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_place_type.rb +5 -0
  184. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_related_agent.rb +20 -0
  185. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_related_place.rb +13 -0
  186. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_section_type.rb +5 -0
  187. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_single_date.rb +10 -0
  188. data/lib/dog_biscuits/models/to_refactor_or_remove/db/db_subject.rb +5 -0
  189. data/lib/dog_biscuits/models/to_refactor_or_remove/entry.rb +59 -0
  190. data/lib/dog_biscuits/models/to_refactor_or_remove/entry/entry_date.rb +17 -0
  191. data/lib/dog_biscuits/models/to_refactor_or_remove/entry/related_agent.rb +62 -0
  192. data/lib/dog_biscuits/models/to_refactor_or_remove/entry/related_place.rb +28 -0
  193. data/lib/dog_biscuits/models/to_refactor_or_remove/entry/single_date.rb +19 -0
  194. data/lib/dog_biscuits/models/to_refactor_or_remove/folio.rb +42 -0
  195. data/lib/dog_biscuits/models/to_refactor_or_remove/image.rb +25 -0
  196. data/lib/dog_biscuits/models/to_refactor_or_remove/manifest.rb +15 -0
  197. data/lib/dog_biscuits/models/to_refactor_or_remove/register.rb +21 -0
  198. data/lib/dog_biscuits/models/work.rb +37 -0
  199. data/lib/dog_biscuits/models/works/conference_item.rb +37 -0
  200. data/lib/dog_biscuits/models/works/dataset.rb +42 -0
  201. data/lib/dog_biscuits/models/works/digital_archival_object.rb +28 -0
  202. data/lib/dog_biscuits/models/works/exam_paper.rb +33 -0
  203. data/lib/dog_biscuits/models/works/journal_article.rb +37 -0
  204. data/lib/dog_biscuits/models/works/package.rb +47 -0
  205. data/lib/dog_biscuits/models/works/published_work.rb +38 -0
  206. data/lib/dog_biscuits/models/works/thesis.rb +34 -0
  207. data/lib/dog_biscuits/property_mappings/property_mappings.rb +585 -0
  208. data/lib/dog_biscuits/railtie.rb +13 -0
  209. data/lib/dog_biscuits/services/table_based_authority_extended.rb +10 -0
  210. data/lib/dog_biscuits/services/terms.rb +57 -0
  211. data/lib/dog_biscuits/services/terms_service.rb +162 -0
  212. data/lib/dog_biscuits/solr/index_types.rb +33 -0
  213. data/lib/dog_biscuits/validators/concept_related_validator.rb +13 -0
  214. data/lib/dog_biscuits/validators/concept_scheme_member_validator.rb +10 -0
  215. data/lib/dog_biscuits/validators/label_validator.rb +55 -0
  216. data/lib/dog_biscuits/validators/place_validator.rb +10 -0
  217. data/lib/dog_biscuits/version.rb +5 -0
  218. data/lib/dog_biscuits/vocab/borthwick_registers.rb +321 -0
  219. data/lib/dog_biscuits/vocab/generic.rb +204 -0
  220. data/lib/dog_biscuits/vocab/oais_archivematica.rb +116 -0
  221. data/lib/dog_biscuits/vocab/pure_terms.rb +65 -0
  222. data/lib/dog_biscuits/vocab/uketd.rb +45 -0
  223. data/lib/dog_biscuits/vocab/ulcc_terms.rb +55 -0
  224. data/lib/generators/dog_biscuits/USAGE +50 -0
  225. data/lib/generators/dog_biscuits/authority_generator.rb +55 -0
  226. data/lib/generators/dog_biscuits/catalog_generator.rb +18 -0
  227. data/lib/generators/dog_biscuits/dates_generator.rb +98 -0
  228. data/lib/generators/dog_biscuits/generate_all_generator.rb +29 -0
  229. data/lib/generators/dog_biscuits/imagify_generator.rb +67 -0
  230. data/lib/generators/dog_biscuits/install_generator.rb +82 -0
  231. data/lib/generators/dog_biscuits/locales_generator.rb +20 -0
  232. data/lib/generators/dog_biscuits/schema_org_generator.rb +20 -0
  233. data/lib/generators/dog_biscuits/templates/_date_template.html.erb +7 -0
  234. data/lib/generators/dog_biscuits/templates/app/controllers/catalog_controller.rb +133 -0
  235. data/lib/generators/dog_biscuits/templates/app/helpers/dog_biscuits_helper.rb +43 -0
  236. data/lib/generators/dog_biscuits/templates/app/renderers/package_ids_renderer.rb +13 -0
  237. data/lib/generators/dog_biscuits/templates/app/renderers/packaged_by_ids_renderer.rb +11 -0
  238. data/lib/generators/dog_biscuits/templates/app/renderers/publication_status_renderer.rb +16 -0
  239. data/lib/generators/dog_biscuits/templates/app/services/concerns/file_authority_concern.rb +14 -0
  240. data/lib/generators/dog_biscuits/templates/app/services/concerns/local_authority_concern.rb +18 -0
  241. data/lib/generators/dog_biscuits/templates/app/services/local_form_metadata_service.rb +15 -0
  242. data/lib/generators/dog_biscuits/templates/app/views/hyrax/base/_form_metadata.html.erb +23 -0
  243. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_abstract.html.erb +5 -0
  244. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_default.html.erb +6 -0
  245. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_funder.html.erb +8 -0
  246. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_note.html.erb +5 -0
  247. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_part_of.html.erb +17 -0
  248. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_publication_status.html.erb +6 -0
  249. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_refereed.html.erb +5 -0
  250. data/lib/generators/dog_biscuits/templates/app/views/records/edit_fields/_resource_type_general.html.erb +2 -0
  251. data/lib/generators/dog_biscuits/templates/authority_service.rb.erb +25 -0
  252. data/lib/generators/dog_biscuits/templates/config/authorities/content_versions.yml +25 -0
  253. data/lib/generators/dog_biscuits/templates/config/authorities/publication_statuses.yml +19 -0
  254. data/lib/generators/dog_biscuits/templates/config/authorities/qualification_levels.yml +13 -0
  255. data/lib/generators/dog_biscuits/templates/config/authorities/qualification_names.yml +31 -0
  256. data/lib/generators/dog_biscuits/templates/config/authorities/resource_type_generals.yml +47 -0
  257. data/lib/generators/dog_biscuits/templates/config/dog_biscuits.yml +3 -0
  258. data/lib/generators/dog_biscuits/templates/config/initializers/catalog_search_builder_overrides.rb +18 -0
  259. data/lib/generators/dog_biscuits/templates/config/initializers/dog_biscuits.rb +144 -0
  260. data/lib/generators/dog_biscuits/templates/dog_biscuits.en.yml.erb +11 -0
  261. data/lib/generators/dog_biscuits/templates/schema_org.yml.erb +4 -0
  262. data/lib/generators/dog_biscuits/work/USAGE +35 -0
  263. data/lib/generators/dog_biscuits/work/templates/README +31 -0
  264. data/lib/generators/dog_biscuits/work/templates/_attribute_rows.html.erb +22 -0
  265. data/lib/generators/dog_biscuits/work/templates/actor.rb.erb +25 -0
  266. data/lib/generators/dog_biscuits/work/templates/form.rb.erb +18 -0
  267. data/lib/generators/dog_biscuits/work/templates/indexer.rb.erb +23 -0
  268. data/lib/generators/dog_biscuits/work/templates/model.rb.erb +16 -0
  269. data/lib/generators/dog_biscuits/work/templates/presenter.rb.erb +20 -0
  270. data/lib/generators/dog_biscuits/work/work_generator.rb +102 -0
  271. data/lib/tasks/authorities.rake +22 -0
  272. metadata +476 -0
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ module DigitalArchivalObjectMetadata
5
+ extend ActiveSupport::Concern
6
+ include DogBiscuits::AccessProvidedBy
7
+ include DogBiscuits::Extent
8
+ include DogBiscuits::PackagedBy
9
+ include DogBiscuits::PartOf
10
+ # Controlled Properties must go last
11
+ include DogBiscuits::CommonMetadata
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ # add exam paper metadata
5
+ module ExamPaperMetadata
6
+ extend ActiveSupport::Concern
7
+ include DogBiscuits::ModuleCode
8
+ include DogBiscuits::MainFile
9
+ include DogBiscuits::Qualification
10
+ include DogBiscuits::DateAvailable
11
+ # Controlled Properties must go last
12
+ include DogBiscuits::CommonMetadata
13
+ end
14
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ # add journal article metadata
5
+ module JournalArticleMetadata
6
+ extend ActiveSupport::Concern
7
+ include DogBiscuits::Abstract
8
+ include DogBiscuits::DateAvailable
9
+ include DogBiscuits::DatePublished
10
+ include DogBiscuits::DateSubmitted
11
+ include DogBiscuits::DateAccepted
12
+ include DogBiscuits::IssueNumber
13
+ include DogBiscuits::ManagingOrganisation
14
+ include DogBiscuits::OfficialUrl
15
+ include DogBiscuits::Orcid
16
+ include DogBiscuits::Pagination
17
+ include DogBiscuits::PartOf
18
+ include DogBiscuits::PublicationStatus
19
+ include DogBiscuits::Refereed
20
+ include DogBiscuits::VolumeNumber
21
+ # Controlled Properties must go last
22
+ include DogBiscuits::CommonMetadata
23
+ end
24
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ # add package metadata
5
+ module PackageMetadata
6
+ extend ActiveSupport::Concern
7
+ include DogBiscuits::Archivematica
8
+ include DogBiscuits::RdfType
9
+ include DogBiscuits::SimpleVersions
10
+ # Controlled Properties must go last
11
+ include DogBiscuits::CommonMetadata
12
+ end
13
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ module PublishedWorkMetadata
5
+ extend ActiveSupport::Concern
6
+ include DogBiscuits::Abstract
7
+ include DogBiscuits::DateAvailable
8
+ include DogBiscuits::DatePublished
9
+ include DogBiscuits::DateSubmitted
10
+ include DogBiscuits::DateAccepted
11
+ include DogBiscuits::Edition
12
+ include DogBiscuits::Editor
13
+ include DogBiscuits::IssueNumber
14
+ include DogBiscuits::Isbn
15
+ include DogBiscuits::OfficialUrl
16
+ include DogBiscuits::Pagination
17
+ include DogBiscuits::Part
18
+ include DogBiscuits::PlaceOfPublication
19
+ include DogBiscuits::PublicationStatus
20
+ include DogBiscuits::Refereed
21
+ include DogBiscuits::Series
22
+ include DogBiscuits::VolumeNumber
23
+ # Controlled Properties must go last
24
+ include DogBiscuits::CommonMetadata
25
+ end
26
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ module ThesisMetadata
5
+ extend ActiveSupport::Concern
6
+ include DogBiscuits::Abstract
7
+ include DogBiscuits::Advisor
8
+ include DogBiscuits::AwardingInstitution
9
+ include DogBiscuits::DateOfAward
10
+ include DogBiscuits::Department
11
+ include DogBiscuits::MainFile
12
+ include DogBiscuits::Orcid
13
+ include DogBiscuits::Qualification
14
+ # Controlled Properties must go last
15
+ include DogBiscuits::CommonMetadata
16
+ end
17
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DogBiscuits
4
+ class FileSet < ActiveFedora::Base
5
+ include DogBiscuits::CommonLabels
6
+ include DogBiscuits::FormerIdentifier
7
+ include DogBiscuits::ContentVersion
8
+ include Hyrax::FileSetBehavior # this needs to go AFTER properties as FileSetBehaviour contains BasicMetadata
9
+
10
+ def authority?
11
+ false
12
+ end
13
+
14
+ def agent?
15
+ false
16
+ end
17
+
18
+ def work?
19
+ false
20
+ end
21
+
22
+ def file_set?
23
+ true
24
+ end
25
+
26
+ def collection?
27
+ false
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require 'active_fedora/noid'
4
+
5
+ class Canvas < ActiveFedora::File
6
+ include ActiveFedora::WithMetadata # ,AssignId
7
+
8
+ metadata do
9
+ property :preflabel, predicate: ::RDF::Vocab::SKOS.prefLabel, multiple: false do |index|
10
+ index.as :stored_searchable, :sortable
11
+ end
12
+ configure type: RDF::URI.new('http://pcdm.org/models#File')
13
+ configure type: RDF::URI.new('http://www.shared-canvas.org/ns/Canvas')
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_fedora/noid'
4
+
5
+ class ContainedFile < ActiveFedora::File
6
+ include ActiveFedora::WithMetadata, Hyrax::Noid
7
+
8
+ metadata do
9
+ include DCTerms, RdfType, SkosLabels
10
+ configure type: RDF::URI.new('http://pcdm.org/models#File')
11
+ configure type: RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#All')
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbDateCertainty < ActiveRecord::Base
4
+ belongs_to :db_single_date
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbEditorialNote < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbEntry < ActiveRecord::Base
4
+ has_many :db_entry_types
5
+ has_many :db_section_types
6
+ has_many :db_marginalia
7
+ has_many :db_languages
8
+ has_many :db_subjects
9
+ has_many :db_notes
10
+ has_many :db_editorial_notes
11
+ has_many :db_is_referenced_bys
12
+ has_many :db_entry_dates
13
+ has_many :db_related_places
14
+ has_many :db_related_agents
15
+
16
+ def add_rdf_types
17
+ %w[http://dlib.york.ac.uk/ontologies/borthwick-registers#Entry http://www.shared-canvas.org/ns/Zone http://pcdm.org/models#Object]
18
+ end
19
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbEntryDate < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ has_many :db_single_dates
6
+
7
+ def add_rdf_types
8
+ ['http://dlib.york.ac.uk/ontologies/borthwick-registers#EntryDate']
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbEntryType < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbIsReferencedBy < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbLanguage < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbMarginalium < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbNote < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonAsWritten < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonDescriptor < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonDescriptorAsWritten < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonNote < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonRelatedPerson < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonRelatedPlace < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPersonRole < ActiveRecord::Base
4
+ belongs_to :db_related_agent
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPlaceAsWritten < ActiveRecord::Base
4
+ belongs_to :db_related_place
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPlaceNote < ActiveRecord::Base
4
+ belongs_to :db_related_place
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPlaceRole < ActiveRecord::Base
4
+ belongs_to :db_related_place
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbPlaceType < ActiveRecord::Base
4
+ belongs_to :db_related_place
5
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbRelatedAgent < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ has_many :db_person_as_writtens
6
+ has_many :db_person_roles
7
+ has_many :db_person_descriptors
8
+ has_many :db_person_descriptor_as_writtens
9
+ has_many :db_person_notes
10
+ has_many :db_person_related_places
11
+ has_many :db_person_related_people
12
+
13
+ def add_rdf_types_p
14
+ %w[http://dlib.york.ac.uk/ontologies/borthwick-registers#RelatedAgent http://xmlns.com/foaf/0.1/Person]
15
+ end
16
+
17
+ def add_rdf_types_g
18
+ %w[http://dlib.york.ac.uk/ontologies/borthwick-registers#RelatedAgent http://xmlns.com/foaf/0.1/Group]
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbRelatedPlace < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ has_many :db_place_as_writtens
6
+ has_many :db_place_types
7
+ has_many :db_place_roles
8
+ has_many :db_place_notes
9
+
10
+ def add_rdf_types
11
+ %w[http://dlib.york.ac.uk/ontologies/borthwick-registers#RelatedPlace http://schema.org/Place]
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbSectionType < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbSingleDate < ActiveRecord::Base
4
+ belongs_to :db_entry_date
5
+ has_many :db_date_certainties
6
+
7
+ def add_rdf_types
8
+ ['http://dlib.york.ac.uk/ontologies/borthwick-registers#SingleDate']
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DbSubject < ActiveRecord::Base
4
+ belongs_to :db_entry
5
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Entry < ActiveFedora::Base
4
+ include Generic, RdfType, AssignRdfTypes
5
+
6
+ belongs_to :folio, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#folio')
7
+
8
+ has_many :related_agents, dependent: :destroy
9
+ has_many :related_places, dependent: :destroy
10
+ has_many :entry_dates, dependent: :destroy
11
+
12
+ accepts_nested_attributes_for :related_agents, allow_destroy: true, reject_if: :all_blank
13
+ accepts_nested_attributes_for :related_places, allow_destroy: true, reject_if: :all_blank
14
+ accepts_nested_attributes_for :entry_dates, allow_destroy: true, reject_if: :all_blank
15
+
16
+ property :entry_no, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#entryNo'), multiple: false do |index|
17
+ index.as :stored_searchable, :sortable
18
+ end
19
+
20
+ property :entry_type, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#entryType'), multiple: true do |index|
21
+ index.as :stored_searchable
22
+ end
23
+
24
+ property :section_type, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#sectionType'), multiple: true do |index|
25
+ index.as :stored_searchable
26
+ end
27
+
28
+ property :marginalia, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#marginalia'), multiple: true do |index|
29
+ index.as :stored_searchable
30
+ end
31
+
32
+ property :summary, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#summary'), multiple: false do |index|
33
+ index.as :stored_searchable
34
+ end
35
+
36
+ property :language, predicate: ::RDF::URI.new('http://purl.org/dc/terms/language'), multiple: true do |index|
37
+ index.as :stored_searchable
38
+ end
39
+
40
+ property :subject, predicate: ::RDF::URI.new('http://purl.org/dc/terms/subject'), multiple: true do |index|
41
+ index.as :stored_searchable
42
+ end
43
+
44
+ property :note, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#note'), multiple: true do |index|
45
+ index.as :stored_searchable
46
+ end
47
+
48
+ property :editorial_note, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#editorial_note'), multiple: true do |index|
49
+ index.as :stored_searchable
50
+ end
51
+
52
+ property :is_referenced_by, predicate: ::RDF::URI.new('http://purl.org/dc/terms/is_referenced_by'), multiple: true do |index|
53
+ index.as :stored_searchable
54
+ end
55
+
56
+ property :continues_on, predicate: ::RDF::URI.new('http://dlib.york.ac.uk/ontologies/borthwick-registers#continuesOn'), multiple: false do |index|
57
+ index.as :stored_searchable
58
+ end
59
+ end