glossarist 2.13.0 → 2.13.1

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: 85ff1a35136e9b7ff920830b2bf9a2e4b477bffed405c2386e33739ed6560a45
4
- data.tar.gz: f7ef8fb96a58eb21a71534fcc8afc1cf7f26053379cfb00e5ec98098620ca6a6
3
+ metadata.gz: '0898c5d75bdeac6ca104c401a0492061a765079c601cd87c1fa9c134651b52d0'
4
+ data.tar.gz: 3c2cf3896eab10345fea5374ccca555193c31f9ee7773fc4e03ca1f5ea3b6af3
5
5
  SHA512:
6
- metadata.gz: beeecf5f816d5ec10741375d357a1b3602e7d415ebedfc71eff52d414f1d623ed119c7995355231c147020f54b814dc8306d37acdc6eecacdf8ca72ec6ddd65f
7
- data.tar.gz: 0a7de5bd20f0f7c58c1c08066983b5c490999570249b686f84f60bd87df9b5e436913db66e43b5d1003805bfa33a6613d67bbd8c49373d21a03815dde83a8e42
6
+ metadata.gz: 2eac98effdcbc12e9934df41d9c6c01c19a5c5f6388497be63039a3b50bd6fba5e289ad3eb573c18c4f7740f34d8711f002285f8fb614aef60c2352b90698670
7
+ data.tar.gz: be3178b14bb2a16894e8af117b08f5a34a2910a27a6d289a3298db37647cb8c4cdad4acc78674b6189a4cd3a9d265625dbfc54d3e2ac084447ac875c9ec84749
data/CLAUDE.md CHANGED
@@ -54,20 +54,21 @@ keys off `concept.related`).
54
54
  Each PartitiveRelation carries:
55
55
 
56
56
  - `comprehensive` — ConceptRef to the superordinate concept partitive (the whole)
57
- - `partitives` — `PartitiveMember [2..*]` (ISO 704 "two or more"); each member wraps a ConceptRef plus optional `MemberCertainty` (`confirmed` default, `possible`)
57
+ - `partitives` — `PartitiveMember [2..*]` (ISO 704 "two or more"). Each member wraps a ConceptRef plus ISO 704:2022 notation metadata:
58
+ - `multiplicity` — one of `compulsory` (1 solid line, default), `optional` (1 dashed line), `compulsory_multiple` (2 solid lines), `optional_multiple` (2 dashed lines), `at_least_one` (1 solid + 1 dashed line)
59
+ - `is_delimiting` — boolean (default false). A delimiting part behaves like a delimiting characteristic: it distinguishes the comprehensive from coordinate concepts. Rendered as a bold 3x-width line in the diagram. Orthogonal to multiplicity.
58
60
  - `completeness` — `complete` (default; the encoded partitives constitute the whole) or `partial` (others exist beyond those encoded). ISO 704 rake backline notation.
59
- - `plurality` — optional `TypeSharedPlurality` block (ISO 704 close-set double line promoted to data: `is_shared`, `is_uncertain`, `shared_type`). Replaces the prior opaque `markers` field.
60
61
  - `criterion` — optional localized string hash (`{ "eng" => "physical structure" }`). ISO 12620 coordinate-concept coherence: partitives within one relation share the comprehensive AND the criterion.
61
62
 
62
63
  Wired into `V3::ManagedConcept#partitive_relations`. NOT on `ManagedConceptData` (relationships live at the concept level for MECE consistency with `related`).
63
64
 
64
- Enum values are SSOT-loaded from `config.yml` via `GlossaryDefinition::COMPLETENESS_VALUES` and `MEMBER_CERTAINTY_VALUES`. The `values:` option on each attribute documents the enum; the model's `validate!` method enforces structural invariants after construction (empty comprehensive, <2 partitives, self-loops, incoherent plurality, invalid enum values).
65
+ Enum values are SSOT-loaded from `config.yml` via `GlossaryDefinition::COMPLETENESS_VALUES` and `MULTIPLICITY_VALUES`. The `values:` option on each attribute documents the enum; the model's `validate!` method enforces structural invariants after construction (empty comprehensive, <2 partitives, self-loops, invalid enum values).
65
66
 
66
- Semantic checks (≥2 partitives cardinality, duplicate comprehensive+criterion detection, criterion-absent warning, ExternalConcept shape) live in `Validation::Rules::PartitiveRelationRule` (auto-registered by `Validation::Rules`, code GLS-221).
67
+ Semantic checks (≥2 partitives cardinality, duplicate comprehensive+criterion detection, criterion-absent warning, non-default multiplicity warning, ExternalConcept shape) live in `Validation::Rules::PartitiveRelationRule` (auto-registered by `Validation::Rules`, code GLS-221).
67
68
 
68
- RDF emission: `Rdf::GlossPartitiveRelation` view class with companion `GlossPartitiveMember` and `GlossTypeSharedPlurality`. Wired into `Transforms::ConceptToGlossTransform` and emitted as `gloss:hasPartitiveRelation` link from `GlossConcept`.
69
+ RDF emission: `Rdf::GlossPartitiveRelation` view class with companion `GlossPartitiveMember`. Wired into `Transforms::ConceptToGlossTransform` and emitted as `gloss:hasPartitiveRelation` link from `GlossConcept`.
69
70
 
70
- Binary `broader_partitive`/`narrower_partitive`/`has_part`/`is_part_of` `RelatedConcept` edges and `PartitiveRelation` coexist — no automatic consolidation. Use a binary edge for pairwise relationships; use a PartitiveRelation when membership is jointly significant (≥2 partitives + completeness/plurality/criterion metadata).
71
+ Binary `broader_partitive`/`narrower_partitive`/`has_part`/`is_part_of` `RelatedConcept` edges and `PartitiveRelation` coexist — no automatic consolidation. Use a binary edge for pairwise relationships; use a PartitiveRelation when membership is jointly significant (≥2 partitives + completeness/multiplicity/delimiting/criterion metadata).
71
72
 
72
73
  #### ExternalConcept
73
74
 
data/config.yml CHANGED
@@ -211,9 +211,18 @@ completeness:
211
211
  - complete
212
212
  - partial
213
213
 
214
- member_certainty:
215
- # Per-partitive certainty. Glossarist extension beyond ISO 704
216
- # notation. Defaults to confirmed when omitted.
214
+ multiplicity:
215
+ # ISO 704:2022 partitive member multiplicity. Encodes the diagram
216
+ # line notation as structured data:
217
+ # compulsory — 1 solid line (must exist in every instance)
218
+ # optional — 1 dashed line (exists in some instances only)
219
+ # compulsory_multiple — 2 solid lines (multiple must exist)
220
+ # optional_multiple — 2 dashed lines (multiple may exist)
221
+ # at_least_one — 1 solid + 1 dashed line (at least one must exist)
222
+ # Default: compulsory.
217
223
  value:
218
- - confirmed
219
- - possible
224
+ - compulsory
225
+ - optional
226
+ - compulsory_multiple
227
+ - optional_multiple
228
+ - at_least_one
@@ -35,9 +35,8 @@ module Glossarist
35
35
  ISO12620_TERM_TYPES = config.dig("iso12620", "term_type").freeze
36
36
 
37
37
  # PartitiveRelation redesign (TODO.partitive-relation-v2).
38
- # Replaces PARTITIVE_ENUMERATION_VALUES + PLURALITY_MARKER_VALUES.
39
38
  COMPLETENESS_VALUES = config.dig("completeness", "value").freeze
40
39
 
41
- MEMBER_CERTAINTY_VALUES = config.dig("member_certainty", "value").freeze
40
+ MULTIPLICITY_VALUES = config.dig("multiplicity", "value").freeze
42
41
  end
43
42
  end
@@ -5,12 +5,14 @@ require "lutaml/model"
5
5
  module Glossarist
6
6
  module Rdf
7
7
  # RDF view for V3::PartitiveMember. Emits a
8
- # gloss:PartitiveMember subject with ref + certainty properties.
8
+ # gloss:PartitiveMember subject with ref, multiplicity, and
9
+ # is_delimiting properties.
9
10
  class GlossPartitiveMember < Lutaml::Model::Serializable
10
11
  attribute :ref_id, :string
11
12
  attribute :ref_source, :string
12
13
  attribute :ref_text, :string
13
- attribute :certainty, :string
14
+ attribute :multiplicity, :string
15
+ attribute :is_delimiting, :boolean
14
16
 
15
17
  rdf do
16
18
  namespace Namespaces::GlossaristNamespace
@@ -25,8 +27,10 @@ module Glossarist
25
27
  to: :ref_id
26
28
  predicate :refText, namespace: Namespaces::GlossaristNamespace,
27
29
  to: :ref_text
28
- predicate :certainty, namespace: Namespaces::GlossaristNamespace,
29
- to: :certainty
30
+ predicate :multiplicity, namespace: Namespaces::GlossaristNamespace,
31
+ to: :multiplicity
32
+ predicate :isDelimiting, namespace: Namespaces::GlossaristNamespace,
33
+ to: :is_delimiting
30
34
  end
31
35
  end
32
36
  end
@@ -6,13 +6,12 @@ module Glossarist
6
6
  module Rdf
7
7
  # RDF view for V3::PartitiveRelation. Emits a
8
8
  # gloss:PartitiveRelation subject with comprehensive, hasPartitive,
9
- # completeness, hasPlurality, criterion properties.
9
+ # completeness, criterion properties.
10
10
  class GlossPartitiveRelation < Lutaml::Model::Serializable
11
11
  attribute :identifier, :string
12
12
  attribute :comprehensive_uri, :string
13
13
  attribute :partitive_member_ids, :string, collection: true
14
14
  attribute :completeness, :string
15
- attribute :has_plurality, GlossTypeSharedPlurality
16
15
  attribute :criterion, :hash
17
16
 
18
17
  rdf do
@@ -28,8 +27,6 @@ module Glossarist
28
27
  to: :partitive_member_ids, uri_reference: true
29
28
  predicate :completeness, namespace: Namespaces::GlossaristNamespace,
30
29
  to: :completeness, uri_reference: true
31
- members :has_plurality,
32
- link: "gloss:hasPlurality"
33
30
  predicate :criterion, namespace: Namespaces::GlossaristNamespace,
34
31
  to: :criterion
35
32
  end
@@ -31,7 +31,6 @@ module Glossarist
31
31
  GlossFormula
32
32
  GlossPartitiveRelation
33
33
  GlossPartitiveMember
34
- GlossTypeSharedPlurality
35
34
  ].freeze
36
35
 
37
36
  VIEW_CLASS_NAMES.each do |name|
@@ -44,8 +44,6 @@ module Glossarist
44
44
  autoload :GlossFormula, "#{__dir__}/rdf/gloss_formula"
45
45
  autoload :GlossPartitiveRelation, "#{__dir__}/rdf/gloss_partitive_relation"
46
46
  autoload :GlossPartitiveMember, "#{__dir__}/rdf/gloss_partitive_member"
47
- autoload :GlossTypeSharedPlurality,
48
- "#{__dir__}/rdf/gloss_type_shared_plurality"
49
47
  autoload :V3, "#{__dir__}/rdf/v3"
50
48
  end
51
49
  end
@@ -157,22 +157,11 @@ module Glossarist
157
157
  partitive_member_uri(m)
158
158
  end,
159
159
  completeness: rel.completeness,
160
- has_plurality: build_gloss_plurality(rel.plurality),
161
160
  criterion: rel.criterion,
162
161
  )
163
162
  end
164
163
  end
165
164
 
166
- def build_gloss_plurality(plurality)
167
- return nil unless plurality
168
-
169
- Rdf::GlossTypeSharedPlurality.new(
170
- is_shared: plurality.is_shared,
171
- is_uncertain: plurality.is_uncertain,
172
- shared_type_uri: partitive_concept_uri(plurality.shared_type),
173
- )
174
- end
175
-
176
165
  def partitive_concept_uri(ref)
177
166
  return nil unless ref.is_a?(Glossarist::ConceptRef)
178
167
 
@@ -3,36 +3,57 @@
3
3
  module Glossarist
4
4
  module V3
5
5
  # PartitiveMember — one member of a PartitiveRelation, carrying
6
- # a ConceptRef to the partitive concept plus optional certainty
7
- # metadata (Glossarist extension beyond ISO 704 notation).
6
+ # a ConceptRef to the partitive concept plus ISO 704:2022
7
+ # multiplicity and delimiting metadata.
8
8
  #
9
- # A PartitiveMember with no certainty field is implicitly
10
- # confirmed.
9
+ # ISO 704:2022 partitive member notation:
10
+ #
11
+ # multiplicity (diagram line notation):
12
+ # compulsory — 1 solid line (must exist in every instance)
13
+ # optional — 1 dashed line (exists in some instances only)
14
+ # compulsory_multiple — 2 solid lines (multiple must exist)
15
+ # optional_multiple — 2 dashed lines (multiple may exist)
16
+ # at_least_one — 1 solid + 1 dashed line (≥1 must exist)
17
+ #
18
+ # is_delimiting (orthogonal, bold 3x-width line in diagram):
19
+ # A delimiting part behaves like a delimiting characteristic:
20
+ # it distinguishes the comprehensive from coordinate concepts.
21
+ # Example (ISO 704 §5.5.4.2.2): for "optomechanical mouse",
22
+ # the delimiting parts are mouse ball, x/y-axis rollers,
23
+ # infrared emitter/sensor — they distinguish it from
24
+ # "mechanical mouse" and "optical mouse". Mouse button is
25
+ # NOT delimiting (all computer mice have buttons).
11
26
  class PartitiveMember < Lutaml::Model::Serializable
12
- DEFAULT_CERTAINTY = "confirmed"
27
+ DEFAULT_MULTIPLICITY = "compulsory"
13
28
 
14
29
  attribute :ref, ConceptRef
15
- attribute :certainty, :string,
16
- values: Glossarist::GlossaryDefinition::MEMBER_CERTAINTY_VALUES,
17
- default: -> { DEFAULT_CERTAINTY }
30
+ attribute :multiplicity, :string,
31
+ values: Glossarist::GlossaryDefinition::MULTIPLICITY_VALUES,
32
+ default: -> { DEFAULT_MULTIPLICITY }
33
+ attribute :is_delimiting, :boolean, default: -> { false }
18
34
 
19
35
  key_value do
20
36
  map :ref, to: :ref
21
- map :certainty, to: :certainty
37
+ map :multiplicity, to: :multiplicity
38
+ map :is_delimiting, to: :is_delimiting
22
39
  end
23
40
 
24
41
  def validate!
25
42
  validate_ref!
26
- validate_certainty!
43
+ validate_multiplicity!
27
44
  self
28
45
  end
29
46
 
30
- def confirmed?
31
- certainty == DEFAULT_CERTAINTY
47
+ def compulsory?
48
+ multiplicity == "compulsory"
49
+ end
50
+
51
+ def optional?
52
+ multiplicity == "optional"
32
53
  end
33
54
 
34
- def possible?
35
- certainty == "possible"
55
+ def delimiting?
56
+ is_delimiting == true
36
57
  end
37
58
 
38
59
  private
@@ -45,15 +66,15 @@ module Glossarist
45
66
  "(source, id, or text required)"
46
67
  end
47
68
 
48
- def validate_certainty!
49
- return if certainty.nil?
69
+ def validate_multiplicity!
70
+ return if multiplicity.nil?
50
71
 
51
- unless Glossarist::GlossaryDefinition::MEMBER_CERTAINTY_VALUES
52
- .include?(certainty)
72
+ unless Glossarist::GlossaryDefinition::MULTIPLICITY_VALUES
73
+ .include?(multiplicity)
53
74
  raise ArgumentError,
54
- "PartitiveMember#certainty has invalid value " \
55
- "#{certainty.inspect}; must be one of " \
56
- "#{GlossaryDefinition::MEMBER_CERTAINTY_VALUES.join(', ')}"
75
+ "PartitiveMember#multiplicity has invalid value " \
76
+ "#{multiplicity.inspect}; must be one of " \
77
+ "#{GlossaryDefinition::MULTIPLICITY_VALUES.join(', ')}"
57
78
  end
58
79
  end
59
80
  end
@@ -12,10 +12,13 @@ module Glossarist
12
12
  # within one relation are coordinate concepts: they share the
13
13
  # comprehensive AND share the criterion of subdivision.
14
14
  #
15
- # Glossarist extensions beyond ISO notation:
16
- # - Per-partitive certainty (MemberCertainty)
17
- # - plurality.shared_type (the type the partitives share)
18
- # - criterion as a structured field (not just diagrammatic)
15
+ # Per-partitive metadata (ISO 704:2022):
16
+ # - multiplicity (compulsory, optional, compulsory_multiple,
17
+ # optional_multiple, at_least_one) encodes the diagram
18
+ # line notation as data
19
+ # - is_delimiting — orthogonal flag; a delimiting part behaves
20
+ # like a delimiting characteristic (distinguishes the
21
+ # comprehensive from coordinate concepts)
19
22
  #
20
23
  # Replaces the prior PartitiveHyperedge class. The "hyperedge"
21
24
  # framing was graph-theoretic; ISO calls this a *relation*.
@@ -27,14 +30,12 @@ module Glossarist
27
30
  attribute :completeness, :string,
28
31
  values: Glossarist::GlossaryDefinition::COMPLETENESS_VALUES,
29
32
  default: -> { DEFAULT_COMPLETENESS }
30
- attribute :plurality, TypeSharedPlurality
31
33
  attribute :criterion, :hash
32
34
 
33
35
  key_value do
34
36
  map :comprehensive, to: :comprehensive
35
37
  map :partitives, to: :partitives
36
38
  map :completeness, to: :completeness
37
- map :plurality, to: :plurality
38
39
  map :criterion, to: :criterion
39
40
  end
40
41
 
@@ -43,7 +44,6 @@ module Glossarist
43
44
  validate_partitives!
44
45
  validate_self_loop!
45
46
  validate_completeness!
46
- validate_plurality!
47
47
  self
48
48
  end
49
49
 
@@ -110,10 +110,6 @@ module Glossarist
110
110
  "#{GlossaryDefinition::COMPLETENESS_VALUES.join(', ')}"
111
111
  end
112
112
  end
113
-
114
- def validate_plurality!
115
- plurality&.validate!
116
- end
117
113
  end
118
114
  end
119
115
  end
data/lib/glossarist/v3.rb CHANGED
@@ -11,7 +11,6 @@ module Glossarist
11
11
  autoload :RelatedConcept, "glossarist/v3/related_concept"
12
12
  autoload :PartitiveRelation, "glossarist/v3/partitive_relation"
13
13
  autoload :PartitiveMember, "glossarist/v3/partitive_member"
14
- autoload :TypeSharedPlurality, "glossarist/v3/type_shared_plurality"
15
14
  autoload :ConceptData, "glossarist/v3/concept_data"
16
15
  autoload :LocalizedConcept, "glossarist/v3/localized_concept"
17
16
  autoload :ManagedConceptData, "glossarist/v3/managed_concept_data"
@@ -28,7 +27,6 @@ module Glossarist
28
27
  Configuration.register_model(RelatedConcept, id: :related_concept)
29
28
  Configuration.register_model(PartitiveRelation, id: :partitive_relation)
30
29
  Configuration.register_model(PartitiveMember, id: :partitive_member)
31
- Configuration.register_model(TypeSharedPlurality, id: :type_shared_plurality)
32
30
  Configuration.register_model(ManagedConceptData, id: :managed_concept_data)
33
31
  Configuration.register_model(ManagedConcept, id: :managed_concept)
34
32
  Configuration.register_model(ConceptDocument, id: :concept_document)
@@ -14,9 +14,8 @@ module Glossarist
14
14
  # ISO 12620 coordinate-concept coherence)
15
15
  # - warning when a relation has no criterion (cannot
16
16
  # distinguish from siblings sharing the comprehensive)
17
- # - error when plurality.is_uncertain is set without
18
- # plurality.is_shared: true (broken-line qualifies
19
- # close-set double line)
17
+ # - warning when multiplicity is not the default compulsory
18
+ # (encourages explicit statement of optional/multiple)
20
19
  # - error when ExternalConcept (status: external) lacks
21
20
  # at least one designation
22
21
  #
@@ -47,7 +46,7 @@ module Glossarist
47
46
  relations.each_with_index do |rel, idx|
48
47
  check_cardinality(rel, idx, fname, issues)
49
48
  check_criterion_present(rel, idx, fname, issues)
50
- check_plurality_coherence(rel, idx, fname, issues)
49
+ check_member_multiplicity(rel, idx, fname, issues)
51
50
  end
52
51
 
53
52
  check_duplicate_decomposition(relations, fname, issues)
@@ -86,18 +85,30 @@ module Glossarist
86
85
  )
87
86
  end
88
87
 
89
- def check_plurality_coherence(rel, idx, fname, issues)
90
- plural = rel.plurality
91
- return unless plural
92
- return unless plural.is_uncertain
93
- return if plural.is_shared
88
+ def check_member_multiplicity(rel, idx, fname, issues)
89
+ rel.partitives.each_with_index do |member, mi|
90
+ unless member.compulsory?
91
+ issues << issue(
92
+ "partitive_relation #{idx + 1}.partitives[#{mi}] has " \
93
+ "non-default multiplicity '#{member.multiplicity}'; " \
94
+ "ISO 704 diagram uses dashed/multiple-line notation for " \
95
+ "this — confirm the optionality is intentional",
96
+ severity: "warning",
97
+ location: fname,
98
+ )
99
+ end
100
+
101
+ next unless member.delimiting?
94
102
 
95
- issues << issue(
96
- "partitive_relation #{idx + 1}.plurality: is_uncertain requires " \
97
- "is_shared: true (ISO 704 broken line qualifies the close-set " \
98
- "double line claim)",
99
- location: fname,
100
- )
103
+ issues << issue(
104
+ "partitive_relation #{idx + 1}.partitives[#{mi}] is marked " \
105
+ "delimiting (ISO 704 bold 3x-width line); behaves like a " \
106
+ "delimiting characteristic distinguishing the comprehensive " \
107
+ "from coordinate concepts",
108
+ severity: "info",
109
+ location: fname,
110
+ )
111
+ end
101
112
  end
102
113
 
103
114
  def check_duplicate_decomposition(relations, fname, issues)
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.13.0"
7
+ VERSION = "2.13.1"
8
8
  end
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.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-23 00:00:00.000000000 Z
11
+ date: 2026-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -315,7 +315,6 @@ files:
315
315
  - lib/glossarist/rdf/gloss_pronunciation.rb
316
316
  - lib/glossarist/rdf/gloss_reference.rb
317
317
  - lib/glossarist/rdf/gloss_table.rb
318
- - lib/glossarist/rdf/gloss_type_shared_plurality.rb
319
318
  - lib/glossarist/rdf/localized_literal.rb
320
319
  - lib/glossarist/rdf/lutaml_ext.rb
321
320
  - lib/glossarist/rdf/namespaces.rb
@@ -400,7 +399,6 @@ files:
400
399
  - lib/glossarist/v3/partitive_member.rb
401
400
  - lib/glossarist/v3/partitive_relation.rb
402
401
  - lib/glossarist/v3/related_concept.rb
403
- - lib/glossarist/v3/type_shared_plurality.rb
404
402
  - lib/glossarist/validation.rb
405
403
  - lib/glossarist/validation/asset_index.rb
406
404
  - lib/glossarist/validation/bibliography_index.rb
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Glossarist
6
- module Rdf
7
- # RDF view for V3::TypeSharedPlurality. Emits a
8
- # gloss:TypeSharedPlurality subject with is_shared, is_uncertain,
9
- # shared_type properties.
10
- class GlossTypeSharedPlurality < Lutaml::Model::Serializable
11
- attribute :is_shared, :boolean
12
- attribute :is_uncertain, :boolean
13
- attribute :shared_type_uri, :string
14
-
15
- rdf do
16
- namespace Namespaces::GlossaristNamespace
17
-
18
- subject { |p| "plurality/#{p.object_id}" }
19
-
20
- types "gloss:TypeSharedPlurality"
21
-
22
- predicate :isShared, namespace: Namespaces::GlossaristNamespace,
23
- to: :is_shared
24
- predicate :isUncertain, namespace: Namespaces::GlossaristNamespace,
25
- to: :is_uncertain
26
- predicate :sharedType, namespace: Namespaces::GlossaristNamespace,
27
- to: :shared_type_uri, uri_reference: true
28
- end
29
- end
30
- end
31
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Glossarist
4
- module V3
5
- # TypeSharedPlurality — semantic claims encoded by ISO 704's
6
- # close-set double line and broken line notation, promoted from
7
- # diagram-notation flags to structured data so tools can reason
8
- # about plurality directly.
9
- #
10
- # A PartitiveRelation has at most one TypeSharedPlurality block.
11
- # Absent means: no type-shared plurality claim is being made.
12
- #
13
- # Replaces the prior `markers` field (which encoded the same
14
- # information as opaque strings like "double" and "dashed").
15
- class TypeSharedPlurality < Lutaml::Model::Serializable
16
- attribute :is_shared, :boolean
17
- attribute :is_uncertain, :boolean, default: -> { false }
18
- attribute :shared_type, ConceptRef
19
-
20
- key_value do
21
- map :is_shared, to: :is_shared
22
- map :is_uncertain, to: :is_uncertain
23
- map :shared_type, to: :shared_type
24
- end
25
-
26
- def validate!
27
- unless is_shared.is_a?(TrueClass) || is_shared.is_a?(FalseClass)
28
- raise ArgumentError,
29
- "TypeSharedPlurality#is_shared is required (boolean)"
30
- end
31
-
32
- if is_uncertain == true && is_shared == false
33
- raise ArgumentError,
34
- "TypeSharedPlurality#is_uncertain requires is_shared: true " \
35
- "(ISO 704 broken line qualifies the close-set double line claim)"
36
- end
37
-
38
- self
39
- end
40
- end
41
- end
42
- end