edoxen 0.7.2 → 0.8.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 +4 -4
- data/.rubocop.yml +26 -1
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +133 -0
- data/README.adoc +414 -182
- data/edoxen.gemspec +10 -10
- data/lib/edoxen/action.rb +5 -4
- data/lib/edoxen/agenda.rb +4 -7
- data/lib/edoxen/agenda_item.rb +12 -5
- data/lib/edoxen/approval.rb +2 -2
- data/lib/edoxen/attendance.rb +16 -10
- data/lib/edoxen/body_vocabulary_entry.rb +24 -0
- data/lib/edoxen/body_vocabulary_host.rb +40 -0
- data/lib/edoxen/cli.rb +175 -115
- data/lib/edoxen/consideration.rb +6 -4
- data/lib/edoxen/contact.rb +35 -0
- data/lib/edoxen/contact_collection.rb +26 -0
- data/lib/edoxen/contact_identifier.rb +13 -0
- data/lib/edoxen/contact_method.rb +16 -0
- data/lib/edoxen/date_time_range.rb +16 -0
- data/lib/edoxen/deadline.rb +1 -1
- data/lib/edoxen/decision.rb +57 -0
- data/lib/edoxen/decision_collection.rb +10 -0
- data/lib/edoxen/decision_date.rb +9 -0
- data/lib/edoxen/decision_metadata.rb +27 -0
- data/lib/edoxen/decision_relation.rb +11 -0
- data/lib/edoxen/declaration.rb +25 -0
- data/lib/edoxen/entity_ref.rb +74 -0
- data/lib/edoxen/enums.rb +123 -9
- data/lib/edoxen/error.rb +1 -1
- data/lib/edoxen/extension_attribute.rb +78 -0
- data/lib/edoxen/host_ref.rb +1 -1
- data/lib/edoxen/link_checker.rb +143 -34
- data/lib/edoxen/localized_name.rb +16 -0
- data/lib/edoxen/localized_string.rb +22 -0
- data/lib/edoxen/meeting.rb +34 -42
- data/lib/edoxen/meeting_collection.rb +1 -2
- data/lib/edoxen/meeting_collection_metadata.rb +4 -2
- data/lib/edoxen/meeting_component.rb +37 -0
- data/lib/edoxen/meeting_extension.rb +25 -0
- data/lib/edoxen/meeting_identifier.rb +1 -1
- data/lib/edoxen/meeting_series.rb +26 -0
- data/lib/edoxen/minutes.rb +3 -4
- data/lib/edoxen/minutes_section.rb +12 -13
- data/lib/edoxen/motion.rb +51 -0
- data/lib/edoxen/name.rb +29 -0
- data/lib/edoxen/officer.rb +19 -0
- data/lib/edoxen/officers_host.rb +19 -0
- data/lib/edoxen/person.rb +5 -9
- data/lib/edoxen/physical_venue.rb +15 -0
- data/lib/edoxen/recurrence.rb +27 -0
- data/lib/edoxen/recurrence_by_day.rb +10 -0
- data/lib/edoxen/reference.rb +1 -1
- data/lib/edoxen/reference_data.rb +34 -44
- data/lib/edoxen/schema_validator.rb +3 -4
- data/lib/edoxen/source_url.rb +4 -4
- data/lib/edoxen/statement.rb +21 -0
- data/lib/edoxen/structured_identifier.rb +2 -2
- data/lib/edoxen/topic.rb +39 -0
- data/lib/edoxen/topic_asset.rb +14 -0
- data/lib/edoxen/topic_document.rb +16 -0
- data/lib/edoxen/venue.rb +79 -0
- data/lib/edoxen/venue_collection.rb +18 -0
- data/lib/edoxen/venue_validator.rb +74 -0
- data/lib/edoxen/version.rb +1 -1
- data/lib/edoxen/virtual_venue.rb +15 -0
- data/lib/edoxen/vote_record.rb +17 -13
- data/lib/edoxen/voting.rb +45 -0
- data/lib/edoxen/voting_counts.rb +23 -0
- data/lib/edoxen.rb +47 -15
- data/schema/edoxen.yaml +1376 -246
- data/schema/meeting.yaml +1207 -272
- data/sig/edoxen.rbs +581 -1
- metadata +62 -22
- data/lib/edoxen/_metadata.rb.deprecated +0 -57
- data/lib/edoxen/localization.rb +0 -18
- data/lib/edoxen/location.rb +0 -15
- data/lib/edoxen/meeting_localization.rb +0 -15
- data/lib/edoxen/resolution.rb +0 -43
- data/lib/edoxen/resolution_collection.rb +0 -10
- data/lib/edoxen/resolution_date.rb +0 -11
- data/lib/edoxen/resolution_metadata.rb +0 -30
- data/lib/edoxen/resolution_relation.rb +0 -11
- data/lib/edoxen/resolution_set.rb +0 -17
- data/lib/edoxen/schedule_item.rb +0 -27
- data/lib/edoxen/schedule_item_localization.rb +0 -21
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edoxen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json_schemer
|
|
@@ -54,6 +54,20 @@ dependencies:
|
|
|
54
54
|
version: '1.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: unlocodes
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.3'
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.3'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: iata
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
58
72
|
requirements:
|
|
59
73
|
- - "~>"
|
|
@@ -67,11 +81,11 @@ dependencies:
|
|
|
67
81
|
- !ruby/object:Gem::Version
|
|
68
82
|
version: '0.1'
|
|
69
83
|
description: |
|
|
70
|
-
Edoxen provides a Ruby library for working with
|
|
71
|
-
users to create, manipulate, and serialize
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
Edoxen provides a Ruby library for working with a generic meeting/decision
|
|
85
|
+
model, allowing users to create, manipulate, and serialize meeting, agenda,
|
|
86
|
+
motion, voting, and decision data in a structured format. Built on top of
|
|
87
|
+
the lutaml-model serialization framework, with profile-based customization
|
|
88
|
+
(ISO 8601-2 §15) for domain-specific extensions.
|
|
75
89
|
email:
|
|
76
90
|
- open.source@ribose.com
|
|
77
91
|
executables:
|
|
@@ -82,6 +96,7 @@ files:
|
|
|
82
96
|
- ".rspec"
|
|
83
97
|
- ".rubocop.yml"
|
|
84
98
|
- ".rubocop_todo.yml"
|
|
99
|
+
- CHANGELOG.md
|
|
85
100
|
- CLAUDE.md
|
|
86
101
|
- CODE_OF_CONDUCT.md
|
|
87
102
|
- Gemfile
|
|
@@ -101,47 +116,72 @@ files:
|
|
|
101
116
|
- edoxen.gemspec
|
|
102
117
|
- exe/edoxen
|
|
103
118
|
- lib/edoxen.rb
|
|
104
|
-
- lib/edoxen/_metadata.rb.deprecated
|
|
105
119
|
- lib/edoxen/action.rb
|
|
106
120
|
- lib/edoxen/agenda.rb
|
|
107
121
|
- lib/edoxen/agenda_item.rb
|
|
108
122
|
- lib/edoxen/approval.rb
|
|
109
123
|
- lib/edoxen/attendance.rb
|
|
124
|
+
- lib/edoxen/body_vocabulary_entry.rb
|
|
125
|
+
- lib/edoxen/body_vocabulary_host.rb
|
|
110
126
|
- lib/edoxen/cli.rb
|
|
111
127
|
- lib/edoxen/consideration.rb
|
|
128
|
+
- lib/edoxen/contact.rb
|
|
129
|
+
- lib/edoxen/contact_collection.rb
|
|
130
|
+
- lib/edoxen/contact_identifier.rb
|
|
131
|
+
- lib/edoxen/contact_method.rb
|
|
112
132
|
- lib/edoxen/date_range.rb
|
|
133
|
+
- lib/edoxen/date_time_range.rb
|
|
113
134
|
- lib/edoxen/deadline.rb
|
|
135
|
+
- lib/edoxen/decision.rb
|
|
136
|
+
- lib/edoxen/decision_collection.rb
|
|
137
|
+
- lib/edoxen/decision_date.rb
|
|
138
|
+
- lib/edoxen/decision_metadata.rb
|
|
139
|
+
- lib/edoxen/decision_relation.rb
|
|
140
|
+
- lib/edoxen/declaration.rb
|
|
141
|
+
- lib/edoxen/entity_ref.rb
|
|
114
142
|
- lib/edoxen/enums.rb
|
|
115
143
|
- lib/edoxen/error.rb
|
|
144
|
+
- lib/edoxen/extension_attribute.rb
|
|
116
145
|
- lib/edoxen/host_ref.rb
|
|
117
146
|
- lib/edoxen/link_checker.rb
|
|
118
|
-
- lib/edoxen/
|
|
119
|
-
- lib/edoxen/
|
|
147
|
+
- lib/edoxen/localized_name.rb
|
|
148
|
+
- lib/edoxen/localized_string.rb
|
|
120
149
|
- lib/edoxen/meeting.rb
|
|
121
150
|
- lib/edoxen/meeting_collection.rb
|
|
122
151
|
- lib/edoxen/meeting_collection_metadata.rb
|
|
152
|
+
- lib/edoxen/meeting_component.rb
|
|
153
|
+
- lib/edoxen/meeting_extension.rb
|
|
123
154
|
- lib/edoxen/meeting_identifier.rb
|
|
124
|
-
- lib/edoxen/meeting_localization.rb
|
|
125
155
|
- lib/edoxen/meeting_relation.rb
|
|
156
|
+
- lib/edoxen/meeting_series.rb
|
|
126
157
|
- lib/edoxen/minutes.rb
|
|
127
158
|
- lib/edoxen/minutes_section.rb
|
|
159
|
+
- lib/edoxen/motion.rb
|
|
160
|
+
- lib/edoxen/name.rb
|
|
161
|
+
- lib/edoxen/officer.rb
|
|
162
|
+
- lib/edoxen/officers_host.rb
|
|
128
163
|
- lib/edoxen/person.rb
|
|
164
|
+
- lib/edoxen/physical_venue.rb
|
|
165
|
+
- lib/edoxen/recurrence.rb
|
|
166
|
+
- lib/edoxen/recurrence_by_day.rb
|
|
129
167
|
- lib/edoxen/reference.rb
|
|
130
168
|
- lib/edoxen/reference_data.rb
|
|
131
|
-
- lib/edoxen/resolution.rb
|
|
132
|
-
- lib/edoxen/resolution_collection.rb
|
|
133
|
-
- lib/edoxen/resolution_date.rb
|
|
134
|
-
- lib/edoxen/resolution_metadata.rb
|
|
135
|
-
- lib/edoxen/resolution_relation.rb
|
|
136
|
-
- lib/edoxen/resolution_set.rb
|
|
137
|
-
- lib/edoxen/schedule_item.rb
|
|
138
|
-
- lib/edoxen/schedule_item_localization.rb
|
|
139
169
|
- lib/edoxen/schema_validator.rb
|
|
140
170
|
- lib/edoxen/source_url.rb
|
|
171
|
+
- lib/edoxen/statement.rb
|
|
141
172
|
- lib/edoxen/structured_identifier.rb
|
|
173
|
+
- lib/edoxen/topic.rb
|
|
174
|
+
- lib/edoxen/topic_asset.rb
|
|
175
|
+
- lib/edoxen/topic_document.rb
|
|
142
176
|
- lib/edoxen/url.rb
|
|
177
|
+
- lib/edoxen/venue.rb
|
|
178
|
+
- lib/edoxen/venue_collection.rb
|
|
179
|
+
- lib/edoxen/venue_validator.rb
|
|
143
180
|
- lib/edoxen/version.rb
|
|
181
|
+
- lib/edoxen/virtual_venue.rb
|
|
144
182
|
- lib/edoxen/vote_record.rb
|
|
183
|
+
- lib/edoxen/voting.rb
|
|
184
|
+
- lib/edoxen/voting_counts.rb
|
|
145
185
|
- schema/edoxen.yaml
|
|
146
186
|
- schema/meeting.yaml
|
|
147
187
|
- sig/edoxen.rbs
|
|
@@ -152,6 +192,7 @@ metadata:
|
|
|
152
192
|
homepage_uri: https://github.com/metanorma/edoxen
|
|
153
193
|
source_code_uri: https://github.com/metanorma/edoxen
|
|
154
194
|
changelog_uri: https://github.com/metanorma/edoxen
|
|
195
|
+
rubygems_mfa_required: 'true'
|
|
155
196
|
post_install_message:
|
|
156
197
|
rdoc_options: []
|
|
157
198
|
require_paths:
|
|
@@ -160,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
160
201
|
requirements:
|
|
161
202
|
- - ">="
|
|
162
203
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: 3.
|
|
204
|
+
version: 3.1.0
|
|
164
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
206
|
requirements:
|
|
166
207
|
- - ">="
|
|
@@ -170,6 +211,5 @@ requirements: []
|
|
|
170
211
|
rubygems_version: 3.5.22
|
|
171
212
|
signing_key:
|
|
172
213
|
specification_version: 4
|
|
173
|
-
summary: Edoxen is a
|
|
174
|
-
decision information.
|
|
214
|
+
summary: Edoxen is a generic information model for meetings, agendas, and decisions.
|
|
175
215
|
test_files: []
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
require_relative "resolution_date"
|
|
5
|
-
require_relative "url"
|
|
6
|
-
require_relative "localization"
|
|
7
|
-
|
|
8
|
-
module Edoxen
|
|
9
|
-
# A per-language source-URL record. Carries the URL ref, its format
|
|
10
|
-
# (pdf, html, ...), and the language_code (ISO 639-3) for which the
|
|
11
|
-
# URL is the canonical source.
|
|
12
|
-
class SourceUrl < Lutaml::Model::Serializable
|
|
13
|
-
attribute :ref, :string
|
|
14
|
-
attribute :format, :string
|
|
15
|
-
attribute :language_code, :string
|
|
16
|
-
|
|
17
|
-
key_value do
|
|
18
|
-
map "ref", to: :ref
|
|
19
|
-
map "format", to: :format
|
|
20
|
-
map "language_code", to: :language_code
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
class Metadata < Lutaml::Model::Serializable
|
|
25
|
-
attribute :title, :string
|
|
26
|
-
attribute :identifier, :string
|
|
27
|
-
attribute :dates, ResolutionDate, collection: true
|
|
28
|
-
attribute :source, :string
|
|
29
|
-
attribute :venue, :string
|
|
30
|
-
attribute :chair, :string
|
|
31
|
-
attribute :urls, Url, collection: true
|
|
32
|
-
|
|
33
|
-
# OIML extensions — see TODO.complete/14 for the glossarist-style
|
|
34
|
-
# i18n model. `title_localized` carries the per-language title
|
|
35
|
-
# parallel to Resolution#localizations. `source_urls` carries the
|
|
36
|
-
# per-language PDF URLs. `city`/`country_code` carry the IATA /
|
|
37
|
-
# ISO 3166-1 alpha-2 codes for the host venue.
|
|
38
|
-
attribute :title_localized, Localization, collection: true
|
|
39
|
-
attribute :source_urls, SourceUrl, collection: true
|
|
40
|
-
attribute :city, :string
|
|
41
|
-
attribute :country_code, :string
|
|
42
|
-
|
|
43
|
-
key_value do
|
|
44
|
-
map "title", to: :title
|
|
45
|
-
map "identifier", to: :identifier
|
|
46
|
-
map "dates", to: :dates
|
|
47
|
-
map "source", to: :source
|
|
48
|
-
map "venue", to: :venue
|
|
49
|
-
map "chair", to: :chair
|
|
50
|
-
map "urls", to: :urls
|
|
51
|
-
map "title_localized", to: :title_localized
|
|
52
|
-
map "source_urls", to: :source_urls
|
|
53
|
-
map "city", to: :city
|
|
54
|
-
map "country_code", to: :country_code
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
data/lib/edoxen/localization.rb
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# A monolingual rendering of a Resolution. Mirrors the glossarist
|
|
5
|
-
# LocalizedConcept pattern: language-agnostic fields live on the
|
|
6
|
-
# parent Resolution; per-language content lives here.
|
|
7
|
-
class Localization < Lutaml::Model::Serializable
|
|
8
|
-
attribute :language_code, :string
|
|
9
|
-
attribute :script, :string
|
|
10
|
-
attribute :title, :string
|
|
11
|
-
attribute :subject, :string
|
|
12
|
-
attribute :message, :string
|
|
13
|
-
attribute :considering, :string
|
|
14
|
-
attribute :considerations, Consideration, collection: true
|
|
15
|
-
attribute :approvals, Approval, collection: true
|
|
16
|
-
attribute :actions, Action, collection: true
|
|
17
|
-
end
|
|
18
|
-
end
|
data/lib/edoxen/location.rb
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Venue geography. Multi-venue meetings (e.g., a plenary week with
|
|
5
|
-
# different hotels) carry one Location per venue.
|
|
6
|
-
class Location < Lutaml::Model::Serializable
|
|
7
|
-
attribute :name, :string
|
|
8
|
-
attribute :address, :string
|
|
9
|
-
attribute :link, :string
|
|
10
|
-
attribute :phone, :string
|
|
11
|
-
attribute :note, :string
|
|
12
|
-
attribute :lat, :float
|
|
13
|
-
attribute :lon, :float
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Per-language content for a Meeting. Mirrors the glossarist
|
|
5
|
-
# pattern used by `Localization` for Resolutions: language-agnostic
|
|
6
|
-
# admin fields live on the parent Meeting; per-language content
|
|
7
|
-
# lives here.
|
|
8
|
-
class MeetingLocalization < Lutaml::Model::Serializable
|
|
9
|
-
attribute :language_code, :string
|
|
10
|
-
attribute :script, :string
|
|
11
|
-
attribute :title, :string
|
|
12
|
-
attribute :general_area, :string
|
|
13
|
-
attribute :practical_info, :string
|
|
14
|
-
end
|
|
15
|
-
end
|
data/lib/edoxen/resolution.rb
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# A formal Resolution. Language-agnostic admin fields live here; every
|
|
5
|
-
# translatable field is wrapped inside `localizations[]` (one entry per
|
|
6
|
-
# available language; at least one is required by the schema).
|
|
7
|
-
#
|
|
8
|
-
# Wire names follow lutaml-model's default convention: each declared
|
|
9
|
-
# attribute serializes to its snake_case name on the wire. Override
|
|
10
|
-
# with an explicit `key_value do; map "wire", to: :attr; end` block
|
|
11
|
-
# only when the wire name differs.
|
|
12
|
-
class Resolution < Lutaml::Model::Serializable
|
|
13
|
-
attribute :identifier, StructuredIdentifier, collection: true
|
|
14
|
-
attribute :type, :string, values: Enums::RESOLUTION_TYPE
|
|
15
|
-
attribute :doi, :string
|
|
16
|
-
attribute :urn, :string
|
|
17
|
-
attribute :agenda_item, :string
|
|
18
|
-
attribute :dates, ResolutionDate, collection: true
|
|
19
|
-
attribute :categories, :string, collection: true
|
|
20
|
-
attribute :meeting, MeetingIdentifier
|
|
21
|
-
attribute :relations, ResolutionRelation, collection: true
|
|
22
|
-
attribute :urls, Url, collection: true
|
|
23
|
-
attribute :localizations, Localization, collection: true
|
|
24
|
-
|
|
25
|
-
# Lookup by ISO 639-3 language code. Returns nil when no exact match
|
|
26
|
-
# exists and `fallback:` is false (the default); returns the first
|
|
27
|
-
# localization otherwise. Keeps the language-preference policy in
|
|
28
|
-
# one place so callers stop reimplementing `find { |l| ... }`.
|
|
29
|
-
def in_language(code, fallback: false)
|
|
30
|
-
match = localizations&.find { |loc| loc.language_code == code.to_s }
|
|
31
|
-
return match if match
|
|
32
|
-
|
|
33
|
-
fallback ? localizations&.first : nil
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# The canonical rendering — English when available, else the first
|
|
37
|
-
# declared localization. Mirrors the glossarist LocalizedConcept
|
|
38
|
-
# "preferred language" notion.
|
|
39
|
-
def primary_localization
|
|
40
|
-
in_language("eng", fallback: true)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Top-level container for a published resolution collection: metadata
|
|
5
|
-
# plus the list of resolutions.
|
|
6
|
-
class ResolutionCollection < Lutaml::Model::Serializable
|
|
7
|
-
attribute :metadata, ResolutionMetadata
|
|
8
|
-
attribute :resolutions, Resolution, collection: true
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Date with semantic kind (adoption, drafted, discussed).
|
|
5
|
-
# ResolutionDate is the only carrier of a *typed* date in the model —
|
|
6
|
-
# plain `Date` in lutaml-model has no semantic context.
|
|
7
|
-
class ResolutionDate < Lutaml::Model::Serializable
|
|
8
|
-
attribute :date, :date
|
|
9
|
-
attribute :type, :string, values: Enums::RESOLUTION_DATE_TYPE
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Collection-level metadata: the title (string for default / single-language
|
|
5
|
-
# collections, or `title_localized[]` for multilingual), the meeting date,
|
|
6
|
-
# the source secretariat, per-language source PDFs, and the host venue.
|
|
7
|
-
class ResolutionMetadata < Lutaml::Model::Serializable
|
|
8
|
-
attribute :title, :string
|
|
9
|
-
attribute :title_localized, Localization, collection: true
|
|
10
|
-
attribute :date, :date
|
|
11
|
-
attribute :source, :string
|
|
12
|
-
attribute :source_urls, SourceUrl, collection: true
|
|
13
|
-
attribute :city, :string
|
|
14
|
-
attribute :country_code, :string
|
|
15
|
-
|
|
16
|
-
# URN back-reference to the Meeting that produced this collection.
|
|
17
|
-
# Join key for the Meeting ↔ ResolutionCollection link. Optional —
|
|
18
|
-
# collections without a parent meeting (e.g., ad-hoc resolution
|
|
19
|
-
# sets) simply omit it.
|
|
20
|
-
attribute :meeting_urn, :string
|
|
21
|
-
|
|
22
|
-
# Resolve the collection's host-city UN/LOCODE via the canonical
|
|
23
|
-
# `unlocode` gem registry. Returns an `Unlocodes::Entry` or nil.
|
|
24
|
-
def city_entry
|
|
25
|
-
return nil if city.nil? || city.to_s.empty?
|
|
26
|
-
|
|
27
|
-
Edoxen::ReferenceData.find_unlocode(city)
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Directed relation between two resolutions, identified by their
|
|
5
|
-
# StructuredIdentifier (prefix + number).
|
|
6
|
-
class ResolutionRelation < Lutaml::Model::Serializable
|
|
7
|
-
attribute :source, StructuredIdentifier
|
|
8
|
-
attribute :destination, StructuredIdentifier
|
|
9
|
-
attribute :type, :string, values: Enums::RESOLUTION_RELATION_TYPE
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
require_relative "metadata"
|
|
5
|
-
require_relative "resolution"
|
|
6
|
-
|
|
7
|
-
module Edoxen
|
|
8
|
-
class ResolutionSet < Lutaml::Model::Serializable
|
|
9
|
-
attribute :metadata, Metadata
|
|
10
|
-
attribute :resolutions, Resolution, collection: true
|
|
11
|
-
|
|
12
|
-
key_value do
|
|
13
|
-
map "metadata", to: :metadata
|
|
14
|
-
map "resolutions", to: :resolutions
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
data/lib/edoxen/schedule_item.rb
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# One entry in the meeting timetable. Structural fields (date, time,
|
|
5
|
-
# room) are language-agnostic; per-language content (event name,
|
|
6
|
-
# description) lives in `localizations[]`. Mirrors the glossarist
|
|
7
|
-
# LocalizedConcept pattern.
|
|
8
|
-
class ScheduleItem < Lutaml::Model::Serializable
|
|
9
|
-
attribute :date, :date
|
|
10
|
-
attribute :time, :string
|
|
11
|
-
attribute :event, :string
|
|
12
|
-
attribute :description, :string
|
|
13
|
-
attribute :room, :string
|
|
14
|
-
attribute :localizations, ScheduleItemLocalization, collection: true
|
|
15
|
-
|
|
16
|
-
def in_language(code, fallback: false)
|
|
17
|
-
match = localizations&.find { |loc| loc.language_code == code.to_s }
|
|
18
|
-
return match if match
|
|
19
|
-
|
|
20
|
-
fallback ? localizations&.first : nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def primary_localization
|
|
24
|
-
in_language("eng", fallback: true)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Edoxen
|
|
4
|
-
# Per-language content for a ScheduleItem. Mirrors the glossarist
|
|
5
|
-
# LocalizedConcept pattern: structural fields (date, time, room) live
|
|
6
|
-
# on the parent ScheduleItem; per-language content (event name,
|
|
7
|
-
# description) lives here.
|
|
8
|
-
class ScheduleItemLocalization < Lutaml::Model::Serializable
|
|
9
|
-
attribute :language_code, :string
|
|
10
|
-
attribute :script, :string
|
|
11
|
-
attribute :event, :string
|
|
12
|
-
attribute :description, :string
|
|
13
|
-
|
|
14
|
-
key_value do
|
|
15
|
-
map "language_code", to: :language_code
|
|
16
|
-
map "script", to: :script
|
|
17
|
-
map "event", to: :event
|
|
18
|
-
map "description", to: :description
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|