glossarist 2.6.4 → 2.6.6
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 +4 -4
- data/.github/workflows/release.yml +1 -4
- data/.rubocop_todo.yml +25 -74
- data/CLAUDE.md +27 -2
- data/Gemfile +0 -2
- data/README.adoc +650 -29
- data/config.yml +68 -1
- data/glossarist.gemspec +1 -1
- data/lib/glossarist/asset_reference.rb +16 -0
- data/lib/glossarist/bibliographic_reference.rb +16 -0
- data/lib/glossarist/concept.rb +1 -1
- data/lib/glossarist/concept_data.rb +4 -0
- data/lib/glossarist/concept_enricher.rb +1 -0
- data/lib/glossarist/concept_reference.rb +14 -17
- data/lib/glossarist/concept_validator.rb +27 -56
- data/lib/glossarist/dataset_validator.rb +30 -34
- data/lib/glossarist/designation/abbreviation.rb +0 -2
- data/lib/glossarist/designation/base.rb +21 -1
- data/lib/glossarist/designation/expression.rb +3 -0
- data/lib/glossarist/designation/letter_symbol.rb +0 -4
- data/lib/glossarist/designation/symbol.rb +0 -2
- data/lib/glossarist/gcr_validator.rb +26 -101
- data/lib/glossarist/glossary_definition.rb +5 -0
- data/lib/glossarist/managed_concept_data.rb +21 -2
- data/lib/glossarist/non_verb_rep.rb +21 -6
- data/lib/glossarist/pronunciation.rb +32 -0
- data/lib/glossarist/reference_extractor.rb +78 -10
- data/lib/glossarist/reference_resolver.rb +1 -0
- data/lib/glossarist/urn_resolver.rb +13 -1
- data/lib/glossarist/v1/concept.rb +7 -0
- data/lib/glossarist/validation/asset_index.rb +114 -0
- data/lib/glossarist/validation/bibliography_index.rb +121 -0
- data/lib/glossarist/validation/rules/asciidoc_xref_rule.rb +60 -0
- data/lib/glossarist/validation/rules/authoritative_source_rule.rb +47 -0
- data/lib/glossarist/validation/rules/base.rb +46 -0
- data/lib/glossarist/validation/rules/bibliography_yaml_rule.rb +37 -0
- data/lib/glossarist/validation/rules/citation_completeness_rule.rb +63 -0
- data/lib/glossarist/validation/rules/concept_context.rb +45 -0
- data/lib/glossarist/validation/rules/concept_count_rule.rb +34 -0
- data/lib/glossarist/validation/rules/concept_id_rule.rb +29 -0
- data/lib/glossarist/validation/rules/concept_id_uniqueness_rule.rb +42 -0
- data/lib/glossarist/validation/rules/concept_mention_rule.rb +44 -0
- data/lib/glossarist/validation/rules/concept_status_rule.rb +36 -0
- data/lib/glossarist/validation/rules/concept_uri_rule.rb +30 -0
- data/lib/glossarist/validation/rules/dataset_context.rb +99 -0
- data/lib/glossarist/validation/rules/date_type_rule.rb +54 -0
- data/lib/glossarist/validation/rules/date_validity_rule.rb +66 -0
- data/lib/glossarist/validation/rules/definition_content_rule.rb +41 -0
- data/lib/glossarist/validation/rules/designation_status_rule.rb +45 -0
- data/lib/glossarist/validation/rules/designation_type_rule.rb +55 -0
- data/lib/glossarist/validation/rules/duplicate_term_rule.rb +63 -0
- data/lib/glossarist/validation/rules/entry_status_rule.rb +39 -0
- data/lib/glossarist/validation/rules/filename_id_rule.rb +35 -0
- data/lib/glossarist/validation/rules/gcr_context.rb +92 -0
- data/lib/glossarist/validation/rules/image_reference_rule.rb +73 -0
- data/lib/glossarist/validation/rules/l10n_uuid_integrity_rule.rb +40 -0
- data/lib/glossarist/validation/rules/language_code_format_rule.rb +39 -0
- data/lib/glossarist/validation/rules/language_coverage_rule.rb +37 -0
- data/lib/glossarist/validation/rules/language_list_rule.rb +46 -0
- data/lib/glossarist/validation/rules/localization_presence_rule.rb +25 -0
- data/lib/glossarist/validation/rules/orphaned_bibliography_rule.rb +64 -0
- data/lib/glossarist/validation/rules/orphaned_images_rule.rb +68 -0
- data/lib/glossarist/validation/rules/orphaned_l10n_files_rule.rb +39 -0
- data/lib/glossarist/validation/rules/preferred_term_rule.rb +41 -0
- data/lib/glossarist/validation/rules/registry.rb +42 -0
- data/lib/glossarist/validation/rules/related_concept_cycle_rule.rb +102 -0
- data/lib/glossarist/validation/rules/related_concept_rule.rb +40 -0
- data/lib/glossarist/validation/rules/related_concept_symmetry_rule.rb +87 -0
- data/lib/glossarist/validation/rules/source_type_rule.rb +63 -0
- data/lib/glossarist/validation/rules/terms_presence_rule.rb +39 -0
- data/lib/glossarist/validation/rules.rb +85 -0
- data/lib/glossarist/validation/validation_issue.rb +39 -0
- data/lib/glossarist/validation.rb +12 -0
- data/lib/glossarist/validation_result.rb +26 -9
- data/lib/glossarist/version.rb +1 -1
- data/lib/glossarist.rb +4 -0
- metadata +62 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0e6019628f010211b1f05fbc2297a9c20b53b85ac23e57ac71d8d09ac933dcc
|
|
4
|
+
data.tar.gz: 65bc93a2714354d47261e21d6ee34c0b46f6d967688188c2af04dcf04ed3aaca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86d9478fdc0bdecdfdce06dd607bd6254c04a9be4e261f41131571c60c043af5b84a2dbef7904c721e0c2646c9436fc734038c4ccd5da3a7a8c31b3fb6fc5429
|
|
7
|
+
data.tar.gz: 0d9c205d5733dcc767f2f1922eb43fcfdc8e2b445f7c144667bdb508cc285a24e2b50fef9326d085642f1269177f0044401d92fb2128d22466afb91ef25faa34
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
-
# See https://github.com/metanorma/cimas
|
|
3
1
|
name: release
|
|
4
2
|
|
|
5
3
|
permissions:
|
|
6
4
|
contents: write
|
|
7
5
|
id-token: write
|
|
8
|
-
pull-requests: write
|
|
9
6
|
|
|
10
7
|
on:
|
|
11
8
|
workflow_dispatch:
|
|
@@ -21,7 +18,7 @@ on:
|
|
|
21
18
|
|
|
22
19
|
jobs:
|
|
23
20
|
release:
|
|
24
|
-
uses:
|
|
21
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
25
22
|
with:
|
|
26
23
|
next_version: ${{ github.event.inputs.next_version }}
|
|
27
24
|
secrets:
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,59 +1,40 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-05-
|
|
3
|
+
# on 2026-05-13 07:45:58 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
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 7
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
|
|
12
|
-
Bundler/OrderedGems:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'Gemfile'
|
|
15
|
-
|
|
16
9
|
# Offense count: 1
|
|
17
10
|
Gemspec/RequiredRubyVersion:
|
|
18
11
|
Exclude:
|
|
19
12
|
- 'glossarist.gemspec'
|
|
20
13
|
|
|
21
|
-
# Offense count:
|
|
14
|
+
# Offense count: 3
|
|
22
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
23
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
24
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
25
18
|
Layout/ArgumentAlignment:
|
|
26
19
|
Exclude:
|
|
27
|
-
- 'lib/glossarist/
|
|
28
|
-
- '
|
|
29
|
-
- 'lib/glossarist/sts/term_mapper.rb'
|
|
20
|
+
- 'lib/glossarist/designation/expression.rb'
|
|
21
|
+
- 'spec/unit/designations_spec.rb'
|
|
30
22
|
|
|
31
23
|
# Offense count: 1
|
|
32
24
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
|
-
# Configuration parameters: IndentationWidth.
|
|
34
|
-
Layout/AssignmentIndentation:
|
|
35
|
-
Exclude:
|
|
36
|
-
- 'lib/glossarist/sts/term_mapper.rb'
|
|
37
|
-
|
|
38
|
-
# Offense count: 6
|
|
39
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
40
25
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
41
26
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
42
27
|
Layout/BlockAlignment:
|
|
43
28
|
Exclude:
|
|
44
|
-
- '
|
|
45
|
-
- 'spec/unit/sts/term_extractor_spec.rb'
|
|
46
|
-
- 'spec/unit/sts/term_mapper_spec.rb'
|
|
29
|
+
- 'spec/unit/designations_spec.rb'
|
|
47
30
|
|
|
48
|
-
# Offense count:
|
|
31
|
+
# Offense count: 1
|
|
49
32
|
# This cop supports safe autocorrection (--autocorrect).
|
|
50
33
|
Layout/BlockEndNewline:
|
|
51
34
|
Exclude:
|
|
52
|
-
- '
|
|
53
|
-
- 'spec/unit/sts/term_extractor_spec.rb'
|
|
54
|
-
- 'spec/unit/sts/term_mapper_spec.rb'
|
|
35
|
+
- 'spec/unit/designations_spec.rb'
|
|
55
36
|
|
|
56
|
-
# Offense count:
|
|
37
|
+
# Offense count: 7
|
|
57
38
|
# This cop supports safe autocorrection (--autocorrect).
|
|
58
39
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
59
40
|
# SupportedHashRocketStyles: key, separator, table
|
|
@@ -61,19 +42,18 @@ Layout/BlockEndNewline:
|
|
|
61
42
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
62
43
|
Layout/HashAlignment:
|
|
63
44
|
Exclude:
|
|
64
|
-
- '
|
|
45
|
+
- 'spec/unit/concept_data_spec.rb'
|
|
46
|
+
- 'spec/unit/designations_spec.rb'
|
|
65
47
|
|
|
66
|
-
# Offense count:
|
|
48
|
+
# Offense count: 2
|
|
67
49
|
# This cop supports safe autocorrection (--autocorrect).
|
|
68
50
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
69
51
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
70
52
|
Layout/IndentationWidth:
|
|
71
53
|
Exclude:
|
|
72
|
-
- '
|
|
73
|
-
- 'spec/unit/sts/term_extractor_spec.rb'
|
|
74
|
-
- 'spec/unit/sts/term_mapper_spec.rb'
|
|
54
|
+
- 'spec/unit/designations_spec.rb'
|
|
75
55
|
|
|
76
|
-
# Offense count:
|
|
56
|
+
# Offense count: 267
|
|
77
57
|
# This cop supports safe autocorrection (--autocorrect).
|
|
78
58
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
79
59
|
# URISchemes: http, https
|
|
@@ -85,9 +65,9 @@ Layout/LineLength:
|
|
|
85
65
|
# Configuration parameters: AllowInHeredoc.
|
|
86
66
|
Layout/TrailingWhitespace:
|
|
87
67
|
Exclude:
|
|
88
|
-
- 'lib/glossarist/
|
|
89
|
-
- '
|
|
90
|
-
- '
|
|
68
|
+
- 'lib/glossarist/designation/expression.rb'
|
|
69
|
+
- 'spec/unit/concept_data_spec.rb'
|
|
70
|
+
- 'spec/unit/designations_spec.rb'
|
|
91
71
|
|
|
92
72
|
# Offense count: 1
|
|
93
73
|
# Configuration parameters: AllowedMethods.
|
|
@@ -104,26 +84,12 @@ Lint/UnusedMethodArgument:
|
|
|
104
84
|
Exclude:
|
|
105
85
|
- 'lib/glossarist/dataset_validator.rb'
|
|
106
86
|
|
|
107
|
-
# Offense count:
|
|
87
|
+
# Offense count: 37
|
|
108
88
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
109
89
|
Metrics/AbcSize:
|
|
110
|
-
|
|
111
|
-
- 'lib/glossarist/cli/export_command.rb'
|
|
112
|
-
- 'lib/glossarist/cli/package_command.rb'
|
|
113
|
-
- 'lib/glossarist/cli/validate_command.rb'
|
|
114
|
-
- 'lib/glossarist/concept_manager.rb'
|
|
115
|
-
- 'lib/glossarist/gcr_metadata.rb'
|
|
116
|
-
- 'lib/glossarist/gcr_package.rb'
|
|
117
|
-
- 'lib/glossarist/reference_extractor.rb'
|
|
118
|
-
- 'lib/glossarist/reference_resolver.rb'
|
|
119
|
-
- 'lib/glossarist/resolution_adapter/local.rb'
|
|
120
|
-
- 'lib/glossarist/schema_migration.rb'
|
|
121
|
-
- 'lib/glossarist/transforms/concept_to_skos_transform.rb'
|
|
122
|
-
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
123
|
-
- 'lib/glossarist/utilities/uuid.rb'
|
|
124
|
-
- 'spec/unit/concept_collector_spec.rb'
|
|
90
|
+
Enabled: false
|
|
125
91
|
|
|
126
|
-
# Offense count:
|
|
92
|
+
# Offense count: 24
|
|
127
93
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
128
94
|
Metrics/CyclomaticComplexity:
|
|
129
95
|
Exclude:
|
|
@@ -132,6 +98,7 @@ Metrics/CyclomaticComplexity:
|
|
|
132
98
|
- 'lib/glossarist/designation/expression.rb'
|
|
133
99
|
- 'lib/glossarist/gcr_metadata.rb'
|
|
134
100
|
- 'lib/glossarist/gcr_statistics.rb'
|
|
101
|
+
- 'lib/glossarist/gcr_validator.rb'
|
|
135
102
|
- 'lib/glossarist/managed_concept.rb'
|
|
136
103
|
- 'lib/glossarist/reference_extractor.rb'
|
|
137
104
|
- 'lib/glossarist/reference_resolver.rb'
|
|
@@ -139,8 +106,9 @@ Metrics/CyclomaticComplexity:
|
|
|
139
106
|
- 'lib/glossarist/schema_migration.rb'
|
|
140
107
|
- 'lib/glossarist/transforms/concept_to_skos_transform.rb'
|
|
141
108
|
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
109
|
+
- 'lib/glossarist/validation/bibliography_index.rb'
|
|
142
110
|
|
|
143
|
-
# Offense count:
|
|
111
|
+
# Offense count: 48
|
|
144
112
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
145
113
|
Metrics/MethodLength:
|
|
146
114
|
Max: 42
|
|
@@ -150,19 +118,21 @@ Metrics/MethodLength:
|
|
|
150
118
|
Metrics/ParameterLists:
|
|
151
119
|
Max: 6
|
|
152
120
|
|
|
153
|
-
# Offense count:
|
|
121
|
+
# Offense count: 18
|
|
154
122
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
155
123
|
Metrics/PerceivedComplexity:
|
|
156
124
|
Exclude:
|
|
157
125
|
- 'lib/glossarist/concept_validator.rb'
|
|
158
126
|
- 'lib/glossarist/designation/expression.rb'
|
|
159
127
|
- 'lib/glossarist/gcr_metadata.rb'
|
|
128
|
+
- 'lib/glossarist/gcr_validator.rb'
|
|
160
129
|
- 'lib/glossarist/reference_extractor.rb'
|
|
161
130
|
- 'lib/glossarist/reference_resolver.rb'
|
|
162
131
|
- 'lib/glossarist/resolution_adapter/local.rb'
|
|
163
132
|
- 'lib/glossarist/schema_migration.rb'
|
|
164
133
|
- 'lib/glossarist/transforms/concept_to_skos_transform.rb'
|
|
165
134
|
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
135
|
+
- 'lib/glossarist/validation/bibliography_index.rb'
|
|
166
136
|
|
|
167
137
|
# Offense count: 6
|
|
168
138
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
@@ -179,19 +149,6 @@ Naming/VariableNumber:
|
|
|
179
149
|
Exclude:
|
|
180
150
|
- 'spec/unit/rdf/skos_vocabulary_spec.rb'
|
|
181
151
|
|
|
182
|
-
# Offense count: 9
|
|
183
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
184
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
185
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
186
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
187
|
-
# FunctionalMethods: let, let!, subject, watch
|
|
188
|
-
# AllowedMethods: lambda, proc, it
|
|
189
|
-
Style/BlockDelimiters:
|
|
190
|
-
Exclude:
|
|
191
|
-
- 'lib/glossarist/sts/term_extractor.rb'
|
|
192
|
-
- 'spec/unit/sts/term_extractor_spec.rb'
|
|
193
|
-
- 'spec/unit/sts/term_mapper_spec.rb'
|
|
194
|
-
|
|
195
152
|
# Offense count: 6
|
|
196
153
|
# This cop supports safe autocorrection (--autocorrect).
|
|
197
154
|
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
|
@@ -199,12 +156,6 @@ Style/BlockDelimiters:
|
|
|
199
156
|
Style/FormatStringToken:
|
|
200
157
|
EnforcedStyle: unannotated
|
|
201
158
|
|
|
202
|
-
# Offense count: 2
|
|
203
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
204
|
-
Style/MultilineIfModifier:
|
|
205
|
-
Exclude:
|
|
206
|
-
- 'lib/glossarist/sts/importer.rb'
|
|
207
|
-
|
|
208
159
|
# Offense count: 1
|
|
209
160
|
# Configuration parameters: AllowedClasses.
|
|
210
161
|
Style/OneClassPerFile:
|
data/CLAUDE.md
CHANGED
|
@@ -23,8 +23,23 @@ All model classes use `Lutaml::Model::Serializable` for serialization.
|
|
|
23
23
|
- **`ManagedConcept`** (`managed_concept.rb`) — a managed concept with `ManagedConceptData` (groups, localized_concepts map, sources), related concepts, dates, and status. Delegates localization via `add_l10n`/`localization(lang)`.
|
|
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
|
-
- **`ConceptData`** (`concept_data.rb`) — the data payload inside `Concept`: definition, terms, examples, notes, sources, language_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), groups, sources.
|
|
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.
|
|
28
|
+
|
|
29
|
+
### NonVerbRep (Resource Reference)
|
|
30
|
+
|
|
31
|
+
`NonVerbRep` (`non_verb_rep.rb`) models non-verbal representations as URI references to external resources (images, tables, formulas), not embedded content. Attributes: `type` (image/table/formula), `ref` (URI — relative path, URN, or URL), `text` (alt text), `sources` (ConceptSource collection).
|
|
32
|
+
|
|
33
|
+
### ConceptReference & RelatedConcept
|
|
34
|
+
|
|
35
|
+
- **`ConceptReference`** (`concept_reference.rb`) — a typed reference to another concept. Local refs use `concept_id` alone; external refs use `source` (URN prefix) + `concept_id` or a direct `urn` field. Has `local?`/`external?` predicates. No `to_gcr_hash` or `from_urn` — model-driven architecture uses lutaml-model for serialization; URN construction/parsing belongs in `UrnResolver`.
|
|
36
|
+
- **`RelatedConcept`** (`related_concept.rb`) — a concept with a typed relationship. Relationship types cover ISO 10241-1 (deprecates/supersedes/superseded_by/compare/contrast/see), ISO 25964/SKOS (broader/narrower/broader_generic/narrower_generic/broader_partitive/narrower_partitive/broader_instantial/narrower_instantial/equivalent/close_match/broad_match/narrow_match/related_match), ISO 12620/TBX (homograph/false_friend/related_concept/related_concept_broader/related_concept_narrower/sequentially_related_concept/spatially_related_concept/temporally_related_concept), and designation-level (abbreviated_form_for/short_form_for). Types are defined in `config.yml` under `related_concept.type`.
|
|
37
|
+
|
|
38
|
+
### Reference Resolution
|
|
39
|
+
|
|
40
|
+
- **`ReferenceExtractor`** (`reference_extractor.rb`) — extracts `ConceptReference` and `AssetReference` objects from `{{...}}` mentions and `image::...[]` references in concept text fields.
|
|
41
|
+
- **`ReferenceResolver`** (`reference_resolver.rb`) — resolves references via adapter chain (local → package → remote). Supports route overrides for URI remapping.
|
|
42
|
+
- **`UrnResolver`** (`urn_resolver.rb`) — converts URNs to canonical HTTP URLs (IEC Electropedia, ISO OBP). Extensible via `register_scheme`. All URN construction/parsing logic lives here, not in the model.
|
|
28
43
|
|
|
29
44
|
### UUID Generation
|
|
30
45
|
|
|
@@ -34,6 +49,16 @@ Concepts use deterministic UUID v5 (SHA-1) derived from their serialized YAML co
|
|
|
34
49
|
|
|
35
50
|
`Designation::Base` (`designation/base.rb`) uses a self-referencing factory pattern (`of_yaml`) that dispatches to subclasses based on `type` field: `Expression`, `Symbol`, `Abbreviation`, `GraphicalSymbol`, `LetterSymbol`. The bi-directional mapping is in `SERIALIZED_TYPES` (`designation.rb`).
|
|
36
51
|
|
|
52
|
+
Designation inheritance hierarchy (MECE):
|
|
53
|
+
- **Base** — `designation`, `normative_status` (preferred/admitted/deprecated/superseded), `geographical_area`, `type`, `language`/ISO 639, `script`/ISO 15924, `system`/ISO 24229, `international`, `absent`, `pronunciation` (collection of `Pronunciation` objects), `sources` (collection of `ConceptSource` — per-designation sources per ISO 10241-1 §6.8), `term_type` (ISO 12620 term type classification — 24 values from `config.yml`), `related` (collection of `RelatedConcept` — designation-level intra-entry relationships: `abbreviated_form_for`, `short_form_for`)
|
|
54
|
+
- **Expression < Base** — `prefix`, `usage_info`, `field_of_application` (IEC "specific use"), `grammar_info`
|
|
55
|
+
- **Abbreviation < Expression** — abbreviation type booleans (`acronym`, `initialism`, `truncation`) from `config.yml`
|
|
56
|
+
- **Symbol < Base** — (no additional attributes)
|
|
57
|
+
- **LetterSymbol < Symbol** — `text`
|
|
58
|
+
- **GraphicalSymbol < Symbol** — `text`, `image`
|
|
59
|
+
|
|
60
|
+
`ConceptData#domain` stores URI references (relative like `section-103-01`, URN like `urn:iec:std:iec:60050-103-01`, or URL like `https://...`) to subject area concepts.
|
|
61
|
+
|
|
37
62
|
### YAML Serialization
|
|
38
63
|
|
|
39
64
|
- **`ConceptManager`** (`concept_manager.rb`) — handles file I/O. Supports two storage formats:
|