iiif_print 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/Gemfile.lock +2 -2
  4. data/README.md +4 -0
  5. data/app/actors/iiif_print/actors/file_set_actor_decorator.rb +1 -1
  6. data/app/indexers/concerns/iiif_print/child_work_indexer.rb +27 -0
  7. data/app/indexers/concerns/iiif_print/file_set_indexer.rb +37 -22
  8. data/{lib → app/jobs}/iiif_print/jobs/application_job.rb +2 -1
  9. data/{lib → app/jobs}/iiif_print/jobs/child_works_from_pdf_job.rb +14 -9
  10. data/{lib → app/jobs}/iiif_print/jobs/create_relationships_job.rb +10 -20
  11. data/app/listeners/iiif_print/listener.rb +31 -0
  12. data/app/models/concerns/iiif_print/set_child_flag.rb +1 -1
  13. data/app/models/concerns/iiif_print/solr/document.rb +5 -3
  14. data/app/presenters/iiif_print/file_set_presenter_decorator.rb +11 -0
  15. data/app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb +1 -1
  16. data/app/presenters/iiif_print/work_show_presenter_decorator.rb +5 -2
  17. data/app/services/iiif_print/manifest_builder_service_behavior.rb +4 -2
  18. data/app/services/iiif_print/pluggable_derivative_service.rb +5 -1
  19. data/app/services/iiif_print/simple_schema_loader_decorator.rb +11 -0
  20. data/app/transactions/hyrax/transactions/iiif_print_container_decorator.rb +34 -0
  21. data/app/transactions/hyrax/transactions/steps/conditionally_destroy_children_from_split.rb +32 -0
  22. data/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb +35 -0
  23. data/app/views/hyrax/file_sets/_show_actions.html.erb +1 -1
  24. data/config/initializers/simple_schema_loader.rb +1 -0
  25. data/config/metadata/child_works_from_pdf_splitting.yaml +21 -0
  26. data/db/migrate/20181214181358_create_iiif_print_derivative_attachments.rb +8 -6
  27. data/db/migrate/20190107165909_create_iiif_print_ingest_file_relations.rb +7 -5
  28. data/db/migrate/20230109000000_create_iiif_print_pending_relationships.rb +8 -6
  29. data/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb +3 -3
  30. data/iiif_print.gemspec +1 -1
  31. data/lib/iiif_print/base_derivative_service.rb +13 -2
  32. data/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb +2 -2
  33. data/lib/iiif_print/catalog_search_builder.rb +2 -2
  34. data/lib/iiif_print/configuration.rb +65 -5
  35. data/lib/iiif_print/data/fileset_helper.rb +2 -2
  36. data/lib/iiif_print/data/work_derivatives.rb +1 -1
  37. data/lib/iiif_print/engine.rb +46 -2
  38. data/lib/iiif_print/homepage_search_builder.rb +2 -2
  39. data/lib/iiif_print/jp2_derivative_service.rb +4 -1
  40. data/lib/iiif_print/lineage_service.rb +19 -6
  41. data/lib/iiif_print/pdf_derivative_service.rb +3 -1
  42. data/lib/iiif_print/persistence_layer/active_fedora_adapter.rb +189 -0
  43. data/lib/iiif_print/persistence_layer/valkyrie_adapter.rb +183 -0
  44. data/lib/iiif_print/persistence_layer.rb +118 -0
  45. data/lib/iiif_print/split_pdfs/base_splitter.rb +11 -0
  46. data/lib/iiif_print/split_pdfs/child_work_creation_from_pdf_service.rb +19 -9
  47. data/lib/iiif_print/split_pdfs/destroy_pdf_child_works_service.rb +5 -16
  48. data/lib/iiif_print/text_extraction_derivative_service.rb +4 -2
  49. data/lib/iiif_print/text_formats_from_alto_service.rb +3 -1
  50. data/lib/iiif_print/tiff_derivative_service.rb +3 -1
  51. data/lib/iiif_print/version.rb +1 -1
  52. data/lib/iiif_print.rb +79 -44
  53. metadata +18 -191
  54. data/app/indexers/concerns/iiif_print/child_indexer.rb +0 -40
  55. data/app/views/hyrax/file_sets/_actions.html.erb +0 -46
  56. data/bin/rails +0 -13
  57. data/spec/.keep.txt +0 -1
  58. data/spec/factories/ability.rb +0 -6
  59. data/spec/factories/newspaper_issue.rb +0 -7
  60. data/spec/factories/newspaper_page.rb +0 -7
  61. data/spec/factories/newspaper_page_solr_document.rb +0 -20
  62. data/spec/factories/newspaper_title.rb +0 -8
  63. data/spec/factories/uploaded_pdf_file.rb +0 -9
  64. data/spec/factories/uploaded_txt_file.rb +0 -9
  65. data/spec/factories/user.rb +0 -13
  66. data/spec/fixtures/authorities/licenses.yml +0 -4
  67. data/spec/fixtures/authorities/rights_statements.yml +0 -4
  68. data/spec/fixtures/files/4.1.07.jp2 +0 -0
  69. data/spec/fixtures/files/4.1.07.tiff +0 -0
  70. data/spec/fixtures/files/README.md +0 -7
  71. data/spec/fixtures/files/alto-2-0.xsd +0 -714
  72. data/spec/fixtures/files/broken-truncated.pdf +0 -0
  73. data/spec/fixtures/files/credits.md +0 -16
  74. data/spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff +0 -0
  75. data/spec/fixtures/files/minimal-1-page.pdf +0 -0
  76. data/spec/fixtures/files/minimal-2-page.pdf +0 -0
  77. data/spec/fixtures/files/minimal-alto.xml +0 -31
  78. data/spec/fixtures/files/ndnp-alto-sample.xml +0 -24
  79. data/spec/fixtures/files/ndnp-sample1-json.json +0 -1
  80. data/spec/fixtures/files/ndnp-sample1-txt.txt +0 -1
  81. data/spec/fixtures/files/ndnp-sample1.pdf +0 -0
  82. data/spec/fixtures/files/ocr_alto.xml +0 -202
  83. data/spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml +0 -202
  84. data/spec/fixtures/files/ocr_color.tiff +0 -0
  85. data/spec/fixtures/files/ocr_gray.jp2 +0 -0
  86. data/spec/fixtures/files/ocr_gray.tiff +0 -0
  87. data/spec/fixtures/files/ocr_mono.tiff +0 -0
  88. data/spec/fixtures/files/ocr_mono_text_hocr.html +0 -78
  89. data/spec/fixtures/files/page1.tiff +0 -0
  90. data/spec/fixtures/files/sample-4page-issue.pdf +0 -0
  91. data/spec/fixtures/files/sample-color-newsletter.pdf +0 -0
  92. data/spec/fixtures/files/thumbnail.jpg +0 -0
  93. data/spec/helpers/hyrax/iiif_helper_spec.rb +0 -65
  94. data/spec/helpers/iiif_print_helper_spec.rb +0 -43
  95. data/spec/iiif_print/base_derivative_service_spec.rb +0 -28
  96. data/spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb +0 -59
  97. data/spec/iiif_print/catalog_search_builder_spec.rb +0 -60
  98. data/spec/iiif_print/configuration_spec.rb +0 -193
  99. data/spec/iiif_print/data/work_derivatives_spec.rb +0 -245
  100. data/spec/iiif_print/data/work_file_spec.rb +0 -99
  101. data/spec/iiif_print/data/work_files_spec.rb +0 -237
  102. data/spec/iiif_print/image_tool_spec.rb +0 -109
  103. data/spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb +0 -35
  104. data/spec/iiif_print/jobs/create_relationships_job_spec.rb +0 -118
  105. data/spec/iiif_print/jp2_image_metadata_spec.rb +0 -37
  106. data/spec/iiif_print/lineage_service_spec.rb +0 -13
  107. data/spec/iiif_print/metadata_spec.rb +0 -249
  108. data/spec/iiif_print/split_pdfs/base_splitter_spec.rb +0 -27
  109. data/spec/iiif_print/split_pdfs/derivative_rodeo_splitter_spec.rb +0 -80
  110. data/spec/iiif_print/split_pdfs/destroy_pdf_child_works_service_spec.rb +0 -92
  111. data/spec/iiif_print/split_pdfs/pages_to_jpgs_splitter_spec.rb +0 -22
  112. data/spec/iiif_print/split_pdfs/pages_to_pngs_splitter_spec.rb +0 -18
  113. data/spec/iiif_print/split_pdfs/pages_to_tiffs_splitter_spec.rb +0 -19
  114. data/spec/iiif_print/text_extraction/alto_reader_spec.rb +0 -49
  115. data/spec/iiif_print/text_extraction/hocr_reader_spec.rb +0 -45
  116. data/spec/iiif_print/text_extraction/page_ocr_spec.rb +0 -84
  117. data/spec/iiif_print/text_extraction/render_alto_spec.rb +0 -54
  118. data/spec/iiif_print/text_extraction/word_coords_builder_spec.rb +0 -44
  119. data/spec/iiif_print_spec.rb +0 -171
  120. data/spec/misc_shared.rb +0 -111
  121. data/spec/models/iiif_print/derivative_attachment_spec.rb +0 -37
  122. data/spec/models/iiif_print/iiif_search_decorator_spec.rb +0 -27
  123. data/spec/models/iiif_print/ingest_file_relation_spec.rb +0 -56
  124. data/spec/models/solr_document_spec.rb +0 -14
  125. data/spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb +0 -70
  126. data/spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb +0 -49
  127. data/spec/samvera/derivatives/configuration_spec.rb +0 -41
  128. data/spec/samvera/derivatives/hyrax_spec.rb +0 -62
  129. data/spec/samvera/derivatives_spec.rb +0 -54
  130. data/spec/services/iiif_print/derivative_rodeo_service_spec.rb +0 -103
  131. data/spec/services/iiif_print/jp2_derivative_service_spec.rb +0 -59
  132. data/spec/services/iiif_print/manifest_builder_service_behavior_spec.rb +0 -20
  133. data/spec/services/iiif_print/pdf_derivative_service_spec.rb +0 -66
  134. data/spec/services/iiif_print/pluggable_derivative_service_spec.rb +0 -175
  135. data/spec/services/iiif_print/text_extraction_derivative_service_spec.rb +0 -82
  136. data/spec/services/iiif_print/text_formats_from_alto_service_spec.rb +0 -127
  137. data/spec/services/iiif_print/tiff_derivative_service_spec.rb +0 -65
  138. data/spec/spec_helper.rb +0 -181
  139. data/spec/support/controller_level_helpers.rb +0 -28
  140. data/spec/support/iiif_print_models.rb +0 -127
  141. data/spec/test_app_templates/blacklight.yml +0 -9
  142. data/spec/test_app_templates/fedora.yml +0 -15
  143. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -40
  144. data/spec/test_app_templates/redis.yml +0 -9
  145. data/spec/test_app_templates/solr/conf/schema.xml +0 -362
  146. data/spec/test_app_templates/solr/conf/solrconfig.xml +0 -322
  147. data/spec/test_app_templates/solr.yml +0 -7
  148. /data/{lib → app/jobs}/iiif_print/jobs/request_split_pdf_job.rb +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iiif_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Upton
@@ -363,8 +363,13 @@ files:
363
363
  - app/helpers/iiif_print/iiif_helper_decorator.rb
364
364
  - app/helpers/iiif_print/iiif_print_helper_behavior.rb
365
365
  - app/helpers/iiif_print_helper.rb
366
- - app/indexers/concerns/iiif_print/child_indexer.rb
366
+ - app/indexers/concerns/iiif_print/child_work_indexer.rb
367
367
  - app/indexers/concerns/iiif_print/file_set_indexer.rb
368
+ - app/jobs/iiif_print/jobs/application_job.rb
369
+ - app/jobs/iiif_print/jobs/child_works_from_pdf_job.rb
370
+ - app/jobs/iiif_print/jobs/create_relationships_job.rb
371
+ - app/jobs/iiif_print/jobs/request_split_pdf_job.rb
372
+ - app/listeners/iiif_print/listener.rb
368
373
  - app/mailers/iiif_print/application_mailer.rb
369
374
  - app/models/concerns/iiif_print/set_child_flag.rb
370
375
  - app/models/concerns/iiif_print/solr/document.rb
@@ -374,6 +379,7 @@ files:
374
379
  - app/models/iiif_print/iiif_search_response_decorator.rb
375
380
  - app/models/iiif_print/ingest_file_relation.rb
376
381
  - app/models/iiif_print/pending_relationship.rb
382
+ - app/presenters/iiif_print/file_set_presenter_decorator.rb
377
383
  - app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb
378
384
  - app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb
379
385
  - app/presenters/iiif_print/work_show_presenter_decorator.rb
@@ -384,15 +390,18 @@ files:
384
390
  - app/services/iiif_print/derivative_rodeo_service.rb
385
391
  - app/services/iiif_print/manifest_builder_service_behavior.rb
386
392
  - app/services/iiif_print/pluggable_derivative_service.rb
393
+ - app/services/iiif_print/simple_schema_loader_decorator.rb
394
+ - app/transactions/hyrax/transactions/iiif_print_container_decorator.rb
395
+ - app/transactions/hyrax/transactions/steps/conditionally_destroy_children_from_split.rb
396
+ - app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb
387
397
  - app/views/catalog/_index_header_list_default.html.erb
388
398
  - app/views/catalog/_snippets_more.html.erb
389
399
  - app/views/hyrax/base/_representative_media.html.erb
390
400
  - app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb
391
- - app/views/hyrax/file_sets/_actions.html.erb
392
401
  - app/views/hyrax/file_sets/_show_actions.html.erb
393
- - bin/rails
394
402
  - config/fcrepo_wrapper_test.yml
395
403
  - config/initializers/assets.rb
404
+ - config/initializers/simple_schema_loader.rb
396
405
  - config/locales/iiif_print.de.yml
397
406
  - config/locales/iiif_print.en.yml
398
407
  - config/locales/iiif_print.es.yml
@@ -400,6 +409,7 @@ files:
400
409
  - config/locales/iiif_print.it.yml
401
410
  - config/locales/iiif_print.pt-BR.yml
402
411
  - config/locales/iiif_print.zh.yml
412
+ - config/metadata/child_works_from_pdf_splitting.yaml
403
413
  - config/routes.rb
404
414
  - config/solr_wrapper_test.yml
405
415
  - config/test-fixture/solr-config/_rest_managed.json
@@ -447,15 +457,14 @@ files:
447
457
  - lib/iiif_print/errors.rb
448
458
  - lib/iiif_print/homepage_search_builder.rb
449
459
  - lib/iiif_print/image_tool.rb
450
- - lib/iiif_print/jobs/application_job.rb
451
- - lib/iiif_print/jobs/child_works_from_pdf_job.rb
452
- - lib/iiif_print/jobs/create_relationships_job.rb
453
- - lib/iiif_print/jobs/request_split_pdf_job.rb
454
460
  - lib/iiif_print/jp2_derivative_service.rb
455
461
  - lib/iiif_print/jp2_image_metadata.rb
456
462
  - lib/iiif_print/lineage_service.rb
457
463
  - lib/iiif_print/metadata.rb
458
464
  - lib/iiif_print/pdf_derivative_service.rb
465
+ - lib/iiif_print/persistence_layer.rb
466
+ - lib/iiif_print/persistence_layer/active_fedora_adapter.rb
467
+ - lib/iiif_print/persistence_layer/valkyrie_adapter.rb
459
468
  - lib/iiif_print/split_pdfs/base_splitter.rb
460
469
  - lib/iiif_print/split_pdfs/child_work_creation_from_pdf_service.rb
461
470
  - lib/iiif_print/split_pdfs/derivative_rodeo_splitter.rb
@@ -479,97 +488,6 @@ files:
479
488
  - lib/samvera/derivatives/configuration.rb
480
489
  - lib/samvera/derivatives/hyrax.rb
481
490
  - lib/tasks/set_child_works.rake
482
- - spec/.keep.txt
483
- - spec/factories/ability.rb
484
- - spec/factories/newspaper_issue.rb
485
- - spec/factories/newspaper_page.rb
486
- - spec/factories/newspaper_page_solr_document.rb
487
- - spec/factories/newspaper_title.rb
488
- - spec/factories/uploaded_pdf_file.rb
489
- - spec/factories/uploaded_txt_file.rb
490
- - spec/factories/user.rb
491
- - spec/fixtures/authorities/licenses.yml
492
- - spec/fixtures/authorities/rights_statements.yml
493
- - spec/fixtures/files/4.1.07.jp2
494
- - spec/fixtures/files/4.1.07.tiff
495
- - spec/fixtures/files/README.md
496
- - spec/fixtures/files/alto-2-0.xsd
497
- - spec/fixtures/files/broken-truncated.pdf
498
- - spec/fixtures/files/credits.md
499
- - spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff
500
- - spec/fixtures/files/minimal-1-page.pdf
501
- - spec/fixtures/files/minimal-2-page.pdf
502
- - spec/fixtures/files/minimal-alto.xml
503
- - spec/fixtures/files/ndnp-alto-sample.xml
504
- - spec/fixtures/files/ndnp-sample1-json.json
505
- - spec/fixtures/files/ndnp-sample1-txt.txt
506
- - spec/fixtures/files/ndnp-sample1.pdf
507
- - spec/fixtures/files/ocr_alto.xml
508
- - spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml
509
- - spec/fixtures/files/ocr_color.tiff
510
- - spec/fixtures/files/ocr_gray.jp2
511
- - spec/fixtures/files/ocr_gray.tiff
512
- - spec/fixtures/files/ocr_mono.tiff
513
- - spec/fixtures/files/ocr_mono_text_hocr.html
514
- - spec/fixtures/files/page1.tiff
515
- - spec/fixtures/files/sample-4page-issue.pdf
516
- - spec/fixtures/files/sample-color-newsletter.pdf
517
- - spec/fixtures/files/thumbnail.jpg
518
- - spec/helpers/hyrax/iiif_helper_spec.rb
519
- - spec/helpers/iiif_print_helper_spec.rb
520
- - spec/iiif_print/base_derivative_service_spec.rb
521
- - spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb
522
- - spec/iiif_print/catalog_search_builder_spec.rb
523
- - spec/iiif_print/configuration_spec.rb
524
- - spec/iiif_print/data/work_derivatives_spec.rb
525
- - spec/iiif_print/data/work_file_spec.rb
526
- - spec/iiif_print/data/work_files_spec.rb
527
- - spec/iiif_print/image_tool_spec.rb
528
- - spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb
529
- - spec/iiif_print/jobs/create_relationships_job_spec.rb
530
- - spec/iiif_print/jp2_image_metadata_spec.rb
531
- - spec/iiif_print/lineage_service_spec.rb
532
- - spec/iiif_print/metadata_spec.rb
533
- - spec/iiif_print/split_pdfs/base_splitter_spec.rb
534
- - spec/iiif_print/split_pdfs/derivative_rodeo_splitter_spec.rb
535
- - spec/iiif_print/split_pdfs/destroy_pdf_child_works_service_spec.rb
536
- - spec/iiif_print/split_pdfs/pages_to_jpgs_splitter_spec.rb
537
- - spec/iiif_print/split_pdfs/pages_to_pngs_splitter_spec.rb
538
- - spec/iiif_print/split_pdfs/pages_to_tiffs_splitter_spec.rb
539
- - spec/iiif_print/text_extraction/alto_reader_spec.rb
540
- - spec/iiif_print/text_extraction/hocr_reader_spec.rb
541
- - spec/iiif_print/text_extraction/page_ocr_spec.rb
542
- - spec/iiif_print/text_extraction/render_alto_spec.rb
543
- - spec/iiif_print/text_extraction/word_coords_builder_spec.rb
544
- - spec/iiif_print_spec.rb
545
- - spec/misc_shared.rb
546
- - spec/models/iiif_print/derivative_attachment_spec.rb
547
- - spec/models/iiif_print/iiif_search_decorator_spec.rb
548
- - spec/models/iiif_print/ingest_file_relation_spec.rb
549
- - spec/models/solr_document_spec.rb
550
- - spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb
551
- - spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb
552
- - spec/samvera/derivatives/configuration_spec.rb
553
- - spec/samvera/derivatives/hyrax_spec.rb
554
- - spec/samvera/derivatives_spec.rb
555
- - spec/services/iiif_print/derivative_rodeo_service_spec.rb
556
- - spec/services/iiif_print/jp2_derivative_service_spec.rb
557
- - spec/services/iiif_print/manifest_builder_service_behavior_spec.rb
558
- - spec/services/iiif_print/pdf_derivative_service_spec.rb
559
- - spec/services/iiif_print/pluggable_derivative_service_spec.rb
560
- - spec/services/iiif_print/text_extraction_derivative_service_spec.rb
561
- - spec/services/iiif_print/text_formats_from_alto_service_spec.rb
562
- - spec/services/iiif_print/tiff_derivative_service_spec.rb
563
- - spec/spec_helper.rb
564
- - spec/support/controller_level_helpers.rb
565
- - spec/support/iiif_print_models.rb
566
- - spec/test_app_templates/blacklight.yml
567
- - spec/test_app_templates/fedora.yml
568
- - spec/test_app_templates/lib/generators/test_app_generator.rb
569
- - spec/test_app_templates/redis.yml
570
- - spec/test_app_templates/solr.yml
571
- - spec/test_app_templates/solr/conf/schema.xml
572
- - spec/test_app_templates/solr/conf/solrconfig.xml
573
491
  - tasks/copy_authorities_to_test_app.rake
574
492
  - tasks/iiif_print_dev.rake
575
493
  - tmp/.keep
@@ -599,95 +517,4 @@ summary: IiifPrint is a gem (Rails "engine") for Hyrax-based digital repository
599
517
  to support displaying parent/child works in the same viewer (Universal Viewer) and
600
518
  the ability to search OCR from the parent work to the child work(s). IiifPring was
601
519
  originally based off of the samvera-labs Newspaper gem.
602
- test_files:
603
- - spec/.keep.txt
604
- - spec/factories/ability.rb
605
- - spec/factories/newspaper_issue.rb
606
- - spec/factories/newspaper_page.rb
607
- - spec/factories/newspaper_page_solr_document.rb
608
- - spec/factories/newspaper_title.rb
609
- - spec/factories/uploaded_pdf_file.rb
610
- - spec/factories/uploaded_txt_file.rb
611
- - spec/factories/user.rb
612
- - spec/fixtures/authorities/licenses.yml
613
- - spec/fixtures/authorities/rights_statements.yml
614
- - spec/fixtures/files/4.1.07.jp2
615
- - spec/fixtures/files/4.1.07.tiff
616
- - spec/fixtures/files/README.md
617
- - spec/fixtures/files/alto-2-0.xsd
618
- - spec/fixtures/files/broken-truncated.pdf
619
- - spec/fixtures/files/credits.md
620
- - spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff
621
- - spec/fixtures/files/minimal-1-page.pdf
622
- - spec/fixtures/files/minimal-2-page.pdf
623
- - spec/fixtures/files/minimal-alto.xml
624
- - spec/fixtures/files/ndnp-alto-sample.xml
625
- - spec/fixtures/files/ndnp-sample1-json.json
626
- - spec/fixtures/files/ndnp-sample1-txt.txt
627
- - spec/fixtures/files/ndnp-sample1.pdf
628
- - spec/fixtures/files/ocr_alto.xml
629
- - spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml
630
- - spec/fixtures/files/ocr_color.tiff
631
- - spec/fixtures/files/ocr_gray.jp2
632
- - spec/fixtures/files/ocr_gray.tiff
633
- - spec/fixtures/files/ocr_mono.tiff
634
- - spec/fixtures/files/ocr_mono_text_hocr.html
635
- - spec/fixtures/files/page1.tiff
636
- - spec/fixtures/files/sample-4page-issue.pdf
637
- - spec/fixtures/files/sample-color-newsletter.pdf
638
- - spec/fixtures/files/thumbnail.jpg
639
- - spec/helpers/hyrax/iiif_helper_spec.rb
640
- - spec/helpers/iiif_print_helper_spec.rb
641
- - spec/iiif_print/base_derivative_service_spec.rb
642
- - spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb
643
- - spec/iiif_print/catalog_search_builder_spec.rb
644
- - spec/iiif_print/configuration_spec.rb
645
- - spec/iiif_print/data/work_derivatives_spec.rb
646
- - spec/iiif_print/data/work_file_spec.rb
647
- - spec/iiif_print/data/work_files_spec.rb
648
- - spec/iiif_print/image_tool_spec.rb
649
- - spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb
650
- - spec/iiif_print/jobs/create_relationships_job_spec.rb
651
- - spec/iiif_print/jp2_image_metadata_spec.rb
652
- - spec/iiif_print/lineage_service_spec.rb
653
- - spec/iiif_print/metadata_spec.rb
654
- - spec/iiif_print/split_pdfs/base_splitter_spec.rb
655
- - spec/iiif_print/split_pdfs/derivative_rodeo_splitter_spec.rb
656
- - spec/iiif_print/split_pdfs/destroy_pdf_child_works_service_spec.rb
657
- - spec/iiif_print/split_pdfs/pages_to_jpgs_splitter_spec.rb
658
- - spec/iiif_print/split_pdfs/pages_to_pngs_splitter_spec.rb
659
- - spec/iiif_print/split_pdfs/pages_to_tiffs_splitter_spec.rb
660
- - spec/iiif_print/text_extraction/alto_reader_spec.rb
661
- - spec/iiif_print/text_extraction/hocr_reader_spec.rb
662
- - spec/iiif_print/text_extraction/page_ocr_spec.rb
663
- - spec/iiif_print/text_extraction/render_alto_spec.rb
664
- - spec/iiif_print/text_extraction/word_coords_builder_spec.rb
665
- - spec/iiif_print_spec.rb
666
- - spec/misc_shared.rb
667
- - spec/models/iiif_print/derivative_attachment_spec.rb
668
- - spec/models/iiif_print/iiif_search_decorator_spec.rb
669
- - spec/models/iiif_print/ingest_file_relation_spec.rb
670
- - spec/models/solr_document_spec.rb
671
- - spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb
672
- - spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb
673
- - spec/samvera/derivatives/configuration_spec.rb
674
- - spec/samvera/derivatives/hyrax_spec.rb
675
- - spec/samvera/derivatives_spec.rb
676
- - spec/services/iiif_print/derivative_rodeo_service_spec.rb
677
- - spec/services/iiif_print/jp2_derivative_service_spec.rb
678
- - spec/services/iiif_print/manifest_builder_service_behavior_spec.rb
679
- - spec/services/iiif_print/pdf_derivative_service_spec.rb
680
- - spec/services/iiif_print/pluggable_derivative_service_spec.rb
681
- - spec/services/iiif_print/text_extraction_derivative_service_spec.rb
682
- - spec/services/iiif_print/text_formats_from_alto_service_spec.rb
683
- - spec/services/iiif_print/tiff_derivative_service_spec.rb
684
- - spec/spec_helper.rb
685
- - spec/support/controller_level_helpers.rb
686
- - spec/support/iiif_print_models.rb
687
- - spec/test_app_templates/blacklight.yml
688
- - spec/test_app_templates/fedora.yml
689
- - spec/test_app_templates/lib/generators/test_app_generator.rb
690
- - spec/test_app_templates/redis.yml
691
- - spec/test_app_templates/solr.yml
692
- - spec/test_app_templates/solr/conf/schema.xml
693
- - spec/test_app_templates/solr/conf/solrconfig.xml
520
+ test_files: []
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module IiifPrint
4
- module ChildIndexer
5
- ##
6
- # @api private
7
- #
8
- # The goal of this method is to encapsulate the logic for what all we need for child
9
- # relationships.
10
- def self.decorate_work_types!
11
- # TODO: This method is in the wrong location; says indexing but there's also the SetChildFlag
12
- # consideration. Consider refactoring this stuff into a single nested module.
13
- #
14
-
15
- Hyrax.config.curation_concerns.each do |work_type|
16
- work_type.send(:include, IiifPrint::SetChildFlag) unless work_type.included_modules.include?(IiifPrint::SetChildFlag)
17
- indexer = work_type.indexer
18
- unless indexer.respond_to?(:iiif_print_lineage_service)
19
- indexer.prepend(self)
20
- indexer.class_attribute(:iiif_print_lineage_service, default: IiifPrint::LineageService)
21
- end
22
- work_type::GeneratedResourceSchema.send(:include, IiifPrint::SetChildFlag) if work_type.const_defined?(:GeneratedResourceSchema)
23
- end
24
- end
25
-
26
- def generate_solr_document
27
- super.tap do |solr_doc|
28
- solr_doc['is_child_bsi'] ||= object.is_child
29
- solr_doc['split_from_pdf_id_ssi'] ||= object.split_from_pdf_id
30
- solr_doc['is_page_of_ssim'] = iiif_print_lineage_service.ancestor_ids_for(object)
31
-
32
- # Due to a long-standing hack in Hyrax, the file_set_ids_ssim contains both file_set_ids and
33
- # child work ids.
34
- #
35
- # See https://github.com/samvera/hyrax/blob/2b807fe101176d594129ef8a8fe466d3d03a372b/app/indexers/hyrax/work_indexer.rb#L15-L18
36
- solr_doc['file_set_ids_ssim'] = iiif_print_lineage_service.descendent_member_ids_for(object)
37
- end
38
- end
39
- end
40
- end
@@ -1,46 +0,0 @@
1
- <div class="btn-group">
2
-
3
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= file_set.id %>" aria-haspopup="true">
4
- <span class="sr-only">Press to </span>
5
- Select an action
6
- <span class="caret" aria-hidden="true"></span>
7
- </button>
8
-
9
- <ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= file_set.id %>">
10
- <% if can?(:edit, file_set.id) %>
11
- <li role="menuitem" tabindex="-1">
12
- <%= link_to 'Edit', edit_polymorphic_path([main_app, file_set]),
13
- { title: "Edit #{file_set}" } %>
14
- </li>
15
-
16
- <li role="menuitem" tabindex="-1">
17
- <%= link_to 'Versions', edit_polymorphic_path([main_app, file_set], anchor: 'versioning_display'),
18
- { title: "Display previous versions" } %>
19
- </li>
20
- <% end %>
21
-
22
- <% if can?(:destroy, file_set.id) %>
23
- <li role="menuitem" tabindex="-1">
24
- <%= link_to 'Delete', polymorphic_path([main_app, file_set]),
25
- method: :delete, title: "Delete #{file_set}",
26
- data: {confirm: "Deleting #{file_set} from #{application_name} is permanent. Click OK to delete this from #{application_name}, or Cancel to cancel this operation"} %>
27
- </li>
28
- <% end %>
29
-
30
- <% if can?(:download, file_set.id) %>
31
- <li role="menuitem" tabindex="-1">
32
- <%= link_to 'Download', hyrax.download_path(file_set),
33
- title: "Download #{file_set.to_s.inspect}", target: "_blank" %>
34
- </li>
35
- <% work_deriv = IiifPrint::Data::WorkDerivatives.new(fileset: file_set) %>
36
- <% work_deriv.keys.each do |name| %>
37
- <li role="menuitem" tabindex="-1">
38
- <a href="<%= "/downloads/#{file_set.id}?locale=en&file=#{name}" %>" download>
39
- Download <em>(as <%= name %>)</em>
40
- </a>
41
- </li>
42
- <% end %>
43
- <% end %>
44
-
45
- </ul>
46
- </div>
data/bin/rails DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails gems
3
- # installed from the root of your application.
4
-
5
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
6
- ENGINE_PATH = File.expand_path('../../lib/iiif_print/engine', __FILE__)
7
-
8
- # Set up gems listed in the Gemfile.
9
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
10
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
11
-
12
- require 'rails/all'
13
- require 'rails/engine/commands'
data/spec/.keep.txt DELETED
@@ -1 +0,0 @@
1
- spec dir for RSpec
@@ -1,6 +0,0 @@
1
- FactoryBot.define do
2
- factory :ability do
3
- user
4
- initialize_with { new(user) }
5
- end
6
- end
@@ -1,7 +0,0 @@
1
- # will infer, create a NewspaperIssue object
2
- FactoryBot.define do
3
- factory :newspaper_issue do
4
- title { ['Here and There'] }
5
- depositor { User.batch_user.user_key }
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- # will infer, create a NewspaperPage object
2
- FactoryBot.define do
3
- factory :newspaper_page do
4
- title { ['Here and There'] }
5
- depositor { User.batch_user.user_key }
6
- end
7
- end
@@ -1,20 +0,0 @@
1
- FactoryBot.define do
2
- factory :file_set_solr_document, class: SolrDocument do
3
- initialize_with do
4
- new(id: 'fs123456',
5
- has_model_ssim: ['FileSet'])
6
- end
7
- end
8
-
9
- factory :newspaper_page_solr_document, class: SolrDocument do
10
- initialize_with do
11
- file_set = build(:file_set_solr_document)
12
- new(id: '123456',
13
- title_tesim: ['Page 1'],
14
- has_model_ssim: ['NewspaperPage'],
15
- issue_id_ssi: 'abc123',
16
- file_set_ids_ssim: [file_set.id],
17
- thumbnail_path_ss: '/downloads/123456?file=thumbnail')
18
- end
19
- end
20
- end
@@ -1,8 +0,0 @@
1
- # will infer, create a NewspaperTitle object
2
- FactoryBot.define do
3
- factory :newspaper_title do
4
- title { ['ACME Press'] }
5
- lccn { 'sn2036999999' }
6
- depositor { User.batch_user.user_key }
7
- end
8
- end
@@ -1,9 +0,0 @@
1
- FactoryBot.define do
2
- factory :uploaded_pdf_file, class: Hyrax::UploadedFile do
3
- initialize_with do
4
- base = File.join(IiifPrint::GEM_PATH, 'spec', 'fixtures', 'files')
5
- pdf_path = File.join(base, 'minimal-2-page.pdf')
6
- new(file: File.open(pdf_path), user: create(:user))
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- FactoryBot.define do
2
- factory :uploaded_txt_file, class: Hyrax::UploadedFile do
3
- initialize_with do
4
- base = File.join(IiifPrint::GEM_PATH, 'spec', 'fixtures', 'files')
5
- file_path = File.join(base, 'ndnp-sample1-txt.txt')
6
- new(file: File.open(file_path), user: create(:user))
7
- end
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- FactoryBot.define do
2
- factory :user do
3
- id { "skroob" }
4
- email { "spaceballs@example.com" }
5
- password { "password_is_12345" }
6
- initialize_with do
7
- User.find_or_create_by(id: id) do |user|
8
- user.email = email
9
- user.password = password
10
- end
11
- end
12
- end
13
- end
@@ -1,4 +0,0 @@
1
- terms:
2
- - id: https://creativecommons.org/licenses/by-sa/4.0/
3
- term: Creative Commons BY-SA Attribution-ShareAlike 4.0 International
4
- active: true
@@ -1,4 +0,0 @@
1
- terms:
2
- - id: http://rightsstatements.org/vocab/InC-OW-EU/1.0/
3
- term: "In Copyright - EU Orphan Work"
4
- active: true
Binary file
Binary file
@@ -1,7 +0,0 @@
1
- ## Sample / fixture file manifest
2
-
3
- * sample-4page-issue.pdf
4
- - original: chicopee-weekly-journal_1856-05-24-p1.pdf
5
- * page1.tiff
6
- - first page from sample-4page-issue.pdf, converted to CCITT Group 4
7
- encoded (lossless compressed) TIFF via Ghostscript.