newspaper_works 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (461) hide show
  1. checksums.yaml +7 -0
  2. data/.fcrepo_wrapper +4 -0
  3. data/.gitignore +43 -0
  4. data/.rubocop.yml +143 -0
  5. data/.solr_wrapper +8 -0
  6. data/.travis.yml +50 -0
  7. data/Gemfile +47 -0
  8. data/LICENSE +203 -0
  9. data/README.md +159 -0
  10. data/Rakefile +38 -0
  11. data/app/actors/hyrax/actors/newspaper_article_actor.rb +8 -0
  12. data/app/actors/hyrax/actors/newspaper_container_actor.rb +8 -0
  13. data/app/actors/hyrax/actors/newspaper_issue_actor.rb +8 -0
  14. data/app/actors/hyrax/actors/newspaper_page_actor.rb +8 -0
  15. data/app/actors/hyrax/actors/newspaper_title_actor.rb +8 -0
  16. data/app/actors/newspaper_works/actors/newspaper_works_upload_actor.rb +88 -0
  17. data/app/assets/config/newspaper_works_manifest.js +2 -0
  18. data/app/assets/images/newspaper_works/.keep +0 -0
  19. data/app/assets/javascripts/newspaper_works/autocomplete_fix.js +33 -0
  20. data/app/assets/javascripts/newspaper_works/ocr_search.js.erb +6 -0
  21. data/app/assets/javascripts/newspaper_works/thumbnail_highlights.js.erb +102 -0
  22. data/app/assets/javascripts/newspaper_works.js +4 -0
  23. data/app/assets/stylesheets/newspaper_works/_issue_search.scss +13 -0
  24. data/app/assets/stylesheets/newspaper_works/_issues_calendar.scss +18 -0
  25. data/app/assets/stylesheets/newspaper_works/_newspaper_works.scss +4 -0
  26. data/app/assets/stylesheets/newspaper_works/_newspapers_search.scss +38 -0
  27. data/app/assets/stylesheets/newspaper_works/_search_results.scss +12 -0
  28. data/app/controllers/hyrax/newspaper_articles_controller.rb +14 -0
  29. data/app/controllers/hyrax/newspaper_containers_controller.rb +14 -0
  30. data/app/controllers/hyrax/newspaper_issues_controller.rb +14 -0
  31. data/app/controllers/hyrax/newspaper_pages_controller.rb +14 -0
  32. data/app/controllers/hyrax/newspaper_titles_controller.rb +13 -0
  33. data/app/controllers/newspaper_works/newspapers_controller.rb +117 -0
  34. data/app/controllers/newspaper_works/newspapers_search_controller.rb +26 -0
  35. data/app/forms/hyrax/newspaper_article_form.rb +11 -0
  36. data/app/forms/hyrax/newspaper_container_form.rb +11 -0
  37. data/app/forms/hyrax/newspaper_issue_form.rb +11 -0
  38. data/app/forms/hyrax/newspaper_page_form.rb +15 -0
  39. data/app/forms/hyrax/newspaper_title_form.rb +12 -0
  40. data/app/forms/newspaper_works/newspaper_core_form_data.rb +17 -0
  41. data/app/helpers/hyrax/newspaper_articles_helper.rb +5 -0
  42. data/app/helpers/hyrax/newspaper_containers_helper.rb +5 -0
  43. data/app/helpers/hyrax/newspaper_issues_helper.rb +5 -0
  44. data/app/helpers/hyrax/newspaper_pages_helper.rb +5 -0
  45. data/app/helpers/newspaper_works/application_helper.rb +5 -0
  46. data/app/helpers/newspaper_works/breadcrumb_helper.rb +92 -0
  47. data/app/helpers/newspaper_works/newspaper_works_helper_behavior.rb +103 -0
  48. data/app/helpers/newspaper_works/newspapers_helper.rb +5 -0
  49. data/app/indexers/concerns/newspaper_works/indexes_full_text.rb +17 -0
  50. data/app/indexers/concerns/newspaper_works/indexes_place_of_publication.rb +67 -0
  51. data/app/indexers/concerns/newspaper_works/indexes_publication_date_range.rb +35 -0
  52. data/app/indexers/concerns/newspaper_works/indexes_relationships.rb +125 -0
  53. data/app/indexers/newspaper_article_indexer.rb +16 -0
  54. data/app/indexers/newspaper_container_indexer.rb +18 -0
  55. data/app/indexers/newspaper_issue_indexer.rb +26 -0
  56. data/app/indexers/newspaper_page_indexer.rb +9 -0
  57. data/app/indexers/newspaper_title_indexer.rb +19 -0
  58. data/app/indexers/newspaper_works/newspaper_core_indexer.rb +21 -0
  59. data/app/jobs/newspaper_works/application_job.rb +4 -0
  60. data/app/jobs/newspaper_works/compose_issue_pdf_job.rb +13 -0
  61. data/app/jobs/newspaper_works/create_issue_pages_job.rb +19 -0
  62. data/app/mailers/newspaper_works/application_mailer.rb +8 -0
  63. data/app/models/concerns/newspaper_works/blacklight_iiif_search/annotation_behavior.rb +82 -0
  64. data/app/models/concerns/newspaper_works/blacklight_iiif_search/search_behavior.rb +27 -0
  65. data/app/models/concerns/newspaper_works/newspaper_core_metadata.rb +67 -0
  66. data/app/models/concerns/newspaper_works/place_of_publication_behavior.rb +15 -0
  67. data/app/models/concerns/newspaper_works/scanned_media_metadata.rb +43 -0
  68. data/app/models/concerns/newspaper_works/solr/document.rb +25 -0
  69. data/app/models/file_set.rb +10 -0
  70. data/app/models/newspaper_article.rb +158 -0
  71. data/app/models/newspaper_container.rb +86 -0
  72. data/app/models/newspaper_issue.rb +115 -0
  73. data/app/models/newspaper_page.rb +70 -0
  74. data/app/models/newspaper_title.rb +111 -0
  75. data/app/models/newspaper_works/application_record.rb +6 -0
  76. data/app/models/newspaper_works/derivative_attachment.rb +8 -0
  77. data/app/models/newspaper_works/ingest_file_relation.rb +14 -0
  78. data/app/presenters/hyrax/newspaper_article_presenter.rb +38 -0
  79. data/app/presenters/hyrax/newspaper_container_presenter.rb +11 -0
  80. data/app/presenters/hyrax/newspaper_issue_presenter.rb +62 -0
  81. data/app/presenters/hyrax/newspaper_page_presenter.rb +72 -0
  82. data/app/presenters/hyrax/newspaper_title_presenter.rb +86 -0
  83. data/app/presenters/newspaper_works/iiif_manifest_presenter_behavior.rb +29 -0
  84. data/app/presenters/newspaper_works/issue_info_presenter.rb +29 -0
  85. data/app/presenters/newspaper_works/newspaper_core_presenter.rb +9 -0
  86. data/app/presenters/newspaper_works/persistent_url_presenter_behavior.rb +16 -0
  87. data/app/presenters/newspaper_works/place_of_publication_presenter_behavior.rb +8 -0
  88. data/app/presenters/newspaper_works/scanned_media_presenter.rb +7 -0
  89. data/app/presenters/newspaper_works/title_info_presenter.rb +13 -0
  90. data/app/search_builders/concerns/newspaper_works/exclude_models.rb +16 -0
  91. data/app/search_builders/concerns/newspaper_works/highlight_search_params.rb +14 -0
  92. data/app/search_builders/newspaper_works/newspapers_search_builder.rb +26 -0
  93. data/app/services/hyrax/article_genre_service.rb +9 -0
  94. data/app/services/newspaper_works/jp2_derivative_service.rb +120 -0
  95. data/app/services/newspaper_works/newspaper_page_derivative_service.rb +91 -0
  96. data/app/services/newspaper_works/pdf_derivative_service.rb +45 -0
  97. data/app/services/newspaper_works/pluggable_derivative_service.rb +114 -0
  98. data/app/services/newspaper_works/text_extraction_derivative_service.rb +56 -0
  99. data/app/services/newspaper_works/text_formats_from_alto_service.rb +77 -0
  100. data/app/services/newspaper_works/tiff_derivative_service.rb +54 -0
  101. data/app/validators/newspaper_works/publication_date_start_end_validator.rb +48 -0
  102. data/app/validators/newspaper_works/publication_date_validator.rb +16 -0
  103. data/app/views/catalog/_index_gallery_newspaper_article_wrapper.html.erb +9 -0
  104. data/app/views/catalog/_index_gallery_newspaper_page_wrapper.html.erb +9 -0
  105. data/app/views/catalog/_index_header_gallery_newspaper_article.html.erb +23 -0
  106. data/app/views/catalog/_index_header_gallery_newspaper_page.html.erb +23 -0
  107. data/app/views/catalog/_index_header_list_newspaper_article.html.erb +7 -0
  108. data/app/views/catalog/_index_header_list_newspaper_page.html.erb +7 -0
  109. data/app/views/catalog/_snippets_more.html.erb +16 -0
  110. data/app/views/catalog/_thumbnail_list_newspaper_article.html.erb +6 -0
  111. data/app/views/catalog/_thumbnail_list_newspaper_page.html.erb +6 -0
  112. data/app/views/hyrax/file_sets/_actions.html.erb +45 -0
  113. data/app/views/hyrax/newspaper_articles/_newspaper_article.html.erb +2 -0
  114. data/app/views/hyrax/newspaper_articles/show.html.erb +1 -0
  115. data/app/views/hyrax/newspaper_containers/_newspaper_container.html.erb +2 -0
  116. data/app/views/hyrax/newspaper_containers/show.html.erb +1 -0
  117. data/app/views/hyrax/newspaper_issues/_newspaper_issue.html.erb +2 -0
  118. data/app/views/hyrax/newspaper_issues/show.html.erb +1 -0
  119. data/app/views/hyrax/newspaper_pages/_newspaper_page.html.erb +2 -0
  120. data/app/views/hyrax/newspaper_pages/show.html.erb +1 -0
  121. data/app/views/hyrax/newspaper_titles/_all_front_pages_form.html.erb +5 -0
  122. data/app/views/hyrax/newspaper_titles/_issue_search_form.html.erb +33 -0
  123. data/app/views/hyrax/newspaper_titles/_issues_calendar.html.erb +63 -0
  124. data/app/views/hyrax/newspaper_titles/_newspaper_title.html.erb +2 -0
  125. data/app/views/hyrax/newspaper_titles/show.html.erb +54 -0
  126. data/app/views/newspaper_works/base/_attribute_rows.html.erb +42 -0
  127. data/app/views/newspaper_works/base/_attributes.html.erb +16 -0
  128. data/app/views/newspaper_works/base/_metadata.html.erb +6 -0
  129. data/app/views/newspaper_works/base/_newspaper_hierarchy.html.erb +14 -0
  130. data/app/views/newspaper_works/base/_persistent_url.html.erb +1 -0
  131. data/app/views/newspaper_works/base/_show.html.erb +45 -0
  132. data/app/views/newspaper_works/newspapers_search/_date_fields.html.erb +29 -0
  133. data/app/views/newspaper_works/newspapers_search/_facet_layout.html.erb +8 -0
  134. data/app/views/newspaper_works/newspapers_search/_facet_limit.html.erb +17 -0
  135. data/app/views/newspaper_works/newspapers_search/_front_pages_input.html.erb +5 -0
  136. data/app/views/newspaper_works/newspapers_search/_keyword_input.html.erb +18 -0
  137. data/app/views/newspaper_works/newspapers_search/_newspapers_facets.html.erb +5 -0
  138. data/app/views/newspaper_works/newspapers_search/_newspapers_search_form.html.erb +13 -0
  139. data/app/views/newspaper_works/newspapers_search/_newspapers_search_help.html.erb +8 -0
  140. data/app/views/newspaper_works/newspapers_search/search.html.erb +13 -0
  141. data/app/views/records/edit_fields/_alternate_title.html.erb +4 -0
  142. data/app/views/records/edit_fields/_genre.html.erb +4 -0
  143. data/app/views/records/edit_fields/_place_of_publication.html.erb +14 -0
  144. data/app/views/records/edit_fields/_subtitle.html.erb +4 -0
  145. data/bin/rails +13 -0
  146. data/config/fcrepo_wrapper_test.yml +5 -0
  147. data/config/initializers/assets.rb +2 -0
  148. data/config/locales/newspaper_article.de.yml +12 -0
  149. data/config/locales/newspaper_article.en.yml +12 -0
  150. data/config/locales/newspaper_article.es.yml +12 -0
  151. data/config/locales/newspaper_article.fr.yml +12 -0
  152. data/config/locales/newspaper_article.it.yml +12 -0
  153. data/config/locales/newspaper_article.pt-BR.yml +12 -0
  154. data/config/locales/newspaper_article.zh.yml +12 -0
  155. data/config/locales/newspaper_container.de.yml +8 -0
  156. data/config/locales/newspaper_container.en.yml +8 -0
  157. data/config/locales/newspaper_container.es.yml +8 -0
  158. data/config/locales/newspaper_container.fr.yml +8 -0
  159. data/config/locales/newspaper_container.it.yml +8 -0
  160. data/config/locales/newspaper_container.pt-BR.yml +8 -0
  161. data/config/locales/newspaper_container.zh.yml +8 -0
  162. data/config/locales/newspaper_issue.de.yml +8 -0
  163. data/config/locales/newspaper_issue.en.yml +8 -0
  164. data/config/locales/newspaper_issue.es.yml +8 -0
  165. data/config/locales/newspaper_issue.fr.yml +8 -0
  166. data/config/locales/newspaper_issue.it.yml +8 -0
  167. data/config/locales/newspaper_issue.pt-BR.yml +8 -0
  168. data/config/locales/newspaper_issue.zh.yml +8 -0
  169. data/config/locales/newspaper_page.de.yml +15 -0
  170. data/config/locales/newspaper_page.en.yml +15 -0
  171. data/config/locales/newspaper_page.es.yml +15 -0
  172. data/config/locales/newspaper_page.fr.yml +15 -0
  173. data/config/locales/newspaper_page.it.yml +15 -0
  174. data/config/locales/newspaper_page.pt-BR.yml +15 -0
  175. data/config/locales/newspaper_page.zh.yml +15 -0
  176. data/config/locales/newspaper_title.de.yml +8 -0
  177. data/config/locales/newspaper_title.en.yml +8 -0
  178. data/config/locales/newspaper_title.es.yml +8 -0
  179. data/config/locales/newspaper_title.fr.yml +8 -0
  180. data/config/locales/newspaper_title.it.yml +8 -0
  181. data/config/locales/newspaper_title.pt-BR.yml +8 -0
  182. data/config/locales/newspaper_title.zh.yml +8 -0
  183. data/config/locales/newspaper_works.de.yml +50 -0
  184. data/config/locales/newspaper_works.en.yml +52 -0
  185. data/config/locales/newspaper_works.es.yml +52 -0
  186. data/config/locales/newspaper_works.fr.yml +52 -0
  187. data/config/locales/newspaper_works.it.yml +52 -0
  188. data/config/locales/newspaper_works.pt-BR.yml +52 -0
  189. data/config/locales/newspaper_works.zh.yml +52 -0
  190. data/config/routes.rb +9 -0
  191. data/config/solr_wrapper_test.yml +9 -0
  192. data/config/test-fixture/solr-config/_rest_managed.json +3 -0
  193. data/config/test-fixture/solr-config/admin-extra.html +31 -0
  194. data/config/test-fixture/solr-config/elevate.xml +36 -0
  195. data/config/test-fixture/solr-config/mapping-ISOLatin1Accent.txt +246 -0
  196. data/config/test-fixture/solr-config/protwords.txt +21 -0
  197. data/config/test-fixture/solr-config/schema.xml +366 -0
  198. data/config/test-fixture/solr-config/scripts.conf +24 -0
  199. data/config/test-fixture/solr-config/solrconfig.xml +322 -0
  200. data/config/test-fixture/solr-config/spellings.txt +2 -0
  201. data/config/test-fixture/solr-config/stopwords.txt +58 -0
  202. data/config/test-fixture/solr-config/stopwords_en.txt +58 -0
  203. data/config/test-fixture/solr-config/synonyms.txt +31 -0
  204. data/config/test-fixture/solr-config/xslt/example.xsl +132 -0
  205. data/config/test-fixture/solr-config/xslt/example_atom.xsl +67 -0
  206. data/config/test-fixture/solr-config/xslt/example_rss.xsl +66 -0
  207. data/config/test-fixture/solr-config/xslt/luke.xsl +337 -0
  208. data/config/vendor/imagemagick-6-policy.xml +76 -0
  209. data/db/migrate/20181214181358_create_newspaper_works_derivative_attachments.rb +12 -0
  210. data/db/migrate/20190107165909_create_newspaper_works_ingest_file_relations.rb +11 -0
  211. data/lib/generators/newspaper_works/assets_generator.rb +29 -0
  212. data/lib/generators/newspaper_works/blacklight_advanced_search_generator.rb +44 -0
  213. data/lib/generators/newspaper_works/blacklight_iiif_search_generator.rb +41 -0
  214. data/lib/generators/newspaper_works/catalog_controller_generator.rb +60 -0
  215. data/lib/generators/newspaper_works/install_generator.rb +97 -0
  216. data/lib/generators/newspaper_works/templates/annotation_behavior.rb +6 -0
  217. data/lib/generators/newspaper_works/templates/config/authorities/newspaper_article_genres.yml +86 -0
  218. data/lib/generators/newspaper_works/templates/config/initializers/newspaper_works.rb +12 -0
  219. data/lib/generators/newspaper_works/templates/config/initializers/patch_blacklight_advanced_search.rb +74 -0
  220. data/lib/generators/newspaper_works/templates/custom_search_builder.rb +23 -0
  221. data/lib/generators/newspaper_works/templates/newspaper_works.scss +1 -0
  222. data/lib/generators/newspaper_works/templates/newspaper_works_helper.rb +3 -0
  223. data/lib/generators/newspaper_works/templates/search_behavior.rb +6 -0
  224. data/lib/newspaper_works/configuration.rb +14 -0
  225. data/lib/newspaper_works/data/fileset_helper.rb +25 -0
  226. data/lib/newspaper_works/data/path_helper.rb +40 -0
  227. data/lib/newspaper_works/data/work_derivatives.rb +314 -0
  228. data/lib/newspaper_works/data/work_file.rb +92 -0
  229. data/lib/newspaper_works/data/work_files.rb +181 -0
  230. data/lib/newspaper_works/data.rb +35 -0
  231. data/lib/newspaper_works/engine.rb +42 -0
  232. data/lib/newspaper_works/errors.rb +14 -0
  233. data/lib/newspaper_works/ingest/base_ingest.rb +69 -0
  234. data/lib/newspaper_works/ingest/base_publication_info.rb +35 -0
  235. data/lib/newspaper_works/ingest/batch_ingest_helper.rb +44 -0
  236. data/lib/newspaper_works/ingest/batch_issue_ingester.rb +129 -0
  237. data/lib/newspaper_works/ingest/chronam_publication_info.rb +133 -0
  238. data/lib/newspaper_works/ingest/from_command.rb +52 -0
  239. data/lib/newspaper_works/ingest/image_ingest_issues.rb +43 -0
  240. data/lib/newspaper_works/ingest/issue_images.rb +51 -0
  241. data/lib/newspaper_works/ingest/lc_publication_info.rb +144 -0
  242. data/lib/newspaper_works/ingest/named_issue_metadata.rb +60 -0
  243. data/lib/newspaper_works/ingest/ndnp/batch_ingester.rb +64 -0
  244. data/lib/newspaper_works/ingest/ndnp/batch_xml_ingest.rb +72 -0
  245. data/lib/newspaper_works/ingest/ndnp/container_ingest.rb +99 -0
  246. data/lib/newspaper_works/ingest/ndnp/container_ingester.rb +84 -0
  247. data/lib/newspaper_works/ingest/ndnp/container_metadata.rb +87 -0
  248. data/lib/newspaper_works/ingest/ndnp/issue_ingest.rb +81 -0
  249. data/lib/newspaper_works/ingest/ndnp/issue_ingester.rb +101 -0
  250. data/lib/newspaper_works/ingest/ndnp/issue_metadata.rb +96 -0
  251. data/lib/newspaper_works/ingest/ndnp/ndnp_asset_helper.rb +20 -0
  252. data/lib/newspaper_works/ingest/ndnp/ndnp_mets_helper.rb +70 -0
  253. data/lib/newspaper_works/ingest/ndnp/page_ingest.rb +47 -0
  254. data/lib/newspaper_works/ingest/ndnp/page_ingester.rb +157 -0
  255. data/lib/newspaper_works/ingest/ndnp/page_metadata.rb +112 -0
  256. data/lib/newspaper_works/ingest/ndnp.rb +21 -0
  257. data/lib/newspaper_works/ingest/newspaper_issue_ingest.rb +56 -0
  258. data/lib/newspaper_works/ingest/newspaper_page_ingest.rb +6 -0
  259. data/lib/newspaper_works/ingest/page_image.rb +52 -0
  260. data/lib/newspaper_works/ingest/path_enumeration.rb +52 -0
  261. data/lib/newspaper_works/ingest/pdf_images.rb +85 -0
  262. data/lib/newspaper_works/ingest/pdf_issue.rb +20 -0
  263. data/lib/newspaper_works/ingest/pdf_issues.rb +39 -0
  264. data/lib/newspaper_works/ingest/pdf_pages.rb +114 -0
  265. data/lib/newspaper_works/ingest/pub_finder.rb +89 -0
  266. data/lib/newspaper_works/ingest/publication_info.rb +44 -0
  267. data/lib/newspaper_works/ingest.rb +90 -0
  268. data/lib/newspaper_works/issue_pdf_composer.rb +111 -0
  269. data/lib/newspaper_works/logging.rb +54 -0
  270. data/lib/newspaper_works/page_finder.rb +62 -0
  271. data/lib/newspaper_works/resource_fetcher.rb +78 -0
  272. data/lib/newspaper_works/text_extraction/alto_reader.rb +122 -0
  273. data/lib/newspaper_works/text_extraction/page_ocr.rb +100 -0
  274. data/lib/newspaper_works/text_extraction/render_alto.rb +84 -0
  275. data/lib/newspaper_works/text_extraction/word_coords_builder.rb +30 -0
  276. data/lib/newspaper_works/text_extraction.rb +10 -0
  277. data/lib/newspaper_works/version.rb +3 -0
  278. data/lib/newspaper_works.rb +19 -0
  279. data/lib/tasks/newspaper_works_tasks.rake +39 -0
  280. data/newspaper_works.gemspec +49 -0
  281. data/spec/.keep.txt +1 -0
  282. data/spec/actors/newspaper_works/actors/newspaper_works_upload_actor_spec.rb +69 -0
  283. data/spec/controllers/catalog_controller_spec.rb +63 -0
  284. data/spec/controllers/newspaper_works/newspapers_controller_spec.rb +114 -0
  285. data/spec/controllers/newspaper_works/newspapers_search_controller_spec.rb +21 -0
  286. data/spec/factories/ability.rb +6 -0
  287. data/spec/factories/newspaper_issue.rb +7 -0
  288. data/spec/factories/newspaper_issue_ingest.rb +6 -0
  289. data/spec/factories/newspaper_page.rb +7 -0
  290. data/spec/factories/newspaper_page_ingest.rb +6 -0
  291. data/spec/factories/newspaper_page_solr_document.rb +12 -0
  292. data/spec/factories/newspaper_title.rb +8 -0
  293. data/spec/factories/uploaded_pdf_file.rb +9 -0
  294. data/spec/factories/user.rb +13 -0
  295. data/spec/features/front_pages_for_title_spec.rb +19 -0
  296. data/spec/features/newspaper_title_search_spec.rb +30 -0
  297. data/spec/features/newspapers_search_spec.rb +49 -0
  298. data/spec/features/search_results_thumbnail_highlights_spec.rb +33 -0
  299. data/spec/features_shared.rb +71 -0
  300. data/spec/fixtures/files/4.1.07.jp2 +0 -0
  301. data/spec/fixtures/files/4.1.07.tiff +0 -0
  302. data/spec/fixtures/files/README.md +7 -0
  303. data/spec/fixtures/files/alto-2-0.xsd +714 -0
  304. data/spec/fixtures/files/broken-truncated.pdf +0 -0
  305. data/spec/fixtures/files/credits.md +16 -0
  306. data/spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff +0 -0
  307. data/spec/fixtures/files/minimal-1-page.pdf +0 -0
  308. data/spec/fixtures/files/minimal-2-page.pdf +0 -0
  309. data/spec/fixtures/files/minimal-alto.xml +31 -0
  310. data/spec/fixtures/files/ndnp-alto-sample.xml +24 -0
  311. data/spec/fixtures/files/ndnp-sample1-json.json +1 -0
  312. data/spec/fixtures/files/ndnp-sample1-txt.txt +1 -0
  313. data/spec/fixtures/files/ndnp-sample1.pdf +0 -0
  314. data/spec/fixtures/files/ocr_alto.xml +202 -0
  315. data/spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml +202 -0
  316. data/spec/fixtures/files/ocr_color.tiff +0 -0
  317. data/spec/fixtures/files/ocr_gray.jp2 +0 -0
  318. data/spec/fixtures/files/ocr_gray.tiff +0 -0
  319. data/spec/fixtures/files/ocr_mono.tiff +0 -0
  320. data/spec/fixtures/files/page1.tiff +0 -0
  321. data/spec/fixtures/files/resource_mocks/chronam/http404-expected +0 -0
  322. data/spec/fixtures/files/resource_mocks/chronam/sn84038814.rdf +1028 -0
  323. data/spec/fixtures/files/resource_mocks/chronam/sn93059126.rdf +36 -0
  324. data/spec/fixtures/files/resource_mocks/chronam/sn94051019.rdf +37 -0
  325. data/spec/fixtures/files/resource_mocks/geonames/Chicopee +1104 -0
  326. data/spec/fixtures/files/resource_mocks/geonames/Denver +1104 -0
  327. data/spec/fixtures/files/resource_mocks/geonames/Marysville +279 -0
  328. data/spec/fixtures/files/resource_mocks/geonames/Marysville2 +279 -0
  329. data/spec/fixtures/files/resource_mocks/geonames/SLC +1104 -0
  330. data/spec/fixtures/files/resource_mocks/lccn/sn2099999999 +1 -0
  331. data/spec/fixtures/files/resource_mocks/lccn/sn82014496 +2 -0
  332. data/spec/fixtures/files/resource_mocks/lccn/sn83020109 +1 -0
  333. data/spec/fixtures/files/resource_mocks/lccn/sn83021453 +2 -0
  334. data/spec/fixtures/files/resource_mocks/lccn/sn83045396 +2 -0
  335. data/spec/fixtures/files/resource_mocks/lccn/sn84038814 +2 -0
  336. data/spec/fixtures/files/resource_mocks/lccn/sn93059126 +1 -0
  337. data/spec/fixtures/files/resource_mocks/lccn/sn94051019 +1 -0
  338. data/spec/fixtures/files/resource_mocks/lccn/sn99999999 +1 -0
  339. data/spec/fixtures/files/resource_mocks/urls.json +82 -0
  340. data/spec/fixtures/files/sample-4page-issue.pdf +0 -0
  341. data/spec/fixtures/files/sample-color-newsletter.pdf +0 -0
  342. data/spec/fixtures/files/thumbnail.jpg +0 -0
  343. data/spec/forms/hyrax/newspaper_article_form_spec.rb +33 -0
  344. data/spec/forms/hyrax/newspaper_container_form_spec.rb +30 -0
  345. data/spec/forms/hyrax/newspaper_issue_form_spec.rb +31 -0
  346. data/spec/forms/hyrax/newspaper_page_form_spec.rb +28 -0
  347. data/spec/forms/hyrax/newspaper_title_form_spec.rb +31 -0
  348. data/spec/forms/newspaper_works/newspaper_core_form_data_spec.rb +12 -0
  349. data/spec/helpers/newspaper_works/breadcrumb_helper_spec.rb +82 -0
  350. data/spec/helpers/newspaper_works_helper_spec.rb +57 -0
  351. data/spec/indexers/concerns/newspaper_works/indexes_full_text_spec.rb +31 -0
  352. data/spec/indexers/concerns/newspaper_works/indexes_place_of_publication_spec.rb +53 -0
  353. data/spec/indexers/concerns/newspaper_works/indexes_publication_date_range_spec.rb +39 -0
  354. data/spec/indexers/concerns/newspaper_works/indexes_relationships_spec.rb +86 -0
  355. data/spec/indexers/newspaper_article_indexer_spec.rb +29 -0
  356. data/spec/indexers/newspaper_issue_indexer_spec.rb +19 -0
  357. data/spec/indexers/newspaper_title_indexer_spec.rb +22 -0
  358. data/spec/indexers/newspaper_works/newspaper_core_indexer_spec.rb +23 -0
  359. data/spec/lib/newspaper_works/configuration_spec.rb +18 -0
  360. data/spec/lib/newspaper_works/data/work_derivatives_spec.rb +245 -0
  361. data/spec/lib/newspaper_works/data/work_file_spec.rb +99 -0
  362. data/spec/lib/newspaper_works/data/work_files_spec.rb +224 -0
  363. data/spec/lib/newspaper_works/ingest/batch_issue_ingester_spec.rb +158 -0
  364. data/spec/lib/newspaper_works/ingest/chronam_publication_info_spec.rb +35 -0
  365. data/spec/lib/newspaper_works/ingest/from_command_spec.rb +75 -0
  366. data/spec/lib/newspaper_works/ingest/image_ingest_issues_spec.rb +62 -0
  367. data/spec/lib/newspaper_works/ingest/ingest_shared.rb +75 -0
  368. data/spec/lib/newspaper_works/ingest/issue_images_spec.rb +65 -0
  369. data/spec/lib/newspaper_works/ingest/lc_publication_info_spec.rb +34 -0
  370. data/spec/lib/newspaper_works/ingest/ndnp/batch_ingester_spec.rb +131 -0
  371. data/spec/lib/newspaper_works/ingest/ndnp/batch_xml_ingest_spec.rb +64 -0
  372. data/spec/lib/newspaper_works/ingest/ndnp/container_ingest_spec.rb +44 -0
  373. data/spec/lib/newspaper_works/ingest/ndnp/container_ingester_spec.rb +126 -0
  374. data/spec/lib/newspaper_works/ingest/ndnp/container_metadata_spec.rb +36 -0
  375. data/spec/lib/newspaper_works/ingest/ndnp/issue_ingest_spec.rb +108 -0
  376. data/spec/lib/newspaper_works/ingest/ndnp/issue_ingester_spec.rb +155 -0
  377. data/spec/lib/newspaper_works/ingest/ndnp/issue_metadata_spec.rb +84 -0
  378. data/spec/lib/newspaper_works/ingest/ndnp/page_ingest_spec.rb +79 -0
  379. data/spec/lib/newspaper_works/ingest/ndnp/page_ingester_spec.rb +184 -0
  380. data/spec/lib/newspaper_works/ingest/ndnp/page_metadata_spec.rb +85 -0
  381. data/spec/lib/newspaper_works/ingest/newspaper_issue_ingest_spec.rb +83 -0
  382. data/spec/lib/newspaper_works/ingest/newspaper_page_ingest_spec.rb +77 -0
  383. data/spec/lib/newspaper_works/ingest/page_image_spec.rb +29 -0
  384. data/spec/lib/newspaper_works/ingest/pdf_images_spec.rb +32 -0
  385. data/spec/lib/newspaper_works/ingest/pdf_issue_spec.rb +29 -0
  386. data/spec/lib/newspaper_works/ingest/pdf_issues_spec.rb +62 -0
  387. data/spec/lib/newspaper_works/ingest/pdf_pages_spec.rb +110 -0
  388. data/spec/lib/newspaper_works/ingest/pub_finder_spec.rb +58 -0
  389. data/spec/lib/newspaper_works/ingest/publication_info_spec.rb +61 -0
  390. data/spec/lib/newspaper_works/ingest_spec.rb +45 -0
  391. data/spec/lib/newspaper_works/issue_pdf_composer_spec.rb +101 -0
  392. data/spec/lib/newspaper_works/logging_spec.rb +53 -0
  393. data/spec/lib/newspaper_works/page_finder_spec.rb +53 -0
  394. data/spec/lib/newspaper_works/resource_fetcher_spec.rb +65 -0
  395. data/spec/lib/newspaper_works/text_extraction/alto_reader_spec.rb +49 -0
  396. data/spec/lib/newspaper_works/text_extraction/page_ocr_spec.rb +84 -0
  397. data/spec/lib/newspaper_works/text_extraction/render_alto_spec.rb +54 -0
  398. data/spec/lib/newspaper_works/text_extraction/word_coords_builder_spec.rb +30 -0
  399. data/spec/lib/tasks/newspaper_works_rake_spec.rb +124 -0
  400. data/spec/misc_shared.rb +109 -0
  401. data/spec/model_shared.rb +134 -0
  402. data/spec/models/concerns/newspaper_works/blacklight_iiif_search/annotation_behavior_spec.rb +45 -0
  403. data/spec/models/concerns/newspaper_works/blacklight_iiif_search/search_behavior_spec.rb +27 -0
  404. data/spec/models/concerns/newspaper_works/newspaper_core_metadata_spec.rb +45 -0
  405. data/spec/models/concerns/newspaper_works/place_of_publication_behavior_spec.rb +17 -0
  406. data/spec/models/concerns/newspaper_works/scanned_media_metadata_spec.rb +35 -0
  407. data/spec/models/newspaper_article_spec.rb +73 -0
  408. data/spec/models/newspaper_container_spec.rb +111 -0
  409. data/spec/models/newspaper_issue_spec.rb +91 -0
  410. data/spec/models/newspaper_page_spec.rb +44 -0
  411. data/spec/models/newspaper_title_spec.rb +116 -0
  412. data/spec/models/newspaper_works/derivative_attachment_spec.rb +37 -0
  413. data/spec/models/newspaper_works/ingest_file_relation_spec.rb +56 -0
  414. data/spec/models/solr_document_spec.rb +14 -0
  415. data/spec/ndnp_shared.rb +48 -0
  416. data/spec/presenters/hyrax/newspaper_article_presenter_spec.rb +53 -0
  417. data/spec/presenters/hyrax/newspaper_container_presenter_spec.rb +20 -0
  418. data/spec/presenters/hyrax/newspaper_issue_presenter_spec.rb +65 -0
  419. data/spec/presenters/hyrax/newspaper_page_presenter_spec.rb +75 -0
  420. data/spec/presenters/hyrax/newspaper_title_presenter_spec.rb +153 -0
  421. data/spec/presenters/newspaper_works/iiif_manifest_presenter_behavior_spec.rb +32 -0
  422. data/spec/presenters/newspaper_works/issue_info_presenter_spec.rb +51 -0
  423. data/spec/presenters/newspaper_works/newspaper_core_presenter_spec.rb +22 -0
  424. data/spec/presenters/newspaper_works/persistent_url_presenter_behavior_spec.rb +24 -0
  425. data/spec/presenters/newspaper_works/place_of_publication_presenter_behavior_spec.rb +17 -0
  426. data/spec/presenters/newspaper_works/scanned_media_presenter_spec.rb +18 -0
  427. data/spec/presenters/newspaper_works/title_info_presenter_spec.rb +23 -0
  428. data/spec/routing/route_spec.rb +52 -0
  429. data/spec/search_builders/custom_search_builder_spec.rb +34 -0
  430. data/spec/search_builders/newspaper_works/newspapers_search_builder_spec.rb +33 -0
  431. data/spec/services/hyrax/article_genre_service_spec.rb +12 -0
  432. data/spec/services/hyrax/resource_types_service_spec.rb +12 -0
  433. data/spec/services/newspaper_works/jp2_derivative_service_spec.rb +62 -0
  434. data/spec/services/newspaper_works/newspaper_page_derivative_service_spec.rb +125 -0
  435. data/spec/services/newspaper_works/pdf_derivative_service_spec.rb +62 -0
  436. data/spec/services/newspaper_works/pluggable_derivative_service_spec.rb +204 -0
  437. data/spec/services/newspaper_works/text_extraction_derivative_service_spec.rb +82 -0
  438. data/spec/services/newspaper_works/text_formats_from_alto_service_spec.rb +129 -0
  439. data/spec/services/newspaper_works/tiff_derivative_service_spec.rb +58 -0
  440. data/spec/spec_helper.rb +261 -0
  441. data/spec/support/controller_level_helpers.rb +28 -0
  442. data/spec/test_app_templates/lib/generators/test_app_generator.rb +22 -0
  443. data/spec/views/catalog/_index_gallery_newspaper_page_wrapper.html.erb_spec.rb +36 -0
  444. data/spec/views/catalog/_index_header_list_newspaper_page.html.erb_spec.rb +26 -0
  445. data/spec/views/catalog/_thumbnail_list_newspaper_page.html.erb_spec.rb +35 -0
  446. data/spec/views/hyrax/newspaper_titles/_all_front_pages_form.html.erb_spec.rb +16 -0
  447. data/spec/views/hyrax/newspaper_titles/_issue_search_form.html.erb_spec.rb +33 -0
  448. data/spec/views/hyrax/newspaper_titles/_issues_calendar.html.erb_spec.rb +37 -0
  449. data/spec/views/hyrax/newspaper_titles/show.html.erb_spec.rb +87 -0
  450. data/spec/views/newspaper_works/base/_attribute_rows.html.erb_spec.rb +60 -0
  451. data/spec/views/newspaper_works/base/_newspaper_hierarchy.html.erb_spec.rb +80 -0
  452. data/spec/views/newspaper_works/base/_show.html.erb_spec.rb +78 -0
  453. data/spec/views/newspaper_works/newspapers_search/search.html.erb_spec.rb +54 -0
  454. data/spec/views/records/edit_fields/_place_of_publication.html.erb_spec.rb +26 -0
  455. data/tasks/newspaperworks_dev.rake +26 -0
  456. data/test/integration/navigation_test.rb +7 -0
  457. data/test/lib/generators/newspaper_works/install_generator_test.rb +16 -0
  458. data/test/newspaper_works_test.rb +7 -0
  459. data/test/test_helper.rb +17 -0
  460. data/tmp/.keep +0 -0
  461. metadata +1037 -0
@@ -0,0 +1,714 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ALTO: Analyzed Layout and Text Object -->
3
+ <!-- Originally created during the EU-funded Project METAe, the Metadata Engine Project (2001 - 2003), by Alexander Egger (1), Birgit Stehno (2) and Gregor Retti (2), (1) University of Graz and (2) University of Innsbruck, Austria with contributions of Ralph Tiede, CCS GmbH, Germany -->
4
+ <!-- Prepared for the Library of Congress by Ralph Tiede, CCS GmbH, with the assistance of Justin Littman (Library of Congress). -->
5
+ <!-- Version 2.0 2010-01-11T11:54:13.418-05:00 -->
6
+ <!-- December 14, 2004 -->
7
+ <!-- Change History -->
8
+ <!-- June 22, 2004: Version finalized for docWORKS/METAe -->
9
+ <!-- November 19, 2004: Modifications requested by Justin Littman -->
10
+ <!-- Modifications of November 19, 2004:
11
+ 1. add "Description" element
12
+ 2. change "InnerMargin/OuterMargin" to "LeftMargin/RightMargin", add "POSITION" attribute to "PAGE" element
13
+ 3. add "PROCESSING" attribute to "PAGE" element
14
+ 4. internal changes to validate with Xerces parser
15
+ 5. define fontstyles by enumerations
16
+ 6. change "WC" (word confidence) attribute to xsd:float in range of "0" to "1".
17
+ 7. Add "ALTERNATIVE" als childs to "STRING" element
18
+ 8. Add "language" attribute to "Textblock" and "STRING" element
19
+ -->
20
+ <!-- Modifications of December 02, 2004:
21
+ 1. fixed problem with multiple use of blockgroup
22
+ 2. add measurement enumeration 'inch1200'
23
+ -->
24
+ <!-- Modifications of December 14, 2004:
25
+ 1. "FILEID" (attribute of "ComposedBlock"): change type from xsd:IDREF to xsd:string
26
+ 2. include minor changes requested by JDL
27
+ 3. change "ZORDER" to "IDNEXT" (attribute of "BlockType")
28
+ -->
29
+ <!-- Modifications of February 24, 2006:
30
+ 1. ACCURACY attribute added to PAGE element to store information on OCR accuracy
31
+ 2. CS attribute added to TEXTLINE element to indicate manual correction status
32
+ -->
33
+ <!-- Modifications of June 20, 2007 (version 1.3):
34
+ 1. Adaption of xlink namespace and schema location to prevent conflicts on XSL transformations in combination with used namespace in original METS file
35
+ -->
36
+ <!-- Modifications of August 27, 2007 (version 1.4):
37
+ 1. add "QUALITY_DETAIL" attribute to "PAGE" element (gives more details about the page quality, is a free string comparing with QUALITY attribute which is a restrictive one)
38
+ 2. add "Cover" to "POSITION" attribute of "PAGE" element
39
+ 3. specification of interpretation of confidence values (CC, WC, PC and ACCURACY)
40
+ -->
41
+ <!-- Modifications of August 7, 2009:
42
+ 1. Change namespace from old CCS URI to LC-based URI.
43
+ 2. Use standard LC XLink Schema.
44
+ 3. Push version to 2.0 to reflect change in maintenance agency.
45
+ 4. Remove CCS copyright statement.
46
+ 5. Rollback to model used in 1.4 schema except with the changes itemized in 1-4 of this change note. An incorrect version of the 2.0 alpha schema was public until 2010-01-11. The incorrect version was a derivative of the Library of Congress's custom ALTO XML Schema that introduced new elements and attributes.
47
+ -->
48
+ <!-- Modifications of January 11, 2010:
49
+ 1. Rollback to model used in 1.4 schema except with the changes itemized in 1-4 of the previous change note of August 7, 2009. An incorrect version of the 2.0 alpha schema was public until 2010-01-11. The incorrect version was a derivative of the Library of Congress's custom ALTO XML Schema that introduced new elements and attributes that extended the 1.4 model prior to editorial board approval.
50
+ -->
51
+ <xsd:schema targetNamespace="http://www.loc.gov/standards/alto/ns-v2#" xmlns="http://www.loc.gov/standards/alto/ns-v2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified" attributeFormDefault="unqualified">
52
+ <xsd:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.loc.gov/standards/xlink/xlink.xsd"/>
53
+ <xsd:element name="alto">
54
+ <xsd:annotation>
55
+ <xsd:documentation>ALTO (analyzed layout and text object) stores layout information and
56
+ OCR recognized text of pages of any kind of printed documents like books, journals and newspapers.
57
+ ALTO is a standardized XML format to store layout and content information.
58
+ It is designed to be used as an extension schema to METS (Metadata Encoding and Transmission Standard),
59
+ where METS provides metadata and structural information while ALTO contains content and physical information.
60
+ </xsd:documentation>
61
+ </xsd:annotation>
62
+ <xsd:complexType>
63
+ <xsd:sequence>
64
+ <xsd:element name="Description" minOccurs="0">
65
+ <xsd:annotation>
66
+ <xsd:documentation>Describes general settings of the alto file like measurement units and metadata</xsd:documentation>
67
+ </xsd:annotation>
68
+ <xsd:complexType>
69
+ <xsd:sequence>
70
+ <xsd:element name="MeasurementUnit" minOccurs="0">
71
+ <xsd:annotation>
72
+ <xsd:documentation>All measurement values inside the alto file except fontsize are related to this unit. The default is 1/10 of mm</xsd:documentation>
73
+ </xsd:annotation>
74
+ <xsd:simpleType>
75
+ <xsd:restriction base="xsd:string">
76
+ <xsd:enumeration value="pixel"/>
77
+ <xsd:enumeration value="mm10"/>
78
+ <xsd:enumeration value="inch1200"/>
79
+ </xsd:restriction>
80
+ </xsd:simpleType>
81
+ </xsd:element>
82
+ <xsd:element name="sourceImageInformation" type="sourceImageInformationType" minOccurs="0"/>
83
+ <xsd:element name="OCRProcessing" minOccurs="0" maxOccurs="unbounded">
84
+ <xsd:complexType>
85
+ <xsd:complexContent>
86
+ <xsd:extension base="ocrProcessingType">
87
+ <xsd:attribute name="ID" type="xsd:ID" use="required"/>
88
+ </xsd:extension>
89
+ </xsd:complexContent>
90
+ </xsd:complexType>
91
+ </xsd:element>
92
+ </xsd:sequence>
93
+ </xsd:complexType>
94
+ </xsd:element>
95
+ <xsd:element name="Styles" minOccurs="0">
96
+ <xsd:annotation>
97
+ <xsd:documentation>Styles define properties of layout elements. A style defined in a parent element is used as default style for all related children elements. </xsd:documentation>
98
+ </xsd:annotation>
99
+ <xsd:complexType>
100
+ <xsd:sequence>
101
+ <xsd:element name="TextStyle" minOccurs="0" maxOccurs="unbounded">
102
+ <xsd:annotation>
103
+ <xsd:documentation>A text style defines font properties of text. </xsd:documentation>
104
+ </xsd:annotation>
105
+ <xsd:complexType>
106
+ <xsd:attribute name="ID" type="xsd:ID"/>
107
+ <xsd:attributeGroup ref="formattingAttributeGroup"/>
108
+ </xsd:complexType>
109
+ </xsd:element>
110
+ <xsd:element name="ParagraphStyle" minOccurs="0" maxOccurs="unbounded">
111
+ <xsd:annotation>
112
+ <xsd:documentation>A paragraph style defines formatting properties of text blocks.</xsd:documentation>
113
+ </xsd:annotation>
114
+ <xsd:complexType>
115
+ <xsd:attribute name="ID" type="xsd:ID" use="required"/>
116
+ <xsd:attribute name="ALIGN" use="optional">
117
+ <xsd:annotation>
118
+ <xsd:documentation>Indicates the alignement of the paragraph. Could be left, right, center or justify.</xsd:documentation>
119
+ </xsd:annotation>
120
+ <xsd:simpleType>
121
+ <xsd:restriction base="xsd:string">
122
+ <xsd:enumeration value="Left"/>
123
+ <xsd:enumeration value="Right"/>
124
+ <xsd:enumeration value="Center"/>
125
+ <xsd:enumeration value="Block"/>
126
+ </xsd:restriction>
127
+ </xsd:simpleType>
128
+ </xsd:attribute>
129
+ <xsd:attribute name="LEFT" type="xsd:float" use="optional">
130
+ <xsd:annotation>
131
+ <xsd:documentation>Left indent of the paragraph in relation to the column.</xsd:documentation>
132
+ </xsd:annotation>
133
+ </xsd:attribute>
134
+ <xsd:attribute name="RIGHT" type="xsd:float" use="optional">
135
+ <xsd:annotation>
136
+ <xsd:documentation>Right indent of the paragraph in relation to the column.</xsd:documentation>
137
+ </xsd:annotation>
138
+ </xsd:attribute>
139
+ <xsd:attribute name="LINESPACE" type="xsd:float" use="optional">
140
+ <xsd:annotation>
141
+ <xsd:documentation>Line spacing between two lines of the paragraph. Measurement calculated from baseline to baseline.</xsd:documentation>
142
+ </xsd:annotation>
143
+ </xsd:attribute>
144
+ <xsd:attribute name="FIRSTLINE" type="xsd:float" use="optional">
145
+ <xsd:annotation>
146
+ <xsd:documentation>Indent of the first line of the paragraph if this is different from the other lines. A negative value indicates an indent to the left, a positive value indicates an indent to the right.</xsd:documentation>
147
+ </xsd:annotation>
148
+ </xsd:attribute>
149
+ </xsd:complexType>
150
+ </xsd:element>
151
+ </xsd:sequence>
152
+ </xsd:complexType>
153
+ </xsd:element>
154
+ <xsd:element name="Layout">
155
+ <xsd:annotation>
156
+ <xsd:documentation>The root layout element.</xsd:documentation>
157
+ </xsd:annotation>
158
+ <xsd:complexType>
159
+ <xsd:sequence>
160
+ <xsd:element name="Page" maxOccurs="unbounded">
161
+ <xsd:annotation>
162
+ <xsd:documentation>One page of a book or journal.</xsd:documentation>
163
+ </xsd:annotation>
164
+ <xsd:complexType>
165
+ <xsd:sequence>
166
+ <xsd:element name="TopMargin" type="PageSpaceType" minOccurs="0">
167
+ <xsd:annotation>
168
+ <xsd:documentation>The area between the top line of print and the upper edge of the leaf. It may contain page number or running title.</xsd:documentation>
169
+ </xsd:annotation>
170
+ </xsd:element>
171
+ <xsd:element name="LeftMargin" type="PageSpaceType" minOccurs="0">
172
+ <xsd:annotation>
173
+ <xsd:documentation>The area between the printspace and the left border of a page. May contain margin notes.</xsd:documentation>
174
+ </xsd:annotation>
175
+ </xsd:element>
176
+ <xsd:element name="RightMargin" type="PageSpaceType" minOccurs="0">
177
+ <xsd:annotation>
178
+ <xsd:documentation>The area between the printspace and the right border of a page. May contain margin notes.</xsd:documentation>
179
+ </xsd:annotation>
180
+ </xsd:element>
181
+ <xsd:element name="BottomMargin" type="PageSpaceType" minOccurs="0">
182
+ <xsd:annotation>
183
+ <xsd:documentation>The area between the bottom line of letterpress or writing and the bottom edge of the leaf. It may contain a page number, a signature number or a catch word.</xsd:documentation>
184
+ </xsd:annotation>
185
+ </xsd:element>
186
+ <xsd:element name="PrintSpace" type="PageSpaceType" minOccurs="0">
187
+ <xsd:annotation>
188
+ <xsd:documentation>Rectangle covering the printed area of a page. Page number and running title are not part of the print space. </xsd:documentation>
189
+ </xsd:annotation>
190
+ </xsd:element>
191
+ </xsd:sequence>
192
+ <xsd:attribute name="ID" type="xsd:ID" use="required"/>
193
+ <xsd:attribute name="PAGECLASS" type="xsd:string" use="optional">
194
+ <xsd:annotation>
195
+ <xsd:documentation>Any user-defined class like title page.</xsd:documentation>
196
+ </xsd:annotation>
197
+ </xsd:attribute>
198
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS" use="optional"/>
199
+ <xsd:attribute name="HEIGHT" type="xsd:int" use="optional"/>
200
+ <xsd:attribute name="WIDTH" type="xsd:int" use="optional"/>
201
+ <xsd:attribute name="PHYSICAL_IMG_NR" type="xsd:int" use="required">
202
+ <xsd:annotation>
203
+ <xsd:documentation>The number of the page within the document.</xsd:documentation>
204
+ </xsd:annotation>
205
+ </xsd:attribute>
206
+ <xsd:attribute name="PRINTED_IMG_NR" type="xsd:string" use="optional">
207
+ <xsd:annotation>
208
+ <xsd:documentation>The page number that is printed on the page.</xsd:documentation>
209
+ </xsd:annotation>
210
+ </xsd:attribute>
211
+ <xsd:attribute name="QUALITY" use="optional">
212
+ <xsd:annotation>
213
+ <xsd:documentation>Gives brief information about original page quality</xsd:documentation>
214
+ </xsd:annotation>
215
+ <xsd:simpleType>
216
+ <xsd:restriction base="xsd:string">
217
+ <xsd:enumeration value="OK"/>
218
+ <xsd:enumeration value="Missing"/>
219
+ <xsd:enumeration value="Missing in original"/>
220
+ <xsd:enumeration value="Damaged"/>
221
+ <xsd:enumeration value="Retained"/>
222
+ <xsd:enumeration value="Target"/>
223
+ <xsd:enumeration value="As in original"/>
224
+ </xsd:restriction>
225
+ </xsd:simpleType>
226
+ </xsd:attribute>
227
+ <xsd:attribute name="QUALITY_DETAIL" type="xsd:string" use="optional">
228
+ <xsd:annotation>
229
+ <xsd:documentation>Gives more details about the original page quality, since QUALITY attribute gives only brief and restrictive information</xsd:documentation>
230
+ </xsd:annotation>
231
+ </xsd:attribute>
232
+ <xsd:attribute name="POSITION" use="optional">
233
+ <xsd:annotation>
234
+ <xsd:documentation>Position of the page. Could be lefthanded, righthanded, cover, foldout or single if it has no special position.</xsd:documentation>
235
+ </xsd:annotation>
236
+ <xsd:simpleType>
237
+ <xsd:restriction base="xsd:string">
238
+ <xsd:enumeration value="Left"/>
239
+ <xsd:enumeration value="Right"/>
240
+ <xsd:enumeration value="Foldout"/>
241
+ <xsd:enumeration value="Single"/>
242
+ <xsd:enumeration value="Cover"/>
243
+ </xsd:restriction>
244
+ </xsd:simpleType>
245
+ </xsd:attribute>
246
+ <xsd:attribute name="PROCESSING" type="xsd:IDREF" use="optional">
247
+ <xsd:annotation>
248
+ <xsd:documentation>A link to the processing description that has been used for this page.</xsd:documentation>
249
+ </xsd:annotation>
250
+ </xsd:attribute>
251
+ <xsd:attribute name="ACCURACY" type="xsd:float" use="optional">
252
+ <xsd:annotation>
253
+ <xsd:documentation>Estimated percentage of OCR Accuracy in range from 0 to 100 </xsd:documentation>
254
+ </xsd:annotation>
255
+ </xsd:attribute>
256
+ <xsd:attribute name="PC" use="optional">
257
+ <xsd:annotation>
258
+ <xsd:documentation>Page Confidence: Confidence level of the ocr for this page. A value between 0 (unsure) and 1 (sure). </xsd:documentation>
259
+ </xsd:annotation>
260
+ <xsd:simpleType>
261
+ <xsd:restriction base="xsd:float">
262
+ <xsd:minInclusive value="0"/>
263
+ <xsd:maxInclusive value="1"/>
264
+ </xsd:restriction>
265
+ </xsd:simpleType>
266
+ </xsd:attribute>
267
+ </xsd:complexType>
268
+ </xsd:element>
269
+ </xsd:sequence>
270
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS"/>
271
+ </xsd:complexType>
272
+ </xsd:element>
273
+ </xsd:sequence>
274
+ </xsd:complexType>
275
+ </xsd:element>
276
+ <xsd:group name="BlockGroup">
277
+ <xsd:annotation>
278
+ <xsd:documentation>Group of available block types</xsd:documentation>
279
+ </xsd:annotation>
280
+ <xsd:choice>
281
+ <xsd:element name="TextBlock" type="TextBlockType">
282
+ <xsd:annotation>
283
+ <xsd:documentation>A block of text.</xsd:documentation>
284
+ </xsd:annotation>
285
+ </xsd:element>
286
+ <xsd:element name="Illustration" type="IllustrationType">
287
+ <xsd:annotation>
288
+ <xsd:documentation>A picture or image.</xsd:documentation>
289
+ </xsd:annotation>
290
+ </xsd:element>
291
+ <xsd:element name="GraphicalElement" type="GraphicalElementType">
292
+ <xsd:annotation>
293
+ <xsd:documentation>A graphic used to separate blocks. Usually a line or rectangle.</xsd:documentation>
294
+ </xsd:annotation>
295
+ </xsd:element>
296
+ <xsd:element name="ComposedBlock" type="ComposedBlockType">
297
+ <xsd:annotation>
298
+ <xsd:documentation>A block that consists of other blocks</xsd:documentation>
299
+ </xsd:annotation>
300
+ </xsd:element>
301
+ </xsd:choice>
302
+ </xsd:group>
303
+ <xsd:complexType name="BlockType">
304
+ <xsd:annotation>
305
+ <xsd:documentation>Base type for any kind of block on the page.</xsd:documentation>
306
+ </xsd:annotation>
307
+ <xsd:sequence minOccurs="0">
308
+ <xsd:element name="Shape" type="ShapeType"/>
309
+ </xsd:sequence>
310
+ <xsd:attribute name="ID" type="xsd:ID" use="required"/>
311
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS"/>
312
+ <xsd:attribute name="HEIGHT" type="xsd:int" use="required"/>
313
+ <xsd:attribute name="WIDTH" type="xsd:int" use="required"/>
314
+ <xsd:attribute name="HPOS" type="xsd:int" use="required"/>
315
+ <xsd:attribute name="VPOS" type="xsd:int" use="required"/>
316
+ <xsd:attribute name="ROTATION" type="xsd:float" use="optional">
317
+ <xsd:annotation>
318
+ <xsd:documentation>Tells the rotation of the block e.g. text or illustration. The value is in degree counterclockwise.</xsd:documentation>
319
+ </xsd:annotation>
320
+ </xsd:attribute>
321
+ <xsd:attribute name="IDNEXT" type="xsd:IDREF" use="optional">
322
+ <xsd:annotation>
323
+ <xsd:documentation>The next block in reading sequence on the page.</xsd:documentation>
324
+ </xsd:annotation>
325
+ </xsd:attribute>
326
+ <xsd:attributeGroup ref="xlink:simpleLink"/>
327
+ </xsd:complexType>
328
+ <xsd:complexType name="StringType" mixed="false">
329
+ <xsd:annotation>
330
+ <xsd:documentation>A sequence of chars. Strings are separated by white spaces or hyphenation chars.</xsd:documentation>
331
+ </xsd:annotation>
332
+ <xsd:sequence minOccurs="0">
333
+ <xsd:element name="ALTERNATIVE" maxOccurs="unbounded">
334
+ <xsd:annotation>
335
+ <xsd:documentation>Any alternative for the word.</xsd:documentation>
336
+ </xsd:annotation>
337
+ <xsd:complexType>
338
+ <xsd:simpleContent>
339
+ <xsd:extension base="xsd:string">
340
+ <xsd:attribute name="PURPOSE" type="xsd:string" use="optional">
341
+ <xsd:annotation>
342
+ <xsd:documentation>Identifies the purpose of the alternative.</xsd:documentation>
343
+ </xsd:annotation>
344
+ </xsd:attribute>
345
+ </xsd:extension>
346
+ </xsd:simpleContent>
347
+ </xsd:complexType>
348
+ </xsd:element>
349
+ </xsd:sequence>
350
+ <xsd:attribute name="ID" type="xsd:ID" use="optional"/>
351
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS" use="optional"/>
352
+ <xsd:attribute name="HEIGHT" type="xsd:float" use="optional"/>
353
+ <xsd:attribute name="WIDTH" type="xsd:float" use="optional"/>
354
+ <xsd:attribute name="HPOS" type="xsd:float" use="optional"/>
355
+ <xsd:attribute name="VPOS" type="xsd:float" use="optional"/>
356
+ <xsd:attribute name="CONTENT" use="required">
357
+ <xsd:simpleType>
358
+ <xsd:restriction base="xsd:string">
359
+ <xsd:whiteSpace value="preserve"/>
360
+ </xsd:restriction>
361
+ </xsd:simpleType>
362
+ </xsd:attribute>
363
+ <xsd:attribute name="STYLE" type="fontStylesType" use="optional"/>
364
+ <xsd:attribute name="SUBS_TYPE" use="optional">
365
+ <xsd:annotation>
366
+ <xsd:documentation>Type of the substitution (if any).</xsd:documentation>
367
+ </xsd:annotation>
368
+ <xsd:simpleType>
369
+ <xsd:restriction base="xsd:string">
370
+ <xsd:enumeration value="HypPart1"/>
371
+ <xsd:enumeration value="HypPart2"/>
372
+ <xsd:enumeration value="Abbreviation"/>
373
+ </xsd:restriction>
374
+ </xsd:simpleType>
375
+ </xsd:attribute>
376
+ <xsd:attribute name="SUBS_CONTENT" type="xsd:string" use="optional">
377
+ <xsd:annotation>
378
+ <xsd:documentation>Content of the substiution.</xsd:documentation>
379
+ </xsd:annotation>
380
+ </xsd:attribute>
381
+ <xsd:attribute name="WC" use="optional">
382
+ <xsd:annotation>
383
+ <xsd:documentation>Word Confidence: Confidence level of the ocr for this string. A value between 0 (unsure) and 1 (sure). </xsd:documentation>
384
+ </xsd:annotation>
385
+ <xsd:simpleType>
386
+ <xsd:restriction base="xsd:float">
387
+ <xsd:minInclusive value="0"/>
388
+ <xsd:maxInclusive value="1"/>
389
+ </xsd:restriction>
390
+ </xsd:simpleType>
391
+ </xsd:attribute>
392
+ <xsd:attribute name="CC" type="xsd:string" use="optional">
393
+ <xsd:annotation>
394
+ <xsd:documentation>Confidence level of each character in that string. A list of numbers, one number between 0 (sure) and 9 (unsure) for each character.</xsd:documentation>
395
+ </xsd:annotation>
396
+ </xsd:attribute>
397
+ </xsd:complexType>
398
+ <xsd:complexType name="PageSpaceType">
399
+ <xsd:annotation>
400
+ <xsd:documentation>A region on a page</xsd:documentation>
401
+ </xsd:annotation>
402
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
403
+ <xsd:group ref="BlockGroup"/>
404
+ </xsd:sequence>
405
+ <xsd:attribute name="ID" type="xsd:ID" use="optional"/>
406
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS" use="optional"/>
407
+ <xsd:attribute name="HEIGHT" type="xsd:float" use="required"/>
408
+ <xsd:attribute name="WIDTH" type="xsd:float" use="required"/>
409
+ <xsd:attribute name="HPOS" type="xsd:float" use="required"/>
410
+ <xsd:attribute name="VPOS" type="xsd:float" use="required"/>
411
+ </xsd:complexType>
412
+ <xsd:simpleType name="PointsType">
413
+ <xsd:annotation>
414
+ <xsd:documentation>A list of points</xsd:documentation>
415
+ </xsd:annotation>
416
+ <xsd:restriction base="xsd:string"/>
417
+ </xsd:simpleType>
418
+ <xsd:complexType name="ShapeType">
419
+ <xsd:annotation>
420
+ <xsd:documentation>Describes the bounding shape of a block, if it is not rectangular.</xsd:documentation>
421
+ </xsd:annotation>
422
+ <xsd:choice>
423
+ <xsd:element name="Polygon" type="PolygonType"/>
424
+ <xsd:element name="Ellipse" type="EllipseType"/>
425
+ <xsd:element name="Circle" type="CircleType"/>
426
+ </xsd:choice>
427
+ </xsd:complexType>
428
+ <xsd:complexType name="PolygonType">
429
+ <xsd:annotation>
430
+ <xsd:documentation>A polygon shape.</xsd:documentation>
431
+ </xsd:annotation>
432
+ <xsd:attribute name="POINTS" type="PointsType" use="required"/>
433
+ </xsd:complexType>
434
+ <xsd:complexType name="EllipseType">
435
+ <xsd:annotation>
436
+ <xsd:documentation>An ellipse shape.</xsd:documentation>
437
+ </xsd:annotation>
438
+ <xsd:attribute name="HPOS"/>
439
+ <xsd:attribute name="VPOS"/>
440
+ <xsd:attribute name="HLENGTH"/>
441
+ <xsd:attribute name="VLENGTH"/>
442
+ </xsd:complexType>
443
+ <xsd:complexType name="CircleType">
444
+ <xsd:annotation>
445
+ <xsd:documentation>A circle shape.</xsd:documentation>
446
+ </xsd:annotation>
447
+ <xsd:attribute name="HPOS"/>
448
+ <xsd:attribute name="VPOS"/>
449
+ <xsd:attribute name="RADIUS"/>
450
+ </xsd:complexType>
451
+ <xsd:attributeGroup name="formattingAttributeGroup">
452
+ <xsd:annotation>
453
+ <xsd:documentation>Formatting attributes. Note that these attributes are assumed to be inherited from ancestor elements of the document hierarchy.</xsd:documentation>
454
+ </xsd:annotation>
455
+ <xsd:attribute name="FONTFAMILY" type="xsd:string" use="optional">
456
+ <xsd:annotation>
457
+ <xsd:documentation>The font name.</xsd:documentation>
458
+ </xsd:annotation>
459
+ </xsd:attribute>
460
+ <xsd:attribute name="FONTTYPE" type="fontTypeType" use="optional"/>
461
+ <xsd:attribute name="FONTWIDTH" type="fontWidthType" use="optional"/>
462
+ <xsd:attribute name="FONTSIZE" type="xsd:float" use="required">
463
+ <xsd:annotation>
464
+ <xsd:documentation>The font size, in points (1/72 of an inch).</xsd:documentation>
465
+ </xsd:annotation>
466
+ </xsd:attribute>
467
+ <xsd:attribute name="FONTCOLOR" type="xsd:hexBinary" use="optional">
468
+ <xsd:annotation>
469
+ <xsd:documentation>Font color as RGB value</xsd:documentation>
470
+ </xsd:annotation>
471
+ </xsd:attribute>
472
+ <xsd:attribute name="FONTSTYLE" type="fontStylesType" use="optional"/>
473
+ </xsd:attributeGroup>
474
+ <xsd:simpleType name="fontTypeType">
475
+ <xsd:annotation>
476
+ <xsd:documentation>Serif or Sans-Serif</xsd:documentation>
477
+ </xsd:annotation>
478
+ <xsd:restriction base="xsd:string">
479
+ <xsd:enumeration value="serif"/>
480
+ <xsd:enumeration value="sans-serif"/>
481
+ </xsd:restriction>
482
+ </xsd:simpleType>
483
+ <xsd:simpleType name="fontWidthType">
484
+ <xsd:annotation>
485
+ <xsd:documentation>fixed or proportional</xsd:documentation>
486
+ </xsd:annotation>
487
+ <xsd:restriction base="xsd:string">
488
+ <xsd:enumeration value="proportional"/>
489
+ <xsd:enumeration value="fixed"/>
490
+ </xsd:restriction>
491
+ </xsd:simpleType>
492
+ <xsd:complexType name="sourceImageInformationType">
493
+ <xsd:annotation>
494
+ <xsd:documentation>Information to identify the image file from which the OCR text was created.</xsd:documentation>
495
+ </xsd:annotation>
496
+ <xsd:sequence>
497
+ <xsd:element name="fileName" type="xsd:string" minOccurs="0"/>
498
+ <xsd:element name="fileIdentifier" type="fileIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
499
+ </xsd:sequence>
500
+ </xsd:complexType>
501
+ <xsd:complexType name="fileIdentifierType">
502
+ <xsd:annotation>
503
+ <xsd:documentation>A unique identifier for the image file. This is drawn from MIX.</xsd:documentation>
504
+ <xsd:documentation> This identifier must be unique within the local system. To facilitate file sharing or interoperability with other systems, fileIdentifierLocation may be added to designate the system or application where the identifier is unique.</xsd:documentation>
505
+ </xsd:annotation>
506
+ <xsd:simpleContent>
507
+ <xsd:extension base="xsd:string">
508
+ <xsd:attribute name="fileIdentifierLocation">
509
+ <xsd:annotation>
510
+ <xsd:documentation>A location qualifier, i.e., a namespace.</xsd:documentation>
511
+ </xsd:annotation>
512
+ </xsd:attribute>
513
+ </xsd:extension>
514
+ </xsd:simpleContent>
515
+ </xsd:complexType>
516
+ <xsd:complexType name="ocrProcessingType">
517
+ <xsd:annotation>
518
+ <xsd:documentation>Information on how the text was created, including preprocessing, OCR processing, and postprocessing steps.</xsd:documentation>
519
+ <xsd:documentation>Where possible, this draws from MIX's change history.</xsd:documentation>
520
+ </xsd:annotation>
521
+ <xsd:sequence>
522
+ <xsd:element name="preProcessingStep" type="processingStepType" minOccurs="0" maxOccurs="unbounded"/>
523
+ <xsd:element name="ocrProcessingStep" type="processingStepType"/>
524
+ <xsd:element name="postProcessingStep" type="processingStepType" minOccurs="0" maxOccurs="unbounded"/>
525
+ </xsd:sequence>
526
+ </xsd:complexType>
527
+ <xsd:complexType name="processingStepType">
528
+ <xsd:annotation>
529
+ <xsd:documentation>A processing step.</xsd:documentation>
530
+ </xsd:annotation>
531
+ <xsd:sequence>
532
+ <xsd:element name="processingDateTime" type="dateTimeType" minOccurs="0">
533
+ <xsd:annotation>
534
+ <xsd:documentation>Date or DateTime the image was processed.</xsd:documentation>
535
+ </xsd:annotation>
536
+ </xsd:element>
537
+ <xsd:element name="processingAgency" type="xsd:string" minOccurs="0">
538
+ <xsd:annotation>
539
+ <xsd:documentation>Identifies the organizationlevel producer(s) of the processed image.</xsd:documentation>
540
+ </xsd:annotation>
541
+ </xsd:element>
542
+ <xsd:element name="processingStepDescription" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
543
+ <xsd:annotation>
544
+ <xsd:documentation>An ordinal listing of the image processing steps performed. For example, "image despeckling."</xsd:documentation>
545
+ </xsd:annotation>
546
+ </xsd:element>
547
+ <xsd:element name="processingStepSettings" type="xsd:string" minOccurs="0">
548
+ <xsd:annotation>
549
+ <xsd:documentation>A description of any setting of the processing application. For example, for a multi-engine OCR application this might include the engines which were used. Ideally, this description should be adequate so that someone else using the same application can produce identical results.</xsd:documentation>
550
+ </xsd:annotation>
551
+ </xsd:element>
552
+ <xsd:element name="processingSoftware" type="processingSoftwareType" minOccurs="0"/>
553
+ </xsd:sequence>
554
+ </xsd:complexType>
555
+ <xsd:complexType name="processingSoftwareType">
556
+ <xsd:annotation>
557
+ <xsd:documentation>Information about a software application. Where applicable, the preferred method for determining this information is by selecting Help --> About.</xsd:documentation>
558
+ </xsd:annotation>
559
+ <xsd:sequence>
560
+ <xsd:element name="softwareCreator" type="xsd:string" minOccurs="0">
561
+ <xsd:annotation>
562
+ <xsd:documentation>The name of the organization or company that created the application.</xsd:documentation>
563
+ </xsd:annotation>
564
+ </xsd:element>
565
+ <xsd:element name="softwareName" type="xsd:string" minOccurs="0">
566
+ <xsd:annotation>
567
+ <xsd:documentation>The name of the application.</xsd:documentation>
568
+ </xsd:annotation>
569
+ </xsd:element>
570
+ <xsd:element name="softwareVersion" type="xsd:string" minOccurs="0">
571
+ <xsd:annotation>
572
+ <xsd:documentation>The version of the application.</xsd:documentation>
573
+ </xsd:annotation>
574
+ </xsd:element>
575
+ <xsd:element name="applicationDescription" type="xsd:string" minOccurs="0">
576
+ <xsd:annotation>
577
+ <xsd:documentation>A description of any important characteristics of the application, especially for non-commercial applications. For example, if a non-commercial application is built using commercial components, e.g., an OCR engine SDK. Those components should be mentioned here.</xsd:documentation>
578
+ </xsd:annotation>
579
+ </xsd:element>
580
+ </xsd:sequence>
581
+ </xsd:complexType>
582
+ <xsd:simpleType name="dateTimeType">
583
+ <xsd:union memberTypes="xsd:date xsd:dateTime xsd:gYear xsd:gYearMonth"/>
584
+ </xsd:simpleType>
585
+ <xsd:simpleType name="fontStylesType">
586
+ <xsd:annotation>
587
+ <xsd:documentation>List of any combination of font styles</xsd:documentation>
588
+ </xsd:annotation>
589
+ <xsd:restriction>
590
+ <xsd:simpleType>
591
+ <xsd:list>
592
+ <xsd:simpleType>
593
+ <xsd:restriction base="xsd:string">
594
+ <xsd:enumeration value="bold"/>
595
+ <xsd:enumeration value="italics"/>
596
+ <xsd:enumeration value="subscript"/>
597
+ <xsd:enumeration value="superscript"/>
598
+ <xsd:enumeration value="smallcaps"/>
599
+ <xsd:enumeration value="underline"/>
600
+ </xsd:restriction>
601
+ </xsd:simpleType>
602
+ </xsd:list>
603
+ </xsd:simpleType>
604
+ <xsd:minLength value="1"/>
605
+ </xsd:restriction>
606
+ </xsd:simpleType>
607
+ <xsd:complexType name="ComposedBlockType">
608
+ <xsd:annotation>
609
+ <xsd:documentation>A block that consists of other blocks</xsd:documentation>
610
+ </xsd:annotation>
611
+ <xsd:complexContent>
612
+ <xsd:extension base="BlockType">
613
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
614
+ <xsd:group ref="BlockGroup"/>
615
+ </xsd:sequence>
616
+ <xsd:attribute name="TYPE" type="xsd:string" use="optional">
617
+ <xsd:annotation>
618
+ <xsd:documentation>A user defined string to identify the type of composed block (e.g. table, advertisement, ...)</xsd:documentation>
619
+ </xsd:annotation>
620
+ </xsd:attribute>
621
+ <xsd:attribute name="FILEID" type="xsd:string" use="optional">
622
+ <xsd:annotation>
623
+ <xsd:documentation>An ID to link to an image which contains only the composed block. The ID and the file link is defined in the related METS file.</xsd:documentation>
624
+ </xsd:annotation>
625
+ </xsd:attribute>
626
+ </xsd:extension>
627
+ </xsd:complexContent>
628
+ </xsd:complexType>
629
+ <xsd:complexType name="IllustrationType">
630
+ <xsd:annotation>
631
+ <xsd:documentation>A picture or image.</xsd:documentation>
632
+ </xsd:annotation>
633
+ <xsd:complexContent>
634
+ <xsd:extension base="BlockType">
635
+ <xsd:attribute name="TYPE" type="xsd:string" use="optional">
636
+ <xsd:annotation>
637
+ <xsd:documentation>A user defined string to identify the type of illustration like photo, map, drawing, chart, ...</xsd:documentation>
638
+ </xsd:annotation>
639
+ </xsd:attribute>
640
+ <xsd:attribute name="FILEID" type="xsd:string" use="optional">
641
+ <xsd:annotation>
642
+ <xsd:documentation>A link to an image which contains only the illustration.</xsd:documentation>
643
+ </xsd:annotation>
644
+ </xsd:attribute>
645
+ </xsd:extension>
646
+ </xsd:complexContent>
647
+ </xsd:complexType>
648
+ <xsd:complexType name="GraphicalElementType">
649
+ <xsd:annotation>
650
+ <xsd:documentation>A graphic used to separate blocks. Usually a line or rectangle. </xsd:documentation>
651
+ </xsd:annotation>
652
+ <xsd:complexContent>
653
+ <xsd:extension base="BlockType"/>
654
+ </xsd:complexContent>
655
+ </xsd:complexType>
656
+ <xsd:complexType name="TextBlockType">
657
+ <xsd:annotation>
658
+ <xsd:documentation>A block of text.</xsd:documentation>
659
+ </xsd:annotation>
660
+ <xsd:complexContent>
661
+ <xsd:extension base="BlockType">
662
+ <xsd:sequence minOccurs="0">
663
+ <xsd:element name="TextLine" maxOccurs="unbounded">
664
+ <xsd:annotation>
665
+ <xsd:documentation>A single line of text.</xsd:documentation>
666
+ </xsd:annotation>
667
+ <xsd:complexType>
668
+ <xsd:sequence>
669
+ <xsd:sequence maxOccurs="unbounded">
670
+ <xsd:element name="String" type="StringType"/>
671
+ <xsd:element name="SP" minOccurs="0">
672
+ <xsd:annotation>
673
+ <xsd:documentation>A white space.</xsd:documentation>
674
+ </xsd:annotation>
675
+ <xsd:complexType>
676
+ <xsd:attribute name="ID" type="xsd:ID" use="optional"/>
677
+ <xsd:attribute name="WIDTH" type="xsd:float" use="optional"/>
678
+ <xsd:attribute name="HPOS" type="xsd:float" use="optional"/>
679
+ <xsd:attribute name="VPOS" type="xsd:float" use="optional"/>
680
+ </xsd:complexType>
681
+ </xsd:element>
682
+ </xsd:sequence>
683
+ <xsd:element name="HYP" minOccurs="0">
684
+ <xsd:annotation>
685
+ <xsd:documentation>A hyphenation char. Can appear only at the end of a line.</xsd:documentation>
686
+ </xsd:annotation>
687
+ <xsd:complexType>
688
+ <xsd:attribute name="WIDTH" type="xsd:float" use="optional"/>
689
+ <xsd:attribute name="HPOS" type="xsd:float" use="optional"/>
690
+ <xsd:attribute name="VPOS" type="xsd:float" use="optional"/>
691
+ <xsd:attribute name="CONTENT" use="required"/>
692
+ </xsd:complexType>
693
+ </xsd:element>
694
+ </xsd:sequence>
695
+ <xsd:attribute name="ID" type="xsd:ID"/>
696
+ <xsd:attribute name="STYLEREFS" type="xsd:IDREFS" use="optional"/>
697
+ <xsd:attribute name="HEIGHT" type="xsd:float" use="required"/>
698
+ <xsd:attribute name="WIDTH" type="xsd:float" use="required"/>
699
+ <xsd:attribute name="HPOS" type="xsd:float" use="required"/>
700
+ <xsd:attribute name="VPOS" type="xsd:float" use="required"/>
701
+ <xsd:attribute name="BASELINE" type="xsd:float" use="optional"/>
702
+ <xsd:attribute name="CS" type="xsd:boolean" use="optional">
703
+ <xsd:annotation>
704
+ <xsd:documentation>Correction Status. Indicates whether manual correction has been done or not.</xsd:documentation>
705
+ </xsd:annotation>
706
+ </xsd:attribute>
707
+ </xsd:complexType>
708
+ </xsd:element>
709
+ </xsd:sequence>
710
+ <xsd:attribute name="language" type="xsd:language" use="optional"/>
711
+ </xsd:extension>
712
+ </xsd:complexContent>
713
+ </xsd:complexType>
714
+ </xsd:schema>