glossarist 2.14.15 → 2.14.16
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a584d4edbe83762292055fa2a0e6af624d66a277b511a28ad34e01f03e4c05fc
|
|
4
|
+
data.tar.gz: d5e638432a0d281469f4531b4ded63047b68b8005cbdaeade9d09a32c75172dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1804db5d0ea4deaf8e87a35545570856a42d66593d8cf07e93bf43a1e81b464a13bd875590f022c6f548c0438a595f5b74d1e98ab394eed22f7d478cc229903
|
|
7
|
+
data.tar.gz: 6d5db078479e2824d7dfd82baa39a127e86f04bcfd1eee56be26000d6b5f372a23a31f0a39e5bdd66cdb765d241f5c80981d748fe7883cb093c0c11bcb6ddbc3
|
data/docs/data-format.adoc
CHANGED
|
@@ -150,24 +150,38 @@ Both snake_case and camelCase keys are accepted on read; the writer emits snake_
|
|
|
150
150
|
|
|
151
151
|
== Relations (relations/)
|
|
152
152
|
|
|
153
|
-
One file per n-ary relation, named `<slug>.yaml` under the comprehensive concept's id:
|
|
153
|
+
One file per n-ary relation (hyperedge), named `<criterion-slug>.yaml` under the comprehensive concept's id. The `type` field distinguishes the relation kind (`partitive_relation`, `generic_relation`, ...):
|
|
154
154
|
|
|
155
155
|
[,yaml]
|
|
156
156
|
----
|
|
157
157
|
---
|
|
158
|
+
type: partitive_relation
|
|
158
159
|
comprehensive:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
source: VIM
|
|
161
|
+
id: '112-02-09'
|
|
162
|
+
members:
|
|
163
|
+
- ref:
|
|
164
|
+
source: VIM
|
|
165
|
+
id: '112-02-10'
|
|
166
|
+
presence: required # or optional (ISO 704 line style)
|
|
167
|
+
count: exactly_one # or at_least_one / multiple
|
|
163
168
|
is_delimiting: false
|
|
164
|
-
- ref:
|
|
169
|
+
- ref:
|
|
170
|
+
source: VIM
|
|
171
|
+
id: '112-03-26'
|
|
165
172
|
completeness: complete # or partial
|
|
166
173
|
criterion:
|
|
167
|
-
eng:
|
|
174
|
+
eng: measurement result composition
|
|
168
175
|
----
|
|
169
176
|
|
|
170
|
-
ISO 704 requires at least two
|
|
177
|
+
ISO 704 requires at least two members per relation; `Validation::Rules` enforces structural invariants (GLS-2xx series).
|
|
178
|
+
|
|
179
|
+
A single comprehensive concept can carry N hyperedges (one per criterion of subdivision), each in its own file under `relations/<comprehensive-id>/`. Legacy files with a `partitives:` key (member list with the `multiplicity` enum instead of the `presence`/`count` decomposition) are read for backward compatibility; the writer emits the `members` form above.
|
|
180
|
+
|
|
181
|
+
[NOTE]
|
|
182
|
+
--
|
|
183
|
+
*Remaining transition step.* The concept-model shapes' property path still reads `hasPartitiveRelation`; the v3.3 shape bump renames it to `hasMember` (the native ontology property). The wire keys and semantics shown here are current.
|
|
184
|
+
--
|
|
171
185
|
|
|
172
186
|
== bibliography.yaml
|
|
173
187
|
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Glossarist
|
|
4
|
+
# Deprecated: retained for ABI compatibility only. No internal callers
|
|
5
|
+
# remain — build concepts as a plain Array and persist through
|
|
6
|
+
# GlossaryStore. Removal is slated for the next major release.
|
|
4
7
|
class ManagedConceptCollection
|
|
5
8
|
include Enumerable
|
|
6
9
|
|
|
7
10
|
attr_accessor :managed_concepts
|
|
8
11
|
|
|
9
12
|
def initialize(file_key: nil)
|
|
13
|
+
warn "[glossarist] ManagedConceptCollection is deprecated; use a " \
|
|
14
|
+
"plain Array and GlossaryStore (removal slated for 3.0)"
|
|
10
15
|
@managed_concepts = []
|
|
11
16
|
@managed_concepts_ids = {}
|
|
12
17
|
@file_key = file_key
|
|
@@ -15,7 +15,12 @@ module Glossarist
|
|
|
15
15
|
return nil unless reference.is_a?(ConceptReference)
|
|
16
16
|
return nil unless reference.source == @source_id
|
|
17
17
|
|
|
18
|
-
concepts
|
|
18
|
+
# concepts is any Enumerable of ManagedConcepts (Array or
|
|
19
|
+
# GlossaryStore); match the uuid or the data id, with version.
|
|
20
|
+
concepts.find do |c|
|
|
21
|
+
(c.uuid == reference.concept_id || c.data&.id == reference.concept_id) &&
|
|
22
|
+
(reference.version.nil? || c.version == reference.version)
|
|
23
|
+
end
|
|
19
24
|
end
|
|
20
25
|
end
|
|
21
26
|
end
|
|
@@ -58,7 +58,7 @@ module Glossarist
|
|
|
58
58
|
save_to_path(existing, dataset_path)
|
|
59
59
|
|
|
60
60
|
ImportResult.new(
|
|
61
|
-
concepts: existing
|
|
61
|
+
concepts: existing,
|
|
62
62
|
conflicts: result_state.conflicts,
|
|
63
63
|
source_files: xml_files,
|
|
64
64
|
skipped_count: result_state.skipped,
|
|
@@ -78,7 +78,7 @@ module Glossarist
|
|
|
78
78
|
existing_mc = index[key]
|
|
79
79
|
|
|
80
80
|
if existing_mc.nil?
|
|
81
|
-
existing
|
|
81
|
+
existing << mc
|
|
82
82
|
index[key] = mc
|
|
83
83
|
else
|
|
84
84
|
state.conflicts << DuplicateConflict.new(
|
|
@@ -179,26 +179,26 @@ module Glossarist
|
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
def replace_in_collection(collection, old_mc, new_mc)
|
|
182
|
-
collection.
|
|
183
|
-
collection
|
|
182
|
+
collection.delete(old_mc)
|
|
183
|
+
collection << new_mc
|
|
184
184
|
end
|
|
185
185
|
|
|
186
186
|
def load_existing(path)
|
|
187
|
-
collection =
|
|
187
|
+
collection = []
|
|
188
188
|
if path.end_with?(".gcr")
|
|
189
189
|
package = GcrPackage.load(path)
|
|
190
|
-
package.concepts.each { |mc| collection
|
|
190
|
+
package.concepts.each { |mc| collection << mc }
|
|
191
191
|
else
|
|
192
192
|
GlossaryStore.new.tap do |s|
|
|
193
193
|
s.load(path)
|
|
194
|
-
end.each_concept { |mc| collection
|
|
194
|
+
end.each_concept { |mc| collection << mc }
|
|
195
195
|
end
|
|
196
196
|
collection
|
|
197
197
|
end
|
|
198
198
|
|
|
199
199
|
def save_to_path(collection, path)
|
|
200
200
|
if path.end_with?(".gcr")
|
|
201
|
-
tmpdir = build_temp_dataset(collection
|
|
201
|
+
tmpdir = build_temp_dataset(collection)
|
|
202
202
|
begin
|
|
203
203
|
GC.start
|
|
204
204
|
tmp_gcr = "#{path}.tmp.#{Process.pid}"
|
|
@@ -215,7 +215,7 @@ module Glossarist
|
|
|
215
215
|
FileUtils.rm_f(tmp_gcr)
|
|
216
216
|
end
|
|
217
217
|
else
|
|
218
|
-
save_dataset(collection
|
|
218
|
+
save_dataset(collection, path)
|
|
219
219
|
end
|
|
220
220
|
end
|
|
221
221
|
|
data/lib/glossarist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glossarist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.14.
|
|
4
|
+
version: 2.14.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|