glossarist 2.8.1 → 2.8.4

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.rubocop_todo.yml +413 -63
  4. data/CLAUDE.md +1 -1
  5. data/Gemfile +1 -1
  6. data/README.adoc +4 -1
  7. data/glossarist.gemspec +2 -1
  8. data/lib/glossarist/bibliography_data.rb +41 -0
  9. data/lib/glossarist/bibliography_entry.rb +13 -0
  10. data/lib/glossarist/citation.rb +8 -2
  11. data/lib/glossarist/cli/export_command.rb +10 -5
  12. data/lib/glossarist/cli/validate_command.rb +21 -5
  13. data/lib/glossarist/collection.rb +2 -2
  14. data/lib/glossarist/collections/bibliography_collection.rb +2 -1
  15. data/lib/glossarist/collections/collection.rb +2 -2
  16. data/lib/glossarist/collections/localization_collection.rb +4 -4
  17. data/lib/glossarist/concept_collector.rb +6 -6
  18. data/lib/glossarist/concept_document.rb +2 -3
  19. data/lib/glossarist/concept_manager.rb +6 -8
  20. data/lib/glossarist/concept_set.rb +4 -4
  21. data/lib/glossarist/concept_store.rb +84 -0
  22. data/lib/glossarist/dataset_validator.rb +2 -1
  23. data/lib/glossarist/gcr_package_definition.rb +37 -0
  24. data/lib/glossarist/gcr_statistics.rb +2 -2
  25. data/lib/glossarist/glossary_definition.rb +1 -1
  26. data/lib/glossarist/glossary_store.rb +201 -0
  27. data/lib/glossarist/managed_concept_collection.rb +2 -2
  28. data/lib/glossarist/managed_concept_data.rb +2 -0
  29. data/lib/glossarist/rdf/gloss_citation.rb +8 -4
  30. data/lib/glossarist/rdf/gloss_concept.rb +13 -4
  31. data/lib/glossarist/rdf/gloss_concept_date.rb +4 -2
  32. data/lib/glossarist/rdf/gloss_concept_reference.rb +6 -3
  33. data/lib/glossarist/rdf/gloss_concept_source.rb +6 -3
  34. data/lib/glossarist/rdf/gloss_designation.rb +63 -26
  35. data/lib/glossarist/rdf/gloss_grammar_info.rb +19 -9
  36. data/lib/glossarist/rdf/gloss_locality.rb +6 -3
  37. data/lib/glossarist/rdf/gloss_localized_concept.rb +14 -7
  38. data/lib/glossarist/rdf/gloss_non_verbal_rep.rb +9 -4
  39. data/lib/glossarist/rdf/gloss_pronunciation.rb +13 -6
  40. data/lib/glossarist/rdf/gloss_reference.rb +8 -4
  41. data/lib/glossarist/rdf/namespaces.rb +3 -2
  42. data/lib/glossarist/rdf/relationship_predicates.rb +79 -0
  43. data/lib/glossarist/rdf/v3/configuration.rb +0 -2
  44. data/lib/glossarist/rdf/v3.rb +4 -43
  45. data/lib/glossarist/rdf.rb +26 -23
  46. data/lib/glossarist/register_data.rb +68 -18
  47. data/lib/glossarist/schema_migration.rb +8 -5
  48. data/lib/glossarist/sts/importer.rb +0 -1
  49. data/lib/glossarist/transforms/concept_to_gloss_transform.rb +57 -72
  50. data/lib/glossarist/v2/concept_data.rb +2 -1
  51. data/lib/glossarist/v2/concept_document.rb +1 -1
  52. data/lib/glossarist/v2/configuration.rb +0 -2
  53. data/lib/glossarist/v2/managed_concept_data.rb +1 -0
  54. data/lib/glossarist/v2.rb +12 -12
  55. data/lib/glossarist/v3/concept_data.rb +2 -1
  56. data/lib/glossarist/v3/concept_document.rb +1 -1
  57. data/lib/glossarist/v3/configuration.rb +0 -2
  58. data/lib/glossarist/v3/managed_concept_data.rb +1 -0
  59. data/lib/glossarist/v3.rb +16 -16
  60. data/lib/glossarist/validation/asset_index.rb +2 -2
  61. data/lib/glossarist/validation/bibliography_index.rb +11 -8
  62. data/lib/glossarist/validation/rules/asciidoc_xref_rule.rb +2 -1
  63. data/lib/glossarist/validation/rules/authoritative_source_rule.rb +1 -1
  64. data/lib/glossarist/validation/rules/bibliography_yaml_rule.rb +1 -1
  65. data/lib/glossarist/validation/rules/citation_completeness_rule.rb +1 -1
  66. data/lib/glossarist/validation/rules/concept_count_rule.rb +2 -3
  67. data/lib/glossarist/validation/rules/concept_id_rule.rb +0 -1
  68. data/lib/glossarist/validation/rules/concept_id_uniqueness_rule.rb +0 -1
  69. data/lib/glossarist/validation/rules/concept_mention_rule.rb +1 -2
  70. data/lib/glossarist/validation/rules/concept_status_rule.rb +1 -2
  71. data/lib/glossarist/validation/rules/concept_uri_rule.rb +1 -1
  72. data/lib/glossarist/validation/rules/date_type_rule.rb +5 -3
  73. data/lib/glossarist/validation/rules/date_validity_rule.rb +1 -1
  74. data/lib/glossarist/validation/rules/definition_content_rule.rb +1 -2
  75. data/lib/glossarist/validation/rules/domain_target_rule.rb +1 -1
  76. data/lib/glossarist/validation/rules/duplicate_term_rule.rb +1 -2
  77. data/lib/glossarist/validation/rules/entry_status_rule.rb +1 -2
  78. data/lib/glossarist/validation/rules/filename_id_rule.rb +2 -3
  79. data/lib/glossarist/validation/rules/image_reference_rule.rb +3 -2
  80. data/lib/glossarist/validation/rules/l10n_uuid_integrity_rule.rb +1 -2
  81. data/lib/glossarist/validation/rules/language_coverage_rule.rb +1 -2
  82. data/lib/glossarist/validation/rules/language_list_rule.rb +2 -3
  83. data/lib/glossarist/validation/rules/locality_completeness_rule.rb +3 -1
  84. data/lib/glossarist/validation/rules/localization_consistency_rule.rb +1 -1
  85. data/lib/glossarist/validation/rules/localization_presence_rule.rb +0 -1
  86. data/lib/glossarist/validation/rules/model_validity_rule.rb +1 -1
  87. data/lib/glossarist/validation/rules/orphaned_bibliography_rule.rb +2 -1
  88. data/lib/glossarist/validation/rules/orphaned_images_rule.rb +6 -4
  89. data/lib/glossarist/validation/rules/orphaned_l10n_files_rule.rb +1 -2
  90. data/lib/glossarist/validation/rules/preferred_term_rule.rb +1 -2
  91. data/lib/glossarist/validation/rules/related_concept_cycle_rule.rb +2 -2
  92. data/lib/glossarist/validation/rules/related_concept_rule.rb +1 -2
  93. data/lib/glossarist/validation/rules/related_concept_symmetry_rule.rb +1 -1
  94. data/lib/glossarist/validation/rules/related_concept_target_rule.rb +1 -1
  95. data/lib/glossarist/validation/rules/source_type_rule.rb +2 -2
  96. data/lib/glossarist/validation/rules/source_urn_format_rule.rb +2 -2
  97. data/lib/glossarist/validation/rules/terms_presence_rule.rb +1 -1
  98. data/lib/glossarist/validation/rules/uuid_format_rule.rb +1 -1
  99. data/lib/glossarist/validation/rules.rb +18 -49
  100. data/lib/glossarist/version.rb +1 -1
  101. data/lib/glossarist.rb +13 -11
  102. data/scripts/migrate_dataset.rb +14 -8
  103. data/scripts/migrate_isotc204_to_v3.rb +3 -1
  104. data/scripts/migrate_isotc211_to_v3.rb +5 -3
  105. data/scripts/migrate_osgeo_to_v3.rb +4 -2
  106. data/scripts/upgrade_dataset_to_v3.rb +0 -0
  107. metadata +24 -11
  108. data/lib/glossarist/rdf/ext/jsonld_transform_ext.rb +0 -208
  109. data/lib/glossarist/rdf/ext/mapping_ext.rb +0 -37
  110. data/lib/glossarist/rdf/ext/mapping_rule_ext.rb +0 -27
  111. data/lib/glossarist/rdf/ext/member_rule_ext.rb +0 -34
  112. data/lib/glossarist/rdf/ext/turtle_transform_ext.rb +0 -222
  113. data/lib/glossarist/rdf/ext.rb +0 -39
  114. data/lib/glossarist/rdf/relationships.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9161012e7bc694c31f1450dfdc28538de9b559c4ca3cbf6fd7aad8427976d44
4
- data.tar.gz: 465de2a3598f6a21fa007068b7fb4b282bd8e917fdb9e226636830bd24fc88ef
3
+ metadata.gz: 89c7a717dae1507460851447c6a4d30699ef02c7eef890ed4c58da9ec14bda8a
4
+ data.tar.gz: 629d99f655aeee99db137139ee6f49173f5bf26d56c7452c035f63c56af7d961
5
5
  SHA512:
6
- metadata.gz: db1a01d3b4c1da4ec1e1ea9c15c976c0c11aaa1c53e7ac38ec2d6d3a87d6c2b23c26ac0606f16aba395e01bb7ada4c32401436af23cae94081582bc19aa155f1
7
- data.tar.gz: 4471a27273205c88f7f8f0eaa397a351ef23a9d5abc53c397665ac3d8a1f9321b29b289d5151da380bb742e217c0739595f34aff15b13fe4f0cb905c6f5dffb6
6
+ metadata.gz: de839b4b877b200bd870fb57d438491ac4e8f8ecfbf5a99c68c40abec4bad695071cdef108e626b28913329839ea49587973b43a80a7896d98f65e8fb6ac064b
7
+ data.tar.gz: 3ec787b9b02f6febf1c19475986842731bd9e831f753c10258b7bb0b10ee04b36aaa04b4b07297f994e91dc72df929f4585a6abf451da469a5bf3906dd127564
data/.rubocop.yml CHANGED
@@ -8,4 +8,4 @@ inherit_from:
8
8
  # ...
9
9
 
10
10
  AllCops:
11
- TargetRubyVersion: 2.5
11
+ TargetRubyVersion: 3.1
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-13 07:45:58 UTC using RuboCop version 1.86.1.
3
+ # on 2026-06-03 01:34:20 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,63 +11,230 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'glossarist.gemspec'
13
13
 
14
- # Offense count: 3
14
+ # Offense count: 166
15
15
  # This cop supports safe autocorrection (--autocorrect).
16
16
  # Configuration parameters: EnforcedStyle, IndentationWidth.
17
17
  # SupportedStyles: with_first_argument, with_fixed_indentation
18
18
  Layout/ArgumentAlignment:
19
+ Enabled: false
20
+
21
+ # Offense count: 42
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
24
+ # SupportedStyles: with_first_element, with_fixed_indentation
25
+ Layout/ArrayAlignment:
19
26
  Exclude:
20
- - 'lib/glossarist/designation/expression.rb'
21
- - 'spec/unit/designations_spec.rb'
27
+ - 'lib/glossarist/rdf/relationship_predicates.rb'
28
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
29
+ - 'spec/unit/rdf/rdf_view_classes_spec.rb'
30
+ - 'spec/unit/rdf/round_trip_spec.rb'
31
+ - 'spec/unit/tags_spec.rb'
32
+ - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
22
33
 
23
- # Offense count: 1
34
+ # Offense count: 2
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ # Configuration parameters: IndentationWidth.
37
+ Layout/AssignmentIndentation:
38
+ Exclude:
39
+ - 'lib/glossarist/citation.rb'
40
+
41
+ # Offense count: 20
24
42
  # This cop supports safe autocorrection (--autocorrect).
25
43
  # Configuration parameters: EnforcedStyleAlignWith.
26
44
  # SupportedStylesAlignWith: either, start_of_block, start_of_line
27
45
  Layout/BlockAlignment:
28
46
  Exclude:
29
- - 'spec/unit/designations_spec.rb'
47
+ - 'lib/glossarist/rdf/gloss_designation.rb'
48
+ - 'lib/glossarist/rdf/gloss_grammar_info.rb'
49
+ - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
50
+ - 'lib/glossarist/rdf/gloss_pronunciation.rb'
51
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
52
+ - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
53
+ - 'scripts/migrate_isotc204_to_v3.rb'
54
+ - 'scripts/migrate_isotc211_to_v3.rb'
55
+ - 'scripts/migrate_osgeo_to_v3.rb'
56
+ - 'spec/unit/concept_comparator_spec.rb'
57
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
58
+ - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
30
59
 
31
- # Offense count: 1
60
+ # Offense count: 19
32
61
  # This cop supports safe autocorrection (--autocorrect).
33
62
  Layout/BlockEndNewline:
34
63
  Exclude:
35
- - 'spec/unit/designations_spec.rb'
64
+ - 'lib/glossarist/rdf/gloss_designation.rb'
65
+ - 'lib/glossarist/rdf/gloss_grammar_info.rb'
66
+ - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
67
+ - 'lib/glossarist/rdf/gloss_pronunciation.rb'
68
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
69
+ - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
70
+ - 'scripts/migrate_isotc204_to_v3.rb'
71
+ - 'scripts/migrate_isotc211_to_v3.rb'
72
+ - 'scripts/migrate_osgeo_to_v3.rb'
73
+ - 'spec/unit/concept_comparator_spec.rb'
74
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
75
+ - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
36
76
 
37
- # Offense count: 7
77
+ # Offense count: 16
78
+ # This cop supports safe autocorrection (--autocorrect).
79
+ Layout/ClosingParenthesisIndentation:
80
+ Exclude:
81
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
82
+ - 'scripts/migrate_dataset.rb'
83
+ - 'spec/features/v2_serialization_spec.rb'
84
+ - 'spec/unit/rdf/round_trip_spec.rb'
85
+ - 'spec/unit/validation_result_spec.rb'
86
+
87
+ # Offense count: 1
88
+ # This cop supports safe autocorrection (--autocorrect).
89
+ Layout/ElseAlignment:
90
+ Exclude:
91
+ - 'lib/glossarist/cli/validate_command.rb'
92
+
93
+ # Offense count: 10
94
+ # This cop supports safe autocorrection (--autocorrect).
95
+ Layout/EmptyLineAfterGuardClause:
96
+ Exclude:
97
+ - 'lib/glossarist/collections/bibliography_collection.rb'
98
+ - 'lib/glossarist/register_data.rb'
99
+ - 'lib/glossarist/validation/rules/asciidoc_xref_rule.rb'
100
+ - 'lib/glossarist/validation/rules/date_type_rule.rb'
101
+ - 'lib/glossarist/validation/rules/image_reference_rule.rb'
102
+ - 'lib/glossarist/validation/rules/orphaned_bibliography_rule.rb'
103
+ - 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
104
+ - 'scripts/migrate_dataset.rb'
105
+ - 'spec/unit/glossary_store_spec.rb'
106
+
107
+ # Offense count: 2
108
+ # This cop supports safe autocorrection (--autocorrect).
109
+ # Configuration parameters: EnforcedStyleAlignWith.
110
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
111
+ Layout/EndAlignment:
112
+ Exclude:
113
+ - 'lib/glossarist/cli/validate_command.rb'
114
+ - 'scripts/migrate_dataset.rb'
115
+
116
+ # Offense count: 3
117
+ # This cop supports safe autocorrection (--autocorrect).
118
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
119
+ Layout/ExtraSpacing:
120
+ Exclude:
121
+ - 'lib/glossarist/rdf/namespaces.rb'
122
+ - 'scripts/migrate_isotc211_to_v3.rb'
123
+
124
+ # Offense count: 16
125
+ # This cop supports safe autocorrection (--autocorrect).
126
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
127
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
128
+ Layout/FirstArgumentIndentation:
129
+ Exclude:
130
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
131
+ - 'scripts/migrate_dataset.rb'
132
+ - 'spec/features/v2_serialization_spec.rb'
133
+ - 'spec/unit/rdf/round_trip_spec.rb'
134
+ - 'spec/unit/validation_result_spec.rb'
135
+
136
+ # Offense count: 22
137
+ # This cop supports safe autocorrection (--autocorrect).
138
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
139
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
140
+ Layout/FirstHashElementIndentation:
141
+ Exclude:
142
+ - 'lib/glossarist/glossary_store.rb'
143
+ - 'spec/unit/concept_comparator_spec.rb'
144
+ - 'spec/unit/glossary_store_spec.rb'
145
+ - 'spec/unit/schema_version_spec.rb'
146
+ - 'spec/unit/validation/rules/model_validity_rule_spec.rb'
147
+
148
+ # Offense count: 172
38
149
  # This cop supports safe autocorrection (--autocorrect).
39
150
  # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
40
151
  # SupportedHashRocketStyles: key, separator, table
41
152
  # SupportedColonStyles: key, separator, table
42
153
  # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
43
154
  Layout/HashAlignment:
44
- Exclude:
45
- - 'spec/unit/concept_data_spec.rb'
46
- - 'spec/unit/designations_spec.rb'
155
+ Enabled: false
47
156
 
48
- # Offense count: 2
157
+ # Offense count: 40
49
158
  # This cop supports safe autocorrection (--autocorrect).
50
159
  # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
51
160
  # SupportedStylesAlignWith: start_of_line, relative_to_receiver
52
161
  Layout/IndentationWidth:
53
162
  Exclude:
54
- - 'spec/unit/designations_spec.rb'
163
+ - 'lib/glossarist/cli/validate_command.rb'
164
+ - 'lib/glossarist/rdf/gloss_designation.rb'
165
+ - 'lib/glossarist/rdf/gloss_grammar_info.rb'
166
+ - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
167
+ - 'lib/glossarist/rdf/gloss_pronunciation.rb'
168
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
169
+ - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
170
+ - 'scripts/migrate_dataset.rb'
171
+ - 'scripts/migrate_isotc204_to_v3.rb'
172
+ - 'scripts/migrate_isotc211_to_v3.rb'
173
+ - 'scripts/migrate_osgeo_to_v3.rb'
174
+ - 'spec/unit/concept_comparator_spec.rb'
175
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
176
+ - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
55
177
 
56
- # Offense count: 267
178
+ # Offense count: 668
57
179
  # This cop supports safe autocorrection (--autocorrect).
58
180
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
59
181
  # URISchemes: http, https
60
182
  Layout/LineLength:
61
183
  Enabled: false
62
184
 
63
- # Offense count: 7
185
+ # Offense count: 1
186
+ # This cop supports safe autocorrection (--autocorrect).
187
+ Layout/MultilineBlockLayout:
188
+ Exclude:
189
+ - 'spec/unit/concept_comparator_spec.rb'
190
+
191
+ # Offense count: 5
192
+ # This cop supports safe autocorrection (--autocorrect).
193
+ # Configuration parameters: EnforcedStyle.
194
+ # SupportedStyles: symmetrical, new_line, same_line
195
+ Layout/MultilineHashBraceLayout:
196
+ Exclude:
197
+ - 'spec/unit/concept_comparator_spec.rb'
198
+ - 'spec/unit/schema_version_spec.rb'
199
+ - 'spec/unit/validation/rules/model_validity_rule_spec.rb'
200
+
201
+ # Offense count: 15
202
+ # This cop supports safe autocorrection (--autocorrect).
203
+ # Configuration parameters: EnforcedStyle.
204
+ # SupportedStyles: symmetrical, new_line, same_line
205
+ Layout/MultilineMethodCallBraceLayout:
206
+ Exclude:
207
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
208
+ - 'scripts/migrate_dataset.rb'
209
+ - 'spec/unit/rdf/round_trip_spec.rb'
210
+ - 'spec/unit/validation_result_spec.rb'
211
+
212
+ # Offense count: 1
213
+ # This cop supports safe autocorrection (--autocorrect).
214
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
215
+ # SupportedStyles: aligned, indented
216
+ Layout/MultilineOperationIndentation:
217
+ Exclude:
218
+ - 'lib/glossarist/collections/bibliography_collection.rb'
219
+
220
+ # Offense count: 16
221
+ # This cop supports safe autocorrection (--autocorrect).
222
+ # Configuration parameters: EnforcedStyle.
223
+ # SupportedStyles: final_newline, final_blank_line
224
+ Layout/TrailingEmptyLines:
225
+ Enabled: false
226
+
227
+ # Offense count: 226
64
228
  # This cop supports safe autocorrection (--autocorrect).
65
229
  # Configuration parameters: AllowInHeredoc.
66
230
  Layout/TrailingWhitespace:
231
+ Enabled: false
232
+
233
+ # Offense count: 1
234
+ # This cop supports safe autocorrection (--autocorrect).
235
+ Lint/AmbiguousOperatorPrecedence:
67
236
  Exclude:
68
- - 'lib/glossarist/designation/expression.rb'
69
- - 'spec/unit/concept_data_spec.rb'
70
- - 'spec/unit/designations_spec.rb'
237
+ - 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
71
238
 
72
239
  # Offense count: 1
73
240
  # Configuration parameters: AllowedMethods.
@@ -76,63 +243,92 @@ Lint/ConstantDefinitionInBlock:
76
243
  Exclude:
77
244
  - 'spec/unit/utilities/common_functions_spec.rb'
78
245
 
246
+ # Offense count: 1
247
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
248
+ Lint/DuplicateBranch:
249
+ Exclude:
250
+ - 'scripts/migrate_dataset.rb'
251
+
252
+ # Offense count: 4
253
+ # This cop supports unsafe autocorrection (--autocorrect-all).
254
+ Lint/RedundantDirGlobSort:
255
+ Exclude:
256
+ - 'spec/spec_helper.rb'
257
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
258
+ - 'spec/unit/rdf/round_trip_spec.rb'
259
+
79
260
  # Offense count: 1
80
261
  # This cop supports safe autocorrection (--autocorrect).
262
+ Lint/ScriptPermission:
263
+ Exclude:
264
+ - 'scripts/upgrade_dataset_to_v3.rb'
265
+
266
+ # Offense count: 2
267
+ # This cop supports safe autocorrection (--autocorrect).
81
268
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
82
269
  # NotImplementedExceptions: NotImplementedError
83
270
  Lint/UnusedMethodArgument:
84
271
  Exclude:
85
272
  - 'lib/glossarist/dataset_validator.rb'
273
+ - 'scripts/migrate_dataset.rb'
274
+
275
+ # Offense count: 1
276
+ # This cop supports safe autocorrection (--autocorrect).
277
+ Lint/UselessAssignment:
278
+ Exclude:
279
+ - 'scripts/migrate_dataset.rb'
86
280
 
87
- # Offense count: 37
281
+ # Offense count: 85
88
282
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
89
283
  Metrics/AbcSize:
90
284
  Enabled: false
91
285
 
92
- # Offense count: 24
286
+ # Offense count: 7
287
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
288
+ # AllowedMethods: refine
289
+ Metrics/BlockLength:
290
+ Max: 41
291
+
292
+ # Offense count: 52
93
293
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
94
294
  Metrics/CyclomaticComplexity:
95
- Exclude:
96
- - 'lib/glossarist/cli/export_command.rb'
97
- - 'lib/glossarist/concept_validator.rb'
98
- - 'lib/glossarist/designation/expression.rb'
99
- - 'lib/glossarist/gcr_metadata.rb'
100
- - 'lib/glossarist/gcr_statistics.rb'
101
- - 'lib/glossarist/gcr_validator.rb'
102
- - 'lib/glossarist/managed_concept.rb'
103
- - 'lib/glossarist/reference_extractor.rb'
104
- - 'lib/glossarist/reference_resolver.rb'
105
- - 'lib/glossarist/resolution_adapter/local.rb'
106
- - 'lib/glossarist/schema_migration.rb'
107
- - 'lib/glossarist/transforms/concept_to_skos_transform.rb'
108
- - 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
109
- - 'lib/glossarist/validation/bibliography_index.rb'
295
+ Enabled: false
110
296
 
111
- # Offense count: 48
297
+ # Offense count: 107
112
298
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
113
299
  Metrics/MethodLength:
114
- Max: 42
300
+ Max: 47
115
301
 
116
- # Offense count: 4
302
+ # Offense count: 5
117
303
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
118
304
  Metrics/ParameterLists:
119
305
  Max: 6
120
306
 
121
- # Offense count: 18
307
+ # Offense count: 38
122
308
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
123
309
  Metrics/PerceivedComplexity:
310
+ Enabled: false
311
+
312
+ # Offense count: 18
313
+ # This cop supports safe autocorrection (--autocorrect).
314
+ # Configuration parameters: EnforcedStyle, BlockForwardingName.
315
+ # SupportedStyles: anonymous, explicit
316
+ Naming/BlockForwarding:
124
317
  Exclude:
125
- - 'lib/glossarist/concept_validator.rb'
126
- - 'lib/glossarist/designation/expression.rb'
127
- - 'lib/glossarist/gcr_metadata.rb'
128
- - 'lib/glossarist/gcr_validator.rb'
129
- - 'lib/glossarist/reference_extractor.rb'
130
- - 'lib/glossarist/reference_resolver.rb'
131
- - 'lib/glossarist/resolution_adapter/local.rb'
132
- - 'lib/glossarist/schema_migration.rb'
133
- - 'lib/glossarist/transforms/concept_to_skos_transform.rb'
134
- - 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
135
- - 'lib/glossarist/validation/bibliography_index.rb'
318
+ - 'lib/glossarist/collection.rb'
319
+ - 'lib/glossarist/collections/collection.rb'
320
+ - 'lib/glossarist/collections/localization_collection.rb'
321
+ - 'lib/glossarist/concept_collector.rb'
322
+ - 'lib/glossarist/managed_concept_collection.rb'
323
+ - 'lib/glossarist/validation/asset_index.rb'
324
+
325
+ # Offense count: 3
326
+ # This cop supports unsafe autocorrection (--autocorrect-all).
327
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
328
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
329
+ Naming/MemoizedInstanceVariableName:
330
+ Exclude:
331
+ - 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
136
332
 
137
333
  # Offense count: 6
138
334
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
@@ -141,13 +337,64 @@ Naming/MethodParameterName:
141
337
  Exclude:
142
338
  - 'lib/glossarist/schema_migration.rb'
143
339
 
144
- # Offense count: 3
145
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
146
- # SupportedStyles: snake_case, normalcase, non_integer
147
- # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
148
- Naming/VariableNumber:
340
+ # Offense count: 1
341
+ # This cop supports unsafe autocorrection (--autocorrect-all).
342
+ # Configuration parameters: SafeMultiline.
343
+ Performance/DeletePrefix:
344
+ Exclude:
345
+ - 'lib/glossarist/validation/rules/filename_id_rule.rb'
346
+
347
+ # Offense count: 1
348
+ # This cop supports unsafe autocorrection (--autocorrect-all).
349
+ # Configuration parameters: SafeMultiline.
350
+ Performance/DeleteSuffix:
149
351
  Exclude:
150
- - 'spec/unit/rdf/skos_vocabulary_spec.rb'
352
+ - 'lib/glossarist/validation/rules/filename_id_rule.rb'
353
+
354
+ # Offense count: 5
355
+ # This cop supports unsafe autocorrection (--autocorrect-all).
356
+ Performance/MapCompact:
357
+ Exclude:
358
+ - 'lib/glossarist/concept_set.rb'
359
+ - 'lib/glossarist/gcr_statistics.rb'
360
+ - 'lib/glossarist/schema_migration.rb'
361
+ - 'lib/glossarist/validation/rules/localization_consistency_rule.rb'
362
+
363
+ # Offense count: 16
364
+ # This cop supports safe autocorrection (--autocorrect).
365
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
366
+ # RedundantRestArgumentNames: args, arguments
367
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
368
+ # RedundantBlockArgumentNames: blk, block, proc
369
+ Style/ArgumentsForwarding:
370
+ Exclude:
371
+ - 'lib/glossarist/collection.rb'
372
+ - 'lib/glossarist/collections/collection.rb'
373
+ - 'lib/glossarist/collections/localization_collection.rb'
374
+ - 'lib/glossarist/concept_collector.rb'
375
+ - 'lib/glossarist/managed_concept_collection.rb'
376
+ - 'lib/glossarist/validation/asset_index.rb'
377
+
378
+ # Offense count: 23
379
+ # This cop supports safe autocorrection (--autocorrect).
380
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
381
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
382
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
383
+ # FunctionalMethods: let, let!, subject, watch
384
+ # AllowedMethods: lambda, proc, it
385
+ Style/BlockDelimiters:
386
+ Exclude:
387
+ - 'lib/glossarist/rdf/gloss_designation.rb'
388
+ - 'lib/glossarist/rdf/gloss_grammar_info.rb'
389
+ - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
390
+ - 'lib/glossarist/rdf/gloss_pronunciation.rb'
391
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
392
+ - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
393
+ - 'scripts/migrate_isotc204_to_v3.rb'
394
+ - 'scripts/migrate_isotc211_to_v3.rb'
395
+ - 'scripts/migrate_osgeo_to_v3.rb'
396
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
397
+ - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
151
398
 
152
399
  # Offense count: 6
153
400
  # This cop supports safe autocorrection (--autocorrect).
@@ -156,18 +403,121 @@ Naming/VariableNumber:
156
403
  Style/FormatStringToken:
157
404
  EnforcedStyle: unannotated
158
405
 
406
+ # Offense count: 2
407
+ # This cop supports unsafe autocorrection (--autocorrect-all).
408
+ # Configuration parameters: AllowedReceivers.
409
+ # AllowedReceivers: Thread.current
410
+ Style/HashEachMethods:
411
+ Exclude:
412
+ - 'lib/glossarist/validation/rules/model_validity_rule.rb'
413
+ - 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
414
+
415
+ # Offense count: 2
416
+ # This cop supports unsafe autocorrection (--autocorrect-all).
417
+ Style/IdenticalConditionalBranches:
418
+ Exclude:
419
+ - 'scripts/migrate_dataset.rb'
420
+
421
+ # Offense count: 1
422
+ # This cop supports unsafe autocorrection (--autocorrect-all).
423
+ Style/MapToHash:
424
+ Exclude:
425
+ - 'lib/glossarist/concept_set.rb'
426
+
427
+ # Offense count: 1
428
+ # This cop supports unsafe autocorrection (--autocorrect-all).
429
+ Style/MapToSet:
430
+ Exclude:
431
+ - 'scripts/migrate_dataset.rb'
432
+
433
+ # Offense count: 6
434
+ # This cop supports safe autocorrection (--autocorrect).
435
+ Style/MultilineIfModifier:
436
+ Exclude:
437
+ - 'lib/glossarist/citation.rb'
438
+ - 'lib/glossarist/cli/validate_command.rb'
439
+ - 'lib/glossarist/schema_migration.rb'
440
+
441
+ # Offense count: 2
442
+ # This cop supports safe autocorrection (--autocorrect).
443
+ Style/MultilineTernaryOperator:
444
+ Exclude:
445
+ - 'lib/glossarist/cli/validate_command.rb'
446
+
159
447
  # Offense count: 1
160
- # Configuration parameters: AllowedClasses.
161
- Style/OneClassPerFile:
448
+ # This cop supports safe autocorrection (--autocorrect).
449
+ # Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
450
+ Style/MultipleComparison:
451
+ Exclude:
452
+ - 'lib/glossarist/glossary_store.rb'
453
+
454
+ # Offense count: 6
455
+ # This cop supports safe autocorrection (--autocorrect).
456
+ Style/RedundantFreeze:
457
+ Exclude:
458
+ - 'lib/glossarist/schema_migration.rb'
459
+ - 'lib/glossarist/validation/rules/domain_target_rule.rb'
460
+ - 'lib/glossarist/validation/rules/related_concept_target_rule.rb'
461
+ - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
462
+ - 'lib/glossarist/validation/rules/uuid_format_rule.rb'
463
+
464
+ # Offense count: 2
465
+ # This cop supports safe autocorrection (--autocorrect).
466
+ Style/RedundantParentheses:
467
+ Exclude:
468
+ - 'lib/glossarist/validation/rules/date_type_rule.rb'
469
+ - 'lib/glossarist/validation/rules/date_validity_rule.rb'
470
+
471
+ # Offense count: 4
472
+ # This cop supports safe autocorrection (--autocorrect).
473
+ Style/RedundantRegexpCharacterClass:
162
474
  Exclude:
163
- - 'spec/**/*'
164
- - 'test/**/*'
165
- - 'lib/glossarist.rb'
475
+ - 'scripts/migrate_isotc211_to_v3.rb'
476
+ - 'scripts/migrate_osgeo_to_v3.rb'
166
477
 
167
478
  # Offense count: 4
479
+ # This cop supports unsafe autocorrection (--autocorrect-all).
480
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
481
+ # AllowedMethods: present?, blank?, presence, try, try!
482
+ Style/SafeNavigation:
483
+ Exclude:
484
+ - 'lib/glossarist/validation/rules/concept_count_rule.rb'
485
+ - 'lib/glossarist/validation/rules/date_type_rule.rb'
486
+ - 'lib/glossarist/validation/rules/related_concept_symmetry_rule.rb'
487
+ - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
488
+
489
+ # Offense count: 3
168
490
  # Configuration parameters: Max.
169
491
  Style/SafeNavigationChainLength:
170
492
  Exclude:
171
493
  - 'lib/glossarist/managed_concept.rb'
172
- - 'lib/glossarist/transforms/concept_to_skos_transform.rb'
173
494
  - 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
495
+ - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
496
+
497
+ # Offense count: 1
498
+ # This cop supports unsafe autocorrection (--autocorrect-all).
499
+ Style/SingleArgumentDig:
500
+ Exclude:
501
+ - 'spec/unit/register_data_spec.rb'
502
+
503
+ # Offense count: 2
504
+ # This cop supports safe autocorrection (--autocorrect).
505
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
506
+ # SupportedStyles: single_quotes, double_quotes
507
+ Style/StringLiterals:
508
+ Exclude:
509
+ - 'lib/glossarist/validation/rules/filename_id_rule.rb'
510
+
511
+ # Offense count: 48
512
+ # This cop supports safe autocorrection (--autocorrect).
513
+ # Configuration parameters: EnforcedStyleForMultiline.
514
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
515
+ Style/TrailingCommaInArguments:
516
+ Enabled: false
517
+
518
+ # Offense count: 3
519
+ # This cop supports safe autocorrection (--autocorrect).
520
+ Style/YAMLFileRead:
521
+ Exclude:
522
+ - 'spec/unit/rdf/ontology_conformance_spec.rb'
523
+ - 'spec/unit/rdf/round_trip_spec.rb'
data/CLAUDE.md CHANGED
@@ -24,7 +24,7 @@ All model classes use `Lutaml::Model::Serializable` for serialization.
24
24
  - **`Concept`** (`concept.rb`) — base concept with `ConceptData` (definition, terms/designations, notes, examples, sources, dates, language_code). Parent of `LocalizedConcept`.
25
25
  - **`LocalizedConcept`** (`localized_concept.rb`) — extends `Concept` with `classification`, `entry_status`, `review_type`.
26
26
  - **`ConceptData`** (`concept_data.rb`) — the data payload inside `Concept`: definition, terms, examples, notes, sources, non_verb_rep (collection of `NonVerbRep` resource references), language_code (ISO 639), script (ISO 15924), system (ISO 24229 conversion system code). Uses `DetailedDefinition` collections for definition/examples/notes.
27
- - **`ManagedConceptData`** (`managed_concept_data.rb`) — the data payload inside `ManagedConcept`: id, localized_concepts hash (lang_code => uuid), domains (ConceptReference collection — upper concept references replacing the old `groups` string array), sources.
27
+ - **`ManagedConceptData`** (`managed_concept_data.rb`) — the data payload inside `ManagedConcept`: id, localized_concepts hash (lang_code => uuid), domains (ConceptReference collection — terminological domain references), tags (string collection organizational tags for grouping/filtering, not rendered as domains), sources.
28
28
 
29
29
  ### NonVerbRep (Resource Reference)
30
30
 
data/Gemfile CHANGED
@@ -4,8 +4,8 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
+
7
8
  gem "canon"
8
- gem "lutaml-model", "~> 0.8.0"
9
9
  gem "nokogiri"
10
10
  gem "rake", "~> 13.0"
11
11
  gem "relaton", "~> 2.1.0"
data/README.adoc CHANGED
@@ -101,7 +101,8 @@ related:: Array of <<related-concept,RelatedConcept>>
101
101
  status:: Enum for the normative status of the term.
102
102
  dates:: Array of <<concept-date,ConceptDate>>
103
103
  localized_concepts:: Hash of all localizations where keys are language codes and values are uuid of the localized concept.
104
- domains:: Array of <<concept-reference,ConceptReference>> — upper concepts (subject areas, concept schemes, organizing concepts) that this concept belongs to across all languages. Each domain is a typed reference (e.g. `{ concept_id: "103", ref_type: "domain" }`).
104
+ domains:: Array of <<concept-reference,ConceptReference>> — terminological domain references (subject areas, concept schemes) that this concept belongs to. Each domain is a typed reference (e.g. `{ concept_id: "103", ref_type: "domain" }`). These are rendered as `<domain>` in output.
105
+ tags:: Array of strings — organizational tags for grouping and filtering concepts (e.g. `["time-scale-units"]`). Tags are not rendered as terminological domains; they serve as metadata for document structure and retrieval.
105
106
  localizations:: Hash of all localizations for this concept where keys are language codes and values are instances of <<localized-concept,LocalizedConcept>>.
106
107
 
107
108
  There are two ways to initialize and populate a managed concept
@@ -121,6 +122,7 @@ concept = Glossarist::ManagedConcept.new({
121
122
  "domains" => [
122
123
  { "concept_id" => "103", "ref_type" => "domain" },
123
124
  ],
125
+ "tags" => ["time-scales"],
124
126
  },
125
127
  })
126
128
  ----
@@ -134,6 +136,7 @@ concept.id = "123"
134
136
  concept.data.domains = [
135
137
  Glossarist::ConceptReference.new(concept_id: "103", ref_type: "domain"),
136
138
  ]
139
+ concept.data.tags = ["time-scales"]
137
140
  concept.localizations = <Array of localized concepts or localized concept hashes>
138
141
  ----
139
142
 
data/glossarist.gemspec CHANGED
@@ -31,7 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ["lib"]
33
33
 
34
- spec.add_dependency "lutaml-model", "~> 0.8.5"
34
+ spec.add_dependency "lutaml-model", "~> 0.8.15"
35
+ spec.add_dependency "lutaml-store", "~> 0.2.0"
35
36
  spec.add_dependency "paint", "~> 2.3"
36
37
  spec.add_dependency "relaton", ">= 2.0.0", "< 3"
37
38
  spec.add_dependency "rubyzip", ">= 2.3", "< 3"