You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/spec-formats-tsv.md
-21Lines changed: 0 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,27 +111,6 @@ As stated in the description of the model ([Identifiers section](spec-model.md#i
111
111
A SSSOM/TSV writer SHOULD refuse to serialise a mapping set that contains IRIs that cannot be contracted into CURIEs because there is no suitable prefix declaration in its CURIE map. The use of a custom, ad-hoc logic to infer a possible prefix name where none has been provided (e.g., “if the IRI ends with a `ZZZ_NNNNNNN` pattern, turn it into a `ZZZ:NNNNNNN` CURIE”) is strongly discouraged.
112
112
113
113
114
-
## Propagatable slots
115
-
116
-
As [explained in another section](spec-model.md#propagation-of-mapping-set-slots), some slots in the `MappingSet` class are intended, not to describe the mapping set itself, but to store values that are shared by all mappings in the set. These slots are called the “propagatable slots”, because their values should be “propagated” from the mapping set down to the individual mappings.
117
-
118
-
### Propagation
119
-
120
-
“Propagation” is the operation of assigning to individual mappings in a set the values from the propagatable slots of the set. That operation SHOULD be performed by a SSSOM/TSV parser before passing the parsed objects to the application code.
121
-
122
-
For any given propagatable slot, propagation is only allowed if none of the individual mappings already have their own value in that slot. If any mapping (even only one mapping) has a value in that slot, then the slot MUST be considered as non-propagatable. Otherwise, a propagating SSSOM/TSV parser MUST (1) copy over the value of the propagatable slot on the `MappingSet` object to the corresponding slot of every individual `Mapping` objects, and (2) remove the propagated value from the `MappingSet` object.
123
-
124
-
Implementations that support propagation MUST also support condensation.
125
-
126
-
### Condensation
127
-
128
-
“Condensation” is the opposite of “propagation”. It is the operation of assigning common values to the propagatable slots of the set, based on the values of these slots on individual mappings. That operation SHOULD be performed by a SSSOM/TSV writer prior to writing a set into a SSSOM/TSV file, but that behaviour, if available, MUST be deactivatable.
129
-
130
-
For any given propagatable slot, condensation is only allowed if (1) all mappings in the set have the same value, and (2) the mapping set does not already have a value in the slot, unless that value happens to be the same as the value in all mappings. If those two conditions are met, then a condensating SSSOM/TSV writer MUST (1) set the value of the slot on the `MappingSet` object to the common value of the slot in all mappings, and (2) remove the condensed value from the individual `Mapping` object.
131
-
132
-
Implementations that support condensation MUST also support propagation.
133
-
134
-
135
114
## Non-standard slots
136
115
137
116
If an implementation does not support [non-standard slots](spec-model.md#non-standard-slots), then:
Copy file name to clipboardExpand all lines: src/docs/spec-model.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Whenever the CURIE syntax is used in a mapping set (whether this is by choice of
32
32
By exception, prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the `curie_map`. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table.
33
33
34
34
35
-
## Propagation of mapping set slots
35
+
## Propagatable slots
36
36
37
37
As mentioned briefly above, there are two different types of slots in the `MappingSet` class:
38
38
@@ -69,6 +69,28 @@ This mechanism is intended as a convenience, so that a slot which has the same v
69
69
70
70
Slots that are not in the above list (“non-propagatable slots”) describe the mapping set itself, not the mappings it contains, even if the slot also exists on the `Mapping` class. For example, the `creator_id` slot, when used in the `MappingSet` class, is intended to refer to the creators of the set, _not_ the creators of the individual mappings (which may be different, and which are listed in the `creator_id` slot of every mapping).
71
71
72
+
### Propagation
73
+
74
+
“Propagation” is the operation of assigning to individual mapping records in a set the values from the propagatable slots of the set.
75
+
76
+
For any given propagatable slot, propagation is only allowed if none of the individual mapping records already have their own value in that slot. If any record (even only one record) has a value in that slot, then the slot MUST be considered as non-propagatable. Otherwise, to propagate the slot an implementation MUST (1) copy over the value of the propagatable slot on the mapping set to the corresponding slot of every individual mapping records, and (2) remove the propagated value from the mapping set.
77
+
78
+
### Condensation
79
+
80
+
“Condensation” is the opposite of “propagation”. It is the operation of assigning common values to the propagatable slots of the set, based on the values of these slots on individual mapping records.
81
+
82
+
For any given propagatable slot, condensation is only allowed if (1) all mapping records in the set have the same value for that slot, and (2) the mapping set itself does not already have a value in the slot, unless that value happens to be the same as the value in all records. If those two conditions are met, then to condense the slot an implementation MUST (1) set the value of the slot on the mapping set to the common value of the slot in all mapping records, and (2) remove the condensed value from all the mapping records.
83
+
84
+
### When to perform propagation and condensation
85
+
86
+
Implementations SHOULD support propagation and condensation. The two features MUST NOT be dissociated; that is, an implementation that supports propagation MUST also support condensation, and the other way round.
87
+
88
+
Unless specified otherwise in the specification for the [SSSOM serialisation formats](spec-formats.md), if an implementation supports propagation and condensation, then:
89
+
90
+
* propagation SHOULD be performed by a SSSOM parser before passing the parsed objects to the application code;
91
+
92
+
* condensation SHOULD be performed by a SSSOM writer prior to writing the set into a file, however that behaviour MUST be deactivatable.
0 commit comments