linked-rolls 0.55.0 → 0.57.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.
package/lib/schema.json CHANGED
@@ -793,97 +793,6 @@
793
793
  "type": "object",
794
794
  "ontology": "crm:E7 Activity"
795
795
  },
796
- "GluedOn": {
797
- "description": "A piece of material (paper or tape) glued onto the roll surface. Glued-on features are typically used to cover perforations (for corrections) or to reinforce damaged areas. They may themselves carry other features such as writings or additional holes.",
798
- "properties": {
799
- "condition": {
800
- "$ref": "#/definitions/ObjectAssumption%3CConditionState%3C(%22detaching%22%7C%22ripped%22)%3E%3E",
801
- "description": "This can be used e.g. to indicate a perforation which is torn out or in any other way damaged.",
802
- "ontology": "crm:P44 has condition"
803
- },
804
- "depiction": {
805
- "description": "IIIF region pointing to a depiction of this feature in the scan.",
806
- "type": "string",
807
- "ontology": "crm:P138i has representation"
808
- },
809
- "features": {
810
- "description": "A glued-on feature itself may carry other features. Nested features do not need to be positioned explicitly.",
811
- "items": {
812
- "$ref": "#/definitions/NestedFeature"
813
- },
814
- "type": "array",
815
- "ontology": "crm:P46 is composed of"
816
- },
817
- "horizontal": {
818
- "$ref": "#/definitions/HorizontalSpan",
819
- "description": "Horizontal span of the feature on the roll.",
820
- "ontology": "crm:P43 has dimension"
821
- },
822
- "material": {
823
- "description": "The material of the glued-on feature.",
824
- "enum": [
825
- "paper",
826
- "tape"
827
- ],
828
- "type": "string",
829
- "ontology": "crm:P45 consists of"
830
- },
831
- "rotation": {
832
- "$ref": "#/definitions/Measure%3C%22deg%22%3E",
833
- "description": "How far the patch was stuck on askew. At zero its edges stand square to the roll, and the angle turns them towards the end of it, as a writing's reading direction turns.",
834
- "ontology": "reo:rotation"
835
- },
836
- "side": {
837
- "description": "The face of the roll it lies on: the side that faces the reader as the roll plays, or the back of it.",
838
- "enum": [
839
- "recto",
840
- "verso"
841
- ],
842
- "type": "string",
843
- "ontology": "reo:side"
844
- },
845
- "vertical": {
846
- "$ref": "#/definitions/VerticalSpan",
847
- "description": "Vertical span of the feature on the roll.",
848
- "ontology": "crm:P43 has dimension"
849
- },
850
- "@id": {
851
- "description": "A unique identifier for this object.",
852
- "type": "string"
853
- },
854
- "@type": {
855
- "const": "GluedOn",
856
- "description": "The type discriminator for this object.",
857
- "type": "string",
858
- "ontology": "rdf:type"
859
- },
860
- "bears": {
861
- "type": "array",
862
- "items": {
863
- "type": "object",
864
- "properties": {
865
- "@id": {
866
- "type": "string"
867
- }
868
- },
869
- "required": [
870
- "@id"
871
- ]
872
- },
873
- "description": "The features the patch bears. Derived on export.",
874
- "ontology": "crm:P56 bears feature"
875
- }
876
- },
877
- "required": [
878
- "horizontal",
879
- "@id",
880
- "material",
881
- "@type",
882
- "vertical"
883
- ],
884
- "type": "object",
885
- "ontology": "reo:GluedOn"
886
- },
887
796
  "HoleChain": {
888
797
  "description": "A chain of holes punched along the roll, which the tracker bar reads as it passes. The perforator cuts a held note or function as a row of punches with bridges of paper left between them, so most perforations are chains; one without a bridge is a chain of a single hole. The holes are the chain's parts and are not stated one by one. A punched chain is a human-made feature: CRM counts \"the information encoding features on mechanical or digital carriers\" among the features purposely created by human activity.",
889
798
  "properties": {
@@ -1254,7 +1163,7 @@
1254
1163
  "added": {
1255
1164
  "description": "The patches glued onto the copy, each with whatever it bears.",
1256
1165
  "items": {
1257
- "$ref": "#/definitions/GluedOn"
1166
+ "$ref": "#/definitions/Patch"
1258
1167
  },
1259
1168
  "type": "array",
1260
1169
  "ontology": "crm:P111 added"
@@ -1312,7 +1221,7 @@
1312
1221
  "$ref": "#/definitions/AnyFeature"
1313
1222
  },
1314
1223
  "type": "array",
1315
- "ontology": "crm:P108 has produced"
1224
+ "ontology": "reo:produced"
1316
1225
  },
1317
1226
  "purpose": {
1318
1227
  "$ref": "#/definitions/ModificationPurpose",
@@ -1608,7 +1517,7 @@
1608
1517
  "ontology": "crm:P138i has representation"
1609
1518
  },
1610
1519
  "features": {
1611
- "description": "A glued-on feature itself may carry other features. Nested features do not need to be positioned explicitly.",
1520
+ "description": "The features the patch itself carries. They need not be positioned explicitly.",
1612
1521
  "items": {
1613
1522
  "$ref": "#/definitions/NestedFeature"
1614
1523
  },
@@ -1621,7 +1530,7 @@
1621
1530
  "ontology": "crm:P43 has dimension"
1622
1531
  },
1623
1532
  "material": {
1624
- "description": "The material of the glued-on feature.",
1533
+ "description": "What the patch is made of.",
1625
1534
  "enum": [
1626
1535
  "paper",
1627
1536
  "tape"
@@ -1653,26 +1562,10 @@
1653
1562
  "type": "string"
1654
1563
  },
1655
1564
  "@type": {
1656
- "const": "GluedOn",
1565
+ "const": "Patch",
1657
1566
  "description": "The type discriminator for this object.",
1658
1567
  "type": "string",
1659
1568
  "ontology": "rdf:type"
1660
- },
1661
- "bears": {
1662
- "type": "array",
1663
- "items": {
1664
- "type": "object",
1665
- "properties": {
1666
- "@id": {
1667
- "type": "string"
1668
- }
1669
- },
1670
- "required": [
1671
- "@id"
1672
- ]
1673
- },
1674
- "description": "The features the patch bears. Derived on export.",
1675
- "ontology": "crm:P56 bears feature"
1676
1569
  }
1677
1570
  },
1678
1571
  "required": [
@@ -1773,17 +1666,10 @@
1773
1666
  "description": "A free-text description of the condition, providing details beyond the type classification.",
1774
1667
  "type": "string",
1775
1668
  "ontology": "crm:P3 has note"
1776
- },
1777
- "@type": {
1778
- "const": "ConditionState",
1779
- "description": "The type discriminator for this object.",
1780
- "type": "string",
1781
- "ontology": "rdf:type"
1782
1669
  }
1783
1670
  },
1784
1671
  "required": [
1785
- "conditionType",
1786
- "@type"
1672
+ "conditionType"
1787
1673
  ],
1788
1674
  "type": "object"
1789
1675
  },
@@ -1823,18 +1709,11 @@
1823
1709
  "description": "The stretch factor, e.g. 1.02 means the paper has stretched by 2% compared to its original dimensions.",
1824
1710
  "type": "number",
1825
1711
  "ontology": "rdf:value"
1826
- },
1827
- "@type": {
1828
- "const": "ConditionState",
1829
- "description": "The type discriminator for this object.",
1830
- "type": "string",
1831
- "ontology": "rdf:type"
1832
1712
  }
1833
1713
  },
1834
1714
  "required": [
1835
1715
  "conditionType",
1836
- "factor",
1837
- "@type"
1716
+ "factor"
1838
1717
  ],
1839
1718
  "type": "object"
1840
1719
  }
@@ -2077,17 +1956,10 @@
2077
1956
  "description": "A free-text description of the condition, providing details beyond the type classification.",
2078
1957
  "type": "string",
2079
1958
  "ontology": "crm:P3 has note"
2080
- },
2081
- "@type": {
2082
- "const": "ConditionState",
2083
- "description": "The type discriminator for this object.",
2084
- "type": "string",
2085
- "ontology": "rdf:type"
2086
1959
  }
2087
1960
  },
2088
1961
  "required": [
2089
- "conditionType",
2090
- "@type"
1962
+ "conditionType"
2091
1963
  ],
2092
1964
  "type": "object"
2093
1965
  },
@@ -2126,17 +1998,10 @@
2126
1998
  "description": "A free-text description of the condition, providing details beyond the type classification.",
2127
1999
  "type": "string",
2128
2000
  "ontology": "crm:P3 has note"
2129
- },
2130
- "@type": {
2131
- "const": "ConditionState",
2132
- "description": "The type discriminator for this object.",
2133
- "type": "string",
2134
- "ontology": "rdf:type"
2135
2001
  }
2136
2002
  },
2137
2003
  "required": [
2138
- "conditionType",
2139
- "@type"
2004
+ "conditionType"
2140
2005
  ],
2141
2006
  "type": "object"
2142
2007
  },
@@ -2172,17 +2037,10 @@
2172
2037
  "description": "A free-text description of the condition, providing details beyond the type classification.",
2173
2038
  "type": "string",
2174
2039
  "ontology": "crm:P3 has note"
2175
- },
2176
- "@type": {
2177
- "const": "ConditionState",
2178
- "description": "The type discriminator for this object.",
2179
- "type": "string",
2180
- "ontology": "rdf:type"
2181
2040
  }
2182
2041
  },
2183
2042
  "required": [
2184
- "conditionType",
2185
- "@type"
2043
+ "conditionType"
2186
2044
  ],
2187
2045
  "type": "object"
2188
2046
  },
@@ -2218,17 +2076,10 @@
2218
2076
  "description": "A free-text description of the condition, providing details beyond the type classification.",
2219
2077
  "type": "string",
2220
2078
  "ontology": "crm:P3 has note"
2221
- },
2222
- "@type": {
2223
- "const": "ConditionState",
2224
- "description": "The type discriminator for this object.",
2225
- "type": "string",
2226
- "ontology": "rdf:type"
2227
2079
  }
2228
2080
  },
2229
2081
  "required": [
2230
- "conditionType",
2231
- "@type"
2082
+ "conditionType"
2232
2083
  ],
2233
2084
  "type": "object"
2234
2085
  },
@@ -2267,17 +2118,10 @@
2267
2118
  "description": "A free-text description of the condition, providing details beyond the type classification.",
2268
2119
  "type": "string",
2269
2120
  "ontology": "crm:P3 has note"
2270
- },
2271
- "@type": {
2272
- "const": "ConditionState",
2273
- "description": "The type discriminator for this object.",
2274
- "type": "string",
2275
- "ontology": "rdf:type"
2276
2121
  }
2277
2122
  },
2278
2123
  "required": [
2279
- "conditionType",
2280
- "@type"
2124
+ "conditionType"
2281
2125
  ],
2282
2126
  "type": "object"
2283
2127
  },
@@ -2678,6 +2522,81 @@
2678
2522
  ],
2679
2523
  "type": "object"
2680
2524
  },
2525
+ "Patch": {
2526
+ "description": "A piece of paper or tape glued onto the roll: a label naming it, a strip covering perforations, or a patch reinforcing a tear. A patch may itself carry other features, such as writings or holes.",
2527
+ "properties": {
2528
+ "condition": {
2529
+ "$ref": "#/definitions/ObjectAssumption%3CConditionState%3C(%22detaching%22%7C%22ripped%22)%3E%3E",
2530
+ "description": "This can be used e.g. to indicate a perforation which is torn out or in any other way damaged.",
2531
+ "ontology": "crm:P44 has condition"
2532
+ },
2533
+ "depiction": {
2534
+ "description": "IIIF region pointing to a depiction of this feature in the scan.",
2535
+ "type": "string",
2536
+ "ontology": "crm:P138i has representation"
2537
+ },
2538
+ "features": {
2539
+ "description": "The features the patch itself carries. They need not be positioned explicitly.",
2540
+ "items": {
2541
+ "$ref": "#/definitions/NestedFeature"
2542
+ },
2543
+ "type": "array",
2544
+ "ontology": "crm:P46 is composed of"
2545
+ },
2546
+ "horizontal": {
2547
+ "$ref": "#/definitions/HorizontalSpan",
2548
+ "description": "Horizontal span of the feature on the roll.",
2549
+ "ontology": "crm:P43 has dimension"
2550
+ },
2551
+ "material": {
2552
+ "description": "What the patch is made of.",
2553
+ "enum": [
2554
+ "paper",
2555
+ "tape"
2556
+ ],
2557
+ "type": "string",
2558
+ "ontology": "crm:P45 consists of"
2559
+ },
2560
+ "rotation": {
2561
+ "$ref": "#/definitions/Measure%3C%22deg%22%3E",
2562
+ "description": "How far the patch was stuck on askew. At zero its edges stand square to the roll, and the angle turns them towards the end of it, as a writing's reading direction turns.",
2563
+ "ontology": "reo:rotation"
2564
+ },
2565
+ "side": {
2566
+ "description": "The face of the roll it lies on: the side that faces the reader as the roll plays, or the back of it.",
2567
+ "enum": [
2568
+ "recto",
2569
+ "verso"
2570
+ ],
2571
+ "type": "string",
2572
+ "ontology": "reo:side"
2573
+ },
2574
+ "vertical": {
2575
+ "$ref": "#/definitions/VerticalSpan",
2576
+ "description": "Vertical span of the feature on the roll.",
2577
+ "ontology": "crm:P43 has dimension"
2578
+ },
2579
+ "@id": {
2580
+ "description": "A unique identifier for this object.",
2581
+ "type": "string"
2582
+ },
2583
+ "@type": {
2584
+ "const": "Patch",
2585
+ "description": "The type discriminator for this object.",
2586
+ "type": "string",
2587
+ "ontology": "rdf:type"
2588
+ }
2589
+ },
2590
+ "required": [
2591
+ "horizontal",
2592
+ "@id",
2593
+ "material",
2594
+ "@type",
2595
+ "vertical"
2596
+ ],
2597
+ "type": "object",
2598
+ "ontology": "reo:Patch"
2599
+ },
2681
2600
  "Perforator": {
2682
2601
  "description": "The machine that punched the copy. It stands for this production alone. Whether it is the one another copy was punched on is left to a statement of identity made about it elsewhere, which its id allows.",
2683
2602
  "properties": {
@@ -2734,17 +2653,10 @@
2734
2653
  "$ref": "#/definitions/ObjectAssumption%3CMeasure%3C%22mm%22%3E%3E",
2735
2654
  "description": "The diameter of the round punch. Taken across the roll, it is the one value of the setting that neither the scale along the roll nor the shrinkage of the paper enters.",
2736
2655
  "ontology": "reo:punchDiameter"
2737
- },
2738
- "@type": {
2739
- "const": "ConditionState",
2740
- "description": "The type discriminator for this object.",
2741
- "type": "string",
2742
- "ontology": "rdf:type"
2743
2656
  }
2744
2657
  },
2745
2658
  "required": [
2746
- "conditionType",
2747
- "@type"
2659
+ "conditionType"
2748
2660
  ],
2749
2661
  "type": "object",
2750
2662
  "ontology": "crm:E3 Condition State"
@@ -2813,7 +2725,7 @@
2813
2725
  "$ref": "#/definitions/AnyFeature"
2814
2726
  },
2815
2727
  "type": "array",
2816
- "ontology": "crm:P108 has produced"
2728
+ "ontology": "reo:produced"
2817
2729
  },
2818
2730
  "speed": {
2819
2731
  "$ref": "#/definitions/ObjectAssumption%3CPaperSpeed%3E",
@@ -3152,38 +3064,6 @@
3152
3064
  "description": "The type discriminator for this object.",
3153
3065
  "type": "string",
3154
3066
  "ontology": "rdf:type"
3155
- },
3156
- "bears": {
3157
- "type": "array",
3158
- "items": {
3159
- "type": "object",
3160
- "properties": {
3161
- "@id": {
3162
- "type": "string"
3163
- }
3164
- },
3165
- "required": [
3166
- "@id"
3167
- ]
3168
- },
3169
- "description": "The features the copy bears, whichever of its acts brought them about. Derived on export.",
3170
- "ontology": "crm:P56 bears feature"
3171
- },
3172
- "composedOf": {
3173
- "type": "array",
3174
- "items": {
3175
- "type": "object",
3176
- "properties": {
3177
- "@id": {
3178
- "type": "string"
3179
- }
3180
- },
3181
- "required": [
3182
- "@id"
3183
- ]
3184
- },
3185
- "description": "The patches glued onto the copy. A patch is an object rather than a feature, so it is stated as a part. Derived on export.",
3186
- "ontology": "crm:P46 is composed of"
3187
3067
  }
3188
3068
  },
3189
3069
  "required": [
@@ -3361,19 +3241,12 @@
3361
3241
  "@id": {
3362
3242
  "description": "A unique identifier for this object.",
3363
3243
  "type": "string"
3364
- },
3365
- "@type": {
3366
- "const": "Version",
3367
- "description": "The type discriminator for this object.",
3368
- "type": "string",
3369
- "ontology": "rdf:type"
3370
3244
  }
3371
3245
  },
3372
3246
  "required": [
3373
3247
  "@id",
3374
3248
  "motivations",
3375
- "system",
3376
- "@type"
3249
+ "system"
3377
3250
  ],
3378
3251
  "type": "object",
3379
3252
  "ontology": "lrmoo:F2 Expression"
@@ -11,18 +11,15 @@
11
11
  "crminf": "http://www.cidoc-crm.org/extensions/crminf/",
12
12
  "lrmoo": "http://iflastandards.info/ns/lrm/lrmoo/",
13
13
  "reo": "https://w3id.org/reo/",
14
- "Edition": "lrmoo:F2_Expression",
15
- "Version": "lrmoo:F2_Expression",
16
14
  "RollCopy": "reo:RollCopy",
17
15
  "HoleChain": "reo:HoleChain",
18
16
  "Mark": "reo:Mark",
19
17
  "Writing": "reo:Writing",
20
- "GluedOn": "reo:GluedOn",
18
+ "Patch": "reo:Patch",
21
19
  "Attachment": "crm:E79_Part_Addition",
22
20
  "Removal": "crm:E80_Part_Removal",
23
21
  "Alteration": "crm:E12_Production",
24
22
  "Perforator": "crm:E22_Human-Made_Object",
25
- "ConditionState": "crm:E3_Condition_State",
26
23
  "note": "reo:Note",
27
24
  "expression": "reo:Expression",
28
25
  "text": {
@@ -280,7 +277,7 @@
280
277
  }
281
278
  },
282
279
  "actor": "crm:P14_carried_out_by",
283
- "produced": "crm:P108_has_produced",
280
+ "produced": "reo:produced",
284
281
  "added": "crm:P111_added",
285
282
  "removed": {
286
283
  "@id": "crm:P113_removed",
@@ -291,14 +288,6 @@
291
288
  "@type": "@vocab",
292
289
  "@context": { "@vocab": "https://w3id.org/reo/type/" }
293
290
  },
294
- "bears": {
295
- "@id": "crm:P56_bears_feature",
296
- "@type": "@id"
297
- },
298
- "composedOf": {
299
- "@id": "crm:P46_is_composed_of",
300
- "@type": "@id"
301
- },
302
291
  "augmented": {
303
292
  "@id": "crm:P110_augmented",
304
293
  "@type": "@id"
package/lib/witnesses.js CHANGED
@@ -70,7 +70,7 @@ const witnessesIn = (carriers, view, versionId) => {
70
70
  * reported as it stands. A version whose edits are not stated inserts
71
71
  * nothing and is witnessed by statement alone.
72
72
  */
73
- export const witnessesOf = (view, versionId) => view.get(versionId) ? witnessesIn(carriersIn(view), view, versionId) : [];
73
+ export const witnessesOf = (view, versionId) => view.version(versionId) ? witnessesIn(carriersIn(view), view, versionId) : [];
74
74
  /**
75
75
  * The versions the copy bears witness to, each with how, in the order the
76
76
  * edition lists its versions.
@@ -92,7 +92,7 @@ export const carriageProblems = (view) => {
92
92
  const version = idOf(statement);
93
93
  return [
94
94
  ...(carrying.has(copy.id) ? [{ copy: copy.id, version, problem: 'stated-beside-carriers' }] : []),
95
- ...(view.get(version)?.type === 'Version' ? [] : [{ copy: copy.id, version, problem: 'version-missing' }])
95
+ ...(view.version(version) ? [] : [{ copy: copy.id, version, problem: 'version-missing' }])
96
96
  ];
97
97
  }));
98
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linked-rolls",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "Digital editions of piano rolls: import, collation, editorial assumptions, JSON-LD export, and emulation through a reproducing system",
5
5
  "license": "MIT",
6
6
  "repository": {