aiiinotate 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +61 -0
  3. package/cli/import.js +142 -0
  4. package/cli/index.js +26 -0
  5. package/cli/io.js +105 -0
  6. package/cli/migrate.js +123 -0
  7. package/cli/mongoClient.js +11 -0
  8. package/docs/architecture.md +88 -0
  9. package/docs/db.md +38 -0
  10. package/docs/dev_iiif_compatibility.md +43 -0
  11. package/docs/endpoints.md +48 -0
  12. package/docs/progress.md +159 -0
  13. package/docs/specifications/0_w3c_open_annotations.md +332 -0
  14. package/docs/specifications/1_w3c_web_annotations.md +577 -0
  15. package/docs/specifications/2_iiif_apis.md +396 -0
  16. package/docs/specifications/3_iiif_annotations.md +103 -0
  17. package/docs/specifications/4_search_api.md +135 -0
  18. package/docs/specifications/5_sas.md +119 -0
  19. package/docs/specifications/6_mirador.md +119 -0
  20. package/docs/specifications/7_aikon.md +137 -0
  21. package/docs/specifications/include/presentation_2.0.webp +0 -0
  22. package/docs/specifications/include/presentation_2.0_white.png +0 -0
  23. package/docs/specifications/include/presentation_3.0.png +0 -0
  24. package/docs/specifications/include/presentation_3.0_resize.png +0 -0
  25. package/eslint.config.js +27 -0
  26. package/migrations/baseConfig.js +56 -0
  27. package/migrations/manageIndex.js +55 -0
  28. package/migrations/migrate-mongo-config-main.js +8 -0
  29. package/migrations/migrate-mongo-config-test.js +8 -0
  30. package/migrations/migrationScripts/20250825185706-collections.js +41 -0
  31. package/migrations/migrationScripts/20250826194832-annotations2-canvas-index.js +31 -0
  32. package/migrations/migrationScripts/20250904080710-annotations2-schema.js +42 -0
  33. package/migrations/migrationScripts/20251002141951-manifest2-schema.js +43 -0
  34. package/migrations/migrationScripts/20251006212110-manifest-unique-index.js +29 -0
  35. package/migrations/migrationScripts/20251028115614-annotations2-id-index.js +27 -0
  36. package/migrations/migrationTemplate.js +25 -0
  37. package/package.json +78 -0
  38. package/run.sh +70 -0
  39. package/scripts/_migrations.sh +79 -0
  40. package/scripts/_setup.js +31 -0
  41. package/scripts/setup_mongodb.sh +61 -0
  42. package/scripts/setup_mongodb_migrate.sh +17 -0
  43. package/scripts/setup_node.sh +15 -0
  44. package/scripts/utils.sh +192 -0
  45. package/setup.sh +20 -0
  46. package/src/app.js +113 -0
  47. package/src/config/.env.template +22 -0
  48. package/src/data/annotations/annotations2.js +419 -0
  49. package/src/data/annotations/annotations3.js +32 -0
  50. package/src/data/annotations/routes.js +271 -0
  51. package/src/data/annotations/routes.test.js +180 -0
  52. package/src/data/collectionAbstract.js +270 -0
  53. package/src/data/index.js +29 -0
  54. package/src/data/manifests/manifests2.js +305 -0
  55. package/src/data/manifests/manifests2.test.js +53 -0
  56. package/src/data/manifests/manifests3.js +23 -0
  57. package/src/data/manifests/routes.js +95 -0
  58. package/src/data/manifests/routes.test.js +69 -0
  59. package/src/data/routes.js +141 -0
  60. package/src/data/routes.test.js +117 -0
  61. package/src/data/utils/iiif2Utils.js +196 -0
  62. package/src/data/utils/iiif2Utils.test.js +98 -0
  63. package/src/data/utils/iiif3Utils.js +0 -0
  64. package/src/data/utils/iiifUtils.js +18 -0
  65. package/src/data/utils/routeUtils.js +109 -0
  66. package/src/data/utils/testUtils.js +253 -0
  67. package/src/data/utils/utils.js +231 -0
  68. package/src/db/index.js +48 -0
  69. package/src/fileServer/annotations.js +39 -0
  70. package/src/fileServer/data/annotationList_aikon_wit9_man11_anno165_all.jsonld +827 -0
  71. package/src/fileServer/data/annotationList_vhs_wit250_man250_anno250_all.jsonld +37514 -0
  72. package/src/fileServer/data/annotationList_vhs_wit253_man253_anno253_all.jsonld +20111 -0
  73. package/src/fileServer/data/annotations2Invalid.jsonld +39 -0
  74. package/src/fileServer/data/annotations2Valid.jsonld +39 -0
  75. package/src/fileServer/data/bnf_invalid_manifest.json +2806 -0
  76. package/src/fileServer/data/bnf_valid_manifest.json +2817 -0
  77. package/src/fileServer/data/vhs_wit253_man253_anno253_anno-24.json +1 -0
  78. package/src/fileServer/index.js +64 -0
  79. package/src/fileServer/manifests.js +14 -0
  80. package/src/fileServer/utils.js +35 -0
  81. package/src/schemas/index.js +20 -0
  82. package/src/schemas/schemasBase.js +47 -0
  83. package/src/schemas/schemasPresentation2.js +417 -0
  84. package/src/schemas/schemasPresentation3.js +57 -0
  85. package/src/schemas/schemasResolver.js +71 -0
  86. package/src/schemas/schemasRoutes.js +277 -0
  87. package/src/server.js +22 -0
  88. package/src/types.js +93 -0
@@ -0,0 +1,39 @@
1
+ [
2
+ {
3
+ "@id" : "http://aikon.enpc.fr/sas/annotation/wit9_man11_anno165_c12_80a76d17911c4fdd9f6f14638e861305",
4
+ "@type" : "oa:Annotation",
5
+ "dcterms:created" : "2025-03-19T14:38:38",
6
+ "dcterms:modified" : "2025-03-19T14:38:38",
7
+ "resource" : {
8
+ "@type" : "dctypes:Text",
9
+ "format" : "text/html",
10
+ "chars" : "<p></p>",
11
+ "https://aikon.enpc.fr/sas/full_text" : "",
12
+ "https://iscd.huma-num.fr/sas/full_text" : ""
13
+ },
14
+ "on" : "",
15
+ "motivation" : [ "oa:tagging", "oa:commenting" ],
16
+ "@context" : "http://iiif.io/api/presentation/2/context.json",
17
+ "label" : ""
18
+ }, {
19
+ "@id" : "http://aikon.enpc.fr/sas/annotation/wit9_man11_anno165_c13_ab273c69f957498f8400baeb9fd35359",
20
+ "@type" : "oa:Annotation",
21
+ "dcterms:created" : "2025-03-19T14:38:38",
22
+ "dcterms:modified" : "2025-03-19T14:38:38",
23
+ "resource" : {
24
+ "@type" : "dctypes:Text",
25
+ "format" : "text/html",
26
+ "chars" : "<p></p>",
27
+ "https://aikon.enpc.fr/sas/full_text" : "",
28
+ "https://iscd.huma-num.fr/sas/full_text" : ""
29
+ },
30
+ "on" : {
31
+ "@type": "oa:SpecificResource",
32
+ "full": "",
33
+ "selector": { "type": "FragmentSelector", "value": "#xywh=0,31,1529,1119" }
34
+ },
35
+ "motivation" : [ "oa:tagging", "oa:commenting" ],
36
+ "@context" : "http://iiif.io/api/presentation/2/context.json",
37
+ "label" : ""
38
+ }
39
+ ]
@@ -0,0 +1,39 @@
1
+ [
2
+ {
3
+ "@id" : "http://aikon.enpc.fr/sas/annotation/wit9_man11_anno165_c10_d47559c226ae4acaae2e50f5bbc6f4e8",
4
+ "@type" : "oa:Annotation",
5
+ "dcterms:created" : "2025-03-19T14:38:38",
6
+ "dcterms:modified" : "2025-03-19T14:38:38",
7
+ "resource" : {
8
+ "@type" : "dctypes:Text",
9
+ "format" : "text/html",
10
+ "chars" : "<p></p>",
11
+ "https://aikon.enpc.fr/sas/full_text" : "",
12
+ "https://iscd.huma-num.fr/sas/full_text" : ""
13
+ },
14
+ "on" : "https://aikon.enpc.fr/aikon/iiif/v2/wit9_man11_anno165/canvas/c10.json#xywh=5,0,1824,2161",
15
+ "motivation" : [ "oa:tagging", "oa:commenting" ],
16
+ "@context" : "http://iiif.io/api/presentation/2/context.json",
17
+ "label" : ""
18
+ }, {
19
+ "@id" : "http://aikon.enpc.fr/sas/annotation/wit9_man11_anno165_c11_403175bd3ee34e8bbc0df11e12c3c915",
20
+ "@type" : "oa:Annotation",
21
+ "dcterms:created" : "2025-03-19T14:38:38",
22
+ "dcterms:modified" : "2025-03-19T14:38:38",
23
+ "resource" : {
24
+ "@type" : "dctypes:Text",
25
+ "format" : "text/html",
26
+ "chars" : "<p></p>",
27
+ "https://aikon.enpc.fr/sas/full_text" : "",
28
+ "https://iscd.huma-num.fr/sas/full_text" : ""
29
+ },
30
+ "on" : {
31
+ "@type": "oa:SpecificResource",
32
+ "full": "https://aikon.enpc.fr/aikon/iiif/v2/wit9_man11_anno165/canvas/c11.json",
33
+ "selector": { "type": "FragmentSelector", "value": "#xywh=0,31,1529,1119" }
34
+ },
35
+ "motivation" : [ "oa:tagging", "oa:commenting" ],
36
+ "@context" : "http://iiif.io/api/presentation/2/context.json",
37
+ "label" : ""
38
+ }
39
+ ]