edoxen 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c5b96952dff52eca74ca77c35534cf68e380e57694eec5f308fe855b306bd3b2
4
+ data.tar.gz: c19d66b0f115b74562a01d04a19e1416f2ee7414010d7cca991f84ee37c39245
5
+ SHA512:
6
+ metadata.gz: d44772650c4943aa5d487969edb49db47a8078ff7544fe68d7d581e238eb4d1d8b1c4268919cbd823b5f7787c2edf81040b7342ae05392ccfe21e1159f5e9e34
7
+ data.tar.gz: 0e079b28ade73d23191d517fbf676fd22f2a1584670575b1d3ad42bbc18673c02836feba67191d72733aee37be1aa27abb6f5b087aac824fa71132889249cd72
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,15 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.6
5
+
6
+ Style/StringLiterals:
7
+ Enabled: true
8
+ EnforcedStyle: double_quotes
9
+
10
+ Style/StringLiteralsInInterpolation:
11
+ Enabled: true
12
+ EnforcedStyle: double_quotes
13
+
14
+ Layout/LineLength:
15
+ Max: 120
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,96 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-07-18 13:23:46 UTC using RuboCop version 1.78.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity, Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'edoxen.gemspec'
15
+
16
+ # Offense count: 13
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ Layout/EmptyLineAfterMagicComment:
19
+ Exclude:
20
+ - 'lib/edoxen/action.rb'
21
+ - 'lib/edoxen/approval.rb'
22
+ - 'lib/edoxen/consideration.rb'
23
+ - 'lib/edoxen/meeting_identfier.rb'
24
+ - 'lib/edoxen/resolution.rb'
25
+ - 'lib/edoxen/resolution_collection.rb'
26
+ - 'lib/edoxen/resolution_date.rb'
27
+ - 'lib/edoxen/resolution_relationship.rb'
28
+ - 'lib/edoxen/structured_identifier.rb'
29
+ - 'lib/edoxen/subject_body.rb'
30
+ - 'spec/edoxen/action_spec.rb'
31
+ - 'spec/edoxen/resolution_collection_spec.rb'
32
+ - 'spec/edoxen/resolution_spec.rb'
33
+
34
+ # Offense count: 1
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
37
+ # URISchemes: http, https
38
+ Layout/LineLength:
39
+ Max: 123
40
+
41
+ # Offense count: 1
42
+ # Configuration parameters: AllowComments.
43
+ Lint/EmptyFile:
44
+ Exclude:
45
+ - 'lib/edoxen/meeting.rb'
46
+
47
+ # Offense count: 14
48
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
49
+ # AllowedMethods: refine
50
+ Metrics/BlockLength:
51
+ Max: 234
52
+
53
+ # Offense count: 10
54
+ # Configuration parameters: AllowedConstants.
55
+ Style/Documentation:
56
+ Exclude:
57
+ - 'spec/**/*'
58
+ - 'test/**/*'
59
+ - 'lib/edoxen.rb'
60
+ - 'lib/edoxen/action.rb'
61
+ - 'lib/edoxen/approval.rb'
62
+ - 'lib/edoxen/consideration.rb'
63
+ - 'lib/edoxen/meeting_identfier.rb'
64
+ - 'lib/edoxen/resolution.rb'
65
+ - 'lib/edoxen/resolution_collection.rb'
66
+ - 'lib/edoxen/resolution_relationship.rb'
67
+ - 'lib/edoxen/structured_identifier.rb'
68
+ - 'lib/edoxen/subject_body.rb'
69
+
70
+ # Offense count: 13
71
+ # This cop supports unsafe autocorrection (--autocorrect-all).
72
+ # Configuration parameters: EnforcedStyle.
73
+ # SupportedStyles: always, always_true, never
74
+ Style/FrozenStringLiteralComment:
75
+ Exclude:
76
+ - '**/*.arb'
77
+ - 'lib/edoxen/action.rb'
78
+ - 'lib/edoxen/approval.rb'
79
+ - 'lib/edoxen/consideration.rb'
80
+ - 'lib/edoxen/meeting_identfier.rb'
81
+ - 'lib/edoxen/resolution.rb'
82
+ - 'lib/edoxen/resolution_collection.rb'
83
+ - 'lib/edoxen/resolution_date.rb'
84
+ - 'lib/edoxen/resolution_relationship.rb'
85
+ - 'lib/edoxen/structured_identifier.rb'
86
+ - 'lib/edoxen/subject_body.rb'
87
+ - 'spec/edoxen/action_spec.rb'
88
+ - 'spec/edoxen/resolution_collection_spec.rb'
89
+ - 'spec/edoxen/resolution_spec.rb'
90
+
91
+ # Offense count: 1
92
+ # This cop supports safe autocorrection (--autocorrect).
93
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
94
+ # URISchemes: http, https
95
+ Layout/LineLength:
96
+ Max: 123
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ronald.tse@ribose.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in edoxen.gemspec
6
+ gemspec
7
+
8
+ gem "rake"
9
+ gem "rspec"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
data/README.adoc ADDED
@@ -0,0 +1,258 @@
1
+ = Edoxen
2
+
3
+ https://github.com/metanorma/edoxen[image:https://img.shields.io/github/stars/metanorma/edoxen.svg?style=social[GitHub Stars]]
4
+ https://github.com/metanorma/edoxen[image:https://img.shields.io/github/forks/metanorma/edoxen.svg?style=social[GitHub Forks]]
5
+ image:https://img.shields.io/github/license/metanorma/edoxen.svg[License]
6
+ image:https://img.shields.io/github/actions/workflow/status/metanorma/edoxen/test.yml?branch=main[Build Status]
7
+ image:https://img.shields.io/gem/v/edoxen.svg[RubyGems Version]
8
+
9
+ == Purpose
10
+
11
+ Edoxen is a set of information models used for representing resolution and
12
+ decision information. They are designed to provide a structured way to model
13
+ formal resolutions, including their metadata, actions, considerations, and
14
+ approvals.
15
+
16
+ The `edoxen` gem provides a Ruby library for working with these models,
17
+ allowing users to create, manipulate, and serialize resolution data in a
18
+ structured format. It is built on top of the `lutaml-model` serialization
19
+ framework, which provides a flexible and extensible way to define data models
20
+ and serialize them to YAML or JSON formats.
21
+
22
+ This library is particularly useful for standards organizations, committees,
23
+ and governance bodies that need to maintain structured records of their
24
+ decision-making processes.
25
+
26
+
27
+ == Origin
28
+
29
+ "Edoxen" is how all resolutions of Ancient Athens started.
30
+
31
+ ____
32
+ "It was the opinion of... (the people and city that...)"
33
+ ____
34
+
35
+ The word "edoxen" originates from the Ancient Greek word edokeō (ἔδοξεν),
36
+ meaning "it was the opinion of" or "it seemed good to". This term was used in
37
+ the context of formal resolutions and decisions made by the Athenian assembly,
38
+ reflecting the collective will and judgment of the citizens.
39
+
40
+
41
+ == Features
42
+
43
+ * Classes for modeling resolutions, actions, considerations, and approvals
44
+ * Support for resolution collections with metadata
45
+ * YAML and JSON serialization with round-trip compatibility
46
+ * Structured identifiers and meeting information
47
+ * Resolution relationships and dependencies
48
+ * Integration with the `lutaml-model` serialization framework
49
+ * Comprehensive YAML schema for validation
50
+ * Real-world data compatibility with ISO/TC 154 resolution formats
51
+
52
+ == Installation
53
+
54
+ Add this line to your application's Gemfile:
55
+
56
+ [source,ruby]
57
+ ----
58
+ gem 'edoxen'
59
+ ----
60
+
61
+ And then execute:
62
+
63
+ [source,sh]
64
+ ----
65
+ $ bundle install
66
+ ----
67
+
68
+ Or install it yourself as:
69
+
70
+ [source,sh]
71
+ ----
72
+ $ gem install edoxen
73
+ ----
74
+
75
+ == Quick start
76
+
77
+ Here's a minimal example to get you started:
78
+
79
+ [source,ruby]
80
+ ----
81
+ require 'edoxen'
82
+
83
+ # Create a simple resolution
84
+ resolution = Edoxen::Resolution.new(
85
+ title: "Adoption of new standard",
86
+ type: "resolution",
87
+ category: "Technical resolutions",
88
+ identifier: "2024-01"
89
+ )
90
+
91
+ # Add an action to the resolution
92
+ action = Edoxen::Action.new(
93
+ type: "resolves",
94
+ message: "to adopt ISO 12345 as a new standard",
95
+ date_effective: Date.new(2024, 1, 15)
96
+ )
97
+ resolution.actions = [action]
98
+
99
+ # Add a consideration
100
+ consideration = Edoxen::Consideration.new(
101
+ type: "having",
102
+ message: "reviewed the technical specifications"
103
+ )
104
+ resolution.considerations = [consideration]
105
+
106
+ # Serialize to YAML
107
+ puts resolution.to_yaml
108
+
109
+ # Create a resolution collection
110
+ collection = Edoxen::ResolutionCollection.new(
111
+ metadata: {
112
+ title: "Resolutions of the 42nd plenary meeting",
113
+ date: "2024-01-15",
114
+ source: "ISO/TC 154 Secretariat"
115
+ },
116
+ resolutions: [resolution]
117
+ )
118
+
119
+ # Serialize collection to YAML
120
+ puts collection.to_yaml
121
+ ----
122
+
123
+ == Documentation
124
+
125
+ === Data models
126
+
127
+ The library provides these main model classes:
128
+
129
+ `Edoxen::Resolution`::
130
+ Core model representing a formal resolution with title, type, category, and
131
+ associated elements.
132
+
133
+ `Edoxen::ResolutionCollection`::
134
+ Container for multiple resolutions with metadata about the meeting or
135
+ collection context.
136
+
137
+ `Edoxen::Action`::
138
+ Represents actions taken within a resolution (e.g., "resolves", "requests",
139
+ "thanks").
140
+
141
+ `Edoxen::Consideration`::
142
+ Models considerations that lead to a resolution (e.g., "having", "noting",
143
+ "recognizing").
144
+
145
+ `Edoxen::Approval`::
146
+ Captures approval information including type and degree of consensus.
147
+
148
+ `Edoxen::MeetingIdentifier`::
149
+ Contains meeting identification information such as venue, date, and identifier.
150
+
151
+ `Edoxen::ResolutionRelationship`::
152
+ Defines relationships between resolutions (e.g., "supersedes", "amends").
153
+
154
+ === Architecture overview
155
+
156
+ The library is built on `lutaml-model` and follows these design principles:
157
+
158
+ **Model-based approach**::
159
+ Each entity is represented as a Ruby class with defined attributes and
160
+ serialization mappings.
161
+
162
+ **Flexible serialization**::
163
+ Support for both YAML and JSON formats with automatic type conversion and
164
+ round-trip compatibility.
165
+
166
+ **Extensible structure**::
167
+ Models allow additional properties beyond the core schema, enabling
168
+ customization for specific organizational needs.
169
+
170
+ **Real-world compatibility**::
171
+ Designed to work with existing resolution data formats used by standards
172
+ organizations.
173
+
174
+ == Usage workflow
175
+
176
+ The `edoxen` workflow follows a straightforward approach:
177
+
178
+ === 1. Data modeling
179
+
180
+ . **Create resolutions**: Instantiate `Resolution` objects with required
181
+ attributes
182
+ . **Add components**: Attach actions, considerations, approvals as needed
183
+ . **Build collections**: Group resolutions into collections with metadata
184
+
185
+ === 2. Serialization and persistence
186
+
187
+ . **Export to YAML/JSON**: Use built-in serialization methods
188
+ . **Validate structure**: Leverage the provided YAML schema for validation
189
+ . **Round-trip processing**: Load and save data while preserving structure
190
+
191
+ == YAML format specification
192
+
193
+ Edoxen uses a structured YAML format for resolution data. Here's an example:
194
+
195
+ [source,yaml]
196
+ ----
197
+ metadata:
198
+ title: "Resolutions of the 42nd plenary meeting of ISO/TC 154"
199
+ date: "2024-01-15"
200
+ source: "ISO/TC 154 Secretariat"
201
+ venue: "Virtual meeting"
202
+
203
+ resolutions:
204
+ - identifier: "2024-01"
205
+ title: "Adoption of new standard"
206
+ type: "resolution"
207
+ category: "Technical resolutions"
208
+
209
+ considerations:
210
+ - type: "having"
211
+ message: "reviewed the technical specifications"
212
+
213
+ actions:
214
+ - type: "resolves"
215
+ message: "to adopt ISO 12345 as a new standard"
216
+ date_effective: "2024-01-15"
217
+
218
+ approvals:
219
+ - type: "affirmative"
220
+ degree: "unanimous"
221
+ ----
222
+
223
+ === Schema validation
224
+
225
+ A comprehensive YAML schema is provided at `schema/edoxen.yaml` for validating
226
+ resolution data files. The schema follows JSON Schema Draft 7 conventions and
227
+ includes:
228
+
229
+ * Complete structure definitions for all model types
230
+ * Enumerated values for type validation
231
+ * Date format validation
232
+ * Flexible extensibility with `additionalProperties`
233
+
234
+ The schema can be used with standard JSON Schema validators to ensure data
235
+ integrity and compliance.
236
+
237
+ == Real-world examples
238
+
239
+ The library has been tested with real resolution data from ISO/TC 154 and
240
+ other standards organizations. It successfully handles:
241
+
242
+ * Complex resolution structures with multiple actions and considerations
243
+ * Various resolution types (resolutions, recommendations, decisions)
244
+ * Meeting metadata and organizational information
245
+ * Cross-references and relationships between resolutions
246
+ * Historical data migration and format conversion
247
+
248
+ == Contributing
249
+
250
+ Bug reports and pull requests are welcome on GitHub at
251
+ https://github.com/metanorma/edoxen.
252
+
253
+ == License and Copyright
254
+
255
+ This project is licensed under the BSD 2-clause License.
256
+ See the link:LICENSE[] file for details.
257
+
258
+ Copyright Ribose.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/edoxen.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/edoxen/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "edoxen"
7
+ spec.version = Edoxen::VERSION
8
+ spec.authors = ["Ribose Inc."]
9
+ spec.email = ["open.source@ribose.com"]
10
+
11
+ spec.summary = "Edoxen is a set of information models used for representing resolution and decision information."
12
+ spec.description = <<~HEREDOC
13
+ Edoxen provides a Ruby library for working with resolution models, allowing users to create, manipulate, and serialize resolution data in a structured format. It is built on top of the lutaml-model serialization framework, which provides a flexible and extensible way to define data models and serialize them to YAML or JSON formats.
14
+ HEREDOC
15
+
16
+ spec.homepage = "https://github.com/metanorma/edoxen"
17
+ spec.license = "BSD-2-Clause"
18
+ spec.required_ruby_version = ">= 3.0.0"
19
+
20
+ spec.metadata["homepage_uri"] = spec.homepage
21
+ spec.metadata["source_code_uri"] = "https://github.com/metanorma/edoxen"
22
+ spec.metadata["changelog_uri"] = "https://github.com/metanorma/edoxen"
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(__dir__) do
27
+ `git ls-files -z`.split("\x0").reject do |f|
28
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
29
+ end
30
+ end
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ spec.add_dependency "lutaml-model", "~> 0.7"
36
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Edoxen
6
+ class Action < Lutaml::Model::Serializable
7
+ ACTION_TYPE_ENUM = %w[
8
+ adopts thanks approves decides declares asks invites resolves confirms
9
+ welcomes recommends requests congratulates instructs urges appoints
10
+ resolves further instructs calls-upon encourages affirms elects
11
+ authorizes charges states remarks judges sanctions abrogates empowers
12
+ ].freeze
13
+
14
+ attribute :type, :string, values: ACTION_TYPE_ENUM
15
+ attribute :date_effective, :date
16
+ attribute :message, :string
17
+ attribute :subject, :string
18
+
19
+ key_value do
20
+ map "type", to: :type
21
+ map "date_effective", to: :date_effective
22
+ map "message", to: :message
23
+ map "subject", to: :subject
24
+ end
25
+ end
26
+ end
27
+
28
+ # Action {
29
+ # type: ActionType
30
+ # dateEffective: Date
31
+ # message: Text
32
+ # }
33
+
34
+ # enum ActionType {
35
+ # adopts
36
+ # thanks / expresses-appreciation (subjects)
37
+ # approves
38
+ # decides
39
+ # declares
40
+ # asks (subjects)
41
+ # invites / further invites (subjects)
42
+ # resolves
43
+ # confirms
44
+ # welcomes (subjects)
45
+ # recommends
46
+ # requests (subjects)
47
+ # congratulates (subjects)
48
+ # instructs (subjects)
49
+ # urges (subjects)
50
+ # appoints (subjects)
51
+ # resolves further
52
+ # instructs (subjects)
53
+ # calls upon (subjects)
54
+ # encourages (subjects)
55
+ # affirms / reaffirming (subjects)
56
+ # elects
57
+ # authorizes
58
+ # charges
59
+ # states
60
+ # remarks
61
+ # judges
62
+ # sanctions
63
+ # abrogates
64
+ # empowers
65
+ # }
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Approval {
4
+ # type: ApprovalType
5
+ # degree: ApprovalDegree
6
+ # date: Date
7
+ # message: Text
8
+ # }
9
+
10
+ # enum ApprovalType {
11
+ # affirmative
12
+ # negative
13
+ # }
14
+
15
+ # enum ApprovalDegree {
16
+ # unanimous
17
+ # majority
18
+ # minority
19
+ # }
20
+ require "lutaml/model"
21
+
22
+ module Edoxen
23
+ class Approval < Lutaml::Model::Serializable
24
+ APPROVAL_TYPE_ENUM = %w[affirmative negative].freeze
25
+ APPROVAL_DEGREE_ENUM = %w[unanimous majority minority].freeze
26
+
27
+ attribute :type, :string, values: APPROVAL_TYPE_ENUM
28
+ attribute :degree, :string, values: APPROVAL_DEGREE_ENUM
29
+ attribute :date, :date
30
+ attribute :message, :string
31
+
32
+ key_value do
33
+ map "type", to: :type
34
+ map "degree", to: :degree
35
+ map "date", to: :date
36
+ map "message", to: :message
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Consideration {
4
+ # type: ConsiderationType
5
+ # dateEffective: Date
6
+ # message: Text
7
+ # }
8
+
9
+ # enum ConsiderationType {
10
+ # having / having regard
11
+ # noting
12
+ # recognizing
13
+ # acknowledging
14
+ # recalling / further recalling
15
+ # reaffirming
16
+ # considering
17
+ # taking into account
18
+ # pursuant to
19
+ # bearing in mind
20
+ # emphasizing
21
+ # concerned
22
+ # accepts
23
+ # observing
24
+ # referring
25
+ # acting
26
+ # empowers
27
+ # reaffirming
28
+ # }
29
+
30
+ require "lutaml/model"
31
+
32
+ module Edoxen
33
+ class Consideration < Lutaml::Model::Serializable
34
+ CONSIDERATION_TYPE_ENUM = %w[having noting recognizing acknowledging recalling reaffirming considering
35
+ taking-into-account pursuant-to bearing-in-mind emphasizing concerned accepts observing
36
+ referring acting empowers reaffirming].freeze
37
+
38
+ attribute :type, :string, values: CONSIDERATION_TYPE_ENUM
39
+ attribute :date, :date
40
+ attribute :message, :string
41
+
42
+ key_value do
43
+ map "type", to: :type
44
+ map "date", to: :date
45
+ map "message", to: :message
46
+ end
47
+ end
48
+ end
File without changes
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # MeetingIdentifier {
4
+ # venue: String
5
+ # date: DateTime
6
+ # }
7
+ require "lutaml/model"
8
+
9
+ module Edoxen
10
+ class MeetingIdentifier < Lutaml::Model::Serializable
11
+ attribute :venue, :string
12
+ attribute :date, :date
13
+
14
+ key_value do
15
+ map "venue", to: :venue
16
+ map "date", to: :date
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Edoxen
6
+ class Resolution < Lutaml::Model::Serializable
7
+ RESOLUTION_TYPE_ENUM = %w[resolution recommendation decision declaration].freeze
8
+
9
+ attribute :category, :string
10
+ attribute :dates, :date, collection: true
11
+ attribute :subject, :string
12
+ attribute :title, :string
13
+ attribute :type, :string, values: RESOLUTION_TYPE_ENUM
14
+ attribute :identifier, :string
15
+ attribute :considerations, Consideration, collection: true
16
+ attribute :approvals, Approval, collection: true
17
+ attribute :actions, Action, collection: true
18
+
19
+ key_value do
20
+ map "category", to: :category
21
+ map "dates", to: :dates
22
+ map "subject", to: :subject
23
+ map "title", to: :title
24
+ map "type", to: :type
25
+ map "identifier", to: :identifier
26
+ map "considerations", to: :considerations
27
+ map "approvals", to: :approvals
28
+ map "actions", to: :actions
29
+ end
30
+
31
+ # Example of a Resolution
32
+ # category: Resolutions related to JWG 1
33
+ # dates:
34
+ # - 2019-10-17
35
+ # subject: ISO/TC 154
36
+ # title: "Adoption of NWIP ballot for ISO/PWI 9735-11 "Electronic data..."
37
+ # identifier: 2019-01
38
+ # considerations:
39
+ # - type: considering
40
+ # date_effective: 2019-10-17
41
+ # message: considering the voting result ...
42
+
43
+ # - type: considering
44
+ # date_effective: 2019-10-17
45
+ # message: considering the importance of ...
46
+
47
+ # - type: considering
48
+ # date_effective: 2019-10-17
49
+ # message: considering the request from JWG1...
50
+
51
+ # approvals:
52
+ # - type: affirmative
53
+ # degree: unanimous
54
+ # message: The resolution was taken by unanimity.
55
+
56
+ # actions:
57
+ # - type: resolves
58
+ # date_effective: 2019-10-17
59
+ # message: resolves to submit ISO 9735-11...
60
+ end
61
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Edoxen
6
+ class ResolutionCollection < Lutaml::Model::Serializable
7
+ attribute :metadata, :hash
8
+ attribute :resolutions, Resolution, collection: true
9
+
10
+ key_value do
11
+ map "metadata", to: :metadata
12
+ map "resolutions", to: :resolutions
13
+ end
14
+
15
+ # Example of a ResolutionCollection
16
+ # metadata:
17
+ # title: Resolutions of the 38th plenary meeting of ISO/TC 154
18
+ # date: 2019-10-17
19
+ # source: ISO/TC 154 Secretariat
20
+ # resolutions:
21
+ # - category: Resolutions related to JWG 1
22
+ # dates: 2019/10/17
23
+ # ...
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # class ResolutionRelation {
4
+ # source: StructuredIdentifier (Resolution)
5
+ # destination: StructuredIdentifier (Resolution)
6
+ # type: ResolutionRelationType
7
+ # }
8
+
9
+ # enum ResolutionRelationType {
10
+ # annexOf {
11
+ # This resolution is an annex to the target resolution.
12
+ # }
13
+
14
+ # hasAnnex {
15
+ # The target resolution is an annex of the source resolution.
16
+ # }
17
+
18
+ # updates {
19
+ # This resolution updates the target resolution.
20
+ # }
21
+
22
+ # refines {
23
+ # This resolution refines the target resolution.
24
+ # }
25
+
26
+ # replaces/obsoletes {
27
+ # This resolution replaces/obsoletes the target resolution.
28
+ # }
29
+
30
+ # considers {
31
+ # This resolution is made in consideration of the target resolution.
32
+ # }
33
+ # }
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # class ResolutionRelation {
4
+ # source: StructuredIdentifier (Resolution)
5
+ # destination: StructuredIdentifier (Resolution)
6
+ # type: ResolutionRelationType
7
+ # }
8
+
9
+ # enum ResolutionRelationType {
10
+ # annexOf {
11
+ # This resolution is an annex to the target resolution.
12
+ # }
13
+
14
+ # hasAnnex {
15
+ # The target resolution is an annex of the source resolution.
16
+ # }
17
+
18
+ # updates {
19
+ # This resolution updates the target resolution.
20
+ # }
21
+
22
+ # refines {
23
+ # This resolution refines the target resolution.
24
+ # }
25
+
26
+ # replaces/obsoletes {
27
+ # This resolution replaces/obsoletes the target resolution.
28
+ # }
29
+
30
+ # considers {
31
+ # This resolution is made in consideration of the target resolution.
32
+ # }
33
+ # }
34
+
35
+ require "lutaml/model"
36
+
37
+ module Edoxen
38
+ class ResolutionRelationship < Lutaml::Model::Serializable
39
+ RESOLUTION_RELATIONSHIP_ENUM = %w[annexOf hasAnnex updates refines replaces obsoletes considers].freeze
40
+
41
+ attribute :source, :string
42
+ attribute :destination, :string
43
+ attribute :type, :string, values: RESOLUTION_RELATIONSHIP_ENUM
44
+
45
+ key_value do
46
+ map "source", to: :source
47
+ map "destination", to: :destination
48
+ map "type", to: :type
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # StructuredIdentifier {
4
+ # number:
5
+ # prefix:
6
+ # }
7
+
8
+ require "lutaml/model"
9
+
10
+ module Edoxen
11
+ class StructuredIdentifier < Lutaml::Model::Serializable
12
+ attribute :number, :string
13
+ attribute :prefix, :string
14
+
15
+ key_value do
16
+ map "number", to: :number
17
+ map "prefix", to: :prefix
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # SubjectBody {
4
+ # name
5
+ # address
6
+ # etc.
7
+ # }
8
+ require "lutaml/model"
9
+
10
+ module Edoxen
11
+ class SubjectBody < Lutaml::Model::Serializable
12
+ attribute :name, :string
13
+ attribute :address, :string
14
+
15
+ key_value do
16
+ map "name", to: :name
17
+ map "address", to: :address
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Edoxen
4
+ VERSION = "0.1.1"
5
+ end
data/lib/edoxen.rb ADDED
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+ require_relative "edoxen/version"
5
+
6
+ # Configure lutaml-model for YAML serialization
7
+ Lutaml::Model::Config.configure do |config|
8
+ config.yaml_adapter_type = :standard_yaml
9
+ config.json_adapter_type = :standard_json
10
+ end
11
+
12
+ module Edoxen
13
+ class Error < StandardError; end
14
+
15
+ # Load all model classes
16
+ require_relative "edoxen/action"
17
+ require_relative "edoxen/approval"
18
+ require_relative "edoxen/consideration"
19
+ require_relative "edoxen/meeting"
20
+ require_relative "edoxen/resolution"
21
+ require_relative "edoxen/resolution_collection"
22
+ require_relative "edoxen/resolution_date"
23
+ require_relative "edoxen/resolution_relationship"
24
+ require_relative "edoxen/structured_identifier"
25
+ require_relative "edoxen/subject_body"
26
+ require_relative "edoxen/meeting_identfier"
27
+ end
@@ -0,0 +1,286 @@
1
+ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema
2
+ ---
3
+ $schema: "http://json-schema.org/draft-07/schema#"
4
+ $id: "https://github.com/metanorma/edoxen/schema/edoxen.yaml"
5
+ title: "Edoxen Resolution Collection Schema"
6
+ description: "Schema for validating Edoxen resolution collection YAML files"
7
+ type: object
8
+
9
+ properties:
10
+ metadata:
11
+ type: object
12
+ description: "Metadata about the resolution collection"
13
+ properties:
14
+ title:
15
+ type: string
16
+ description: "Title of the resolution collection"
17
+ date:
18
+ type: string
19
+ format: date
20
+ description: "Date of the meeting or collection (YYYY-MM-DD)"
21
+ source:
22
+ type: string
23
+ description: "Source organization or secretariat"
24
+ venue:
25
+ type: string
26
+ description: "Meeting venue"
27
+ chair:
28
+ type: string
29
+ description: "Meeting chair"
30
+ additionalProperties: false
31
+
32
+ resolutions:
33
+ type: array
34
+ description: "Array of resolutions"
35
+ items:
36
+ $ref: "#/$defs/Resolution"
37
+
38
+ required:
39
+ - resolutions
40
+
41
+ $defs:
42
+ Resolution:
43
+ type: object
44
+ description: "A single resolution"
45
+ properties:
46
+ identifier:
47
+ oneOf:
48
+ - type: string
49
+ - type: integer
50
+ description: "Resolution identifier (e.g., '2019-01' or 1)"
51
+
52
+ title:
53
+ type: string
54
+ description: "Resolution title"
55
+
56
+ type:
57
+ type: string
58
+ enum:
59
+ - "resolution"
60
+ - "recommendation"
61
+ - "decision"
62
+ - "declaration"
63
+ description: "Type of resolution"
64
+
65
+ category:
66
+ type: string
67
+ description: "Resolution category"
68
+
69
+ subject:
70
+ type: string
71
+ description: "Subject or scope of the resolution"
72
+
73
+ dates:
74
+ type: array
75
+ items:
76
+ type: string
77
+ format: date
78
+ description: "Array of relevant dates"
79
+
80
+ considerations:
81
+ type: array
82
+ items:
83
+ $ref: "#/$defs/Consideration"
84
+ description: "Considerations leading to the resolution"
85
+
86
+ approvals:
87
+ type: array
88
+ items:
89
+ $ref: "#/$defs/Approval"
90
+ description: "Approval information"
91
+
92
+ actions:
93
+ type: array
94
+ items:
95
+ $ref: "#/$defs/Action"
96
+ description: "Actions taken in the resolution"
97
+
98
+ meeting:
99
+ $ref: "#/$defs/MeetingIdentifier"
100
+ description: "Meeting information"
101
+
102
+ relationships:
103
+ type: array
104
+ items:
105
+ $ref: "#/$defs/ResolutionRelationship"
106
+ description: "Relationships to other resolutions"
107
+
108
+ required:
109
+ - title
110
+ additionalProperties: false
111
+
112
+ Consideration:
113
+ type: object
114
+ description: "A consideration leading to a resolution"
115
+ properties:
116
+ type:
117
+ type: string
118
+ enum:
119
+ - "having"
120
+ - "noting"
121
+ - "recognizing"
122
+ - "acknowledging"
123
+ - "considering"
124
+ - "recalling"
125
+ - "welcoming"
126
+ - "appreciating"
127
+ description: "Type of consideration"
128
+
129
+ date_effective:
130
+ type: string
131
+ format: date
132
+ description: "Effective date of the consideration"
133
+
134
+ message:
135
+ type: string
136
+ description: "Consideration text"
137
+
138
+ subject:
139
+ type: string
140
+ description: "Subject of the consideration"
141
+
142
+ additionalProperties: false
143
+
144
+ Approval:
145
+ type: object
146
+ description: "Approval information for a resolution"
147
+ properties:
148
+ type:
149
+ type: string
150
+ enum:
151
+ - "affirmative"
152
+ - "negative"
153
+ description: "Type of approval"
154
+
155
+ degree:
156
+ type: string
157
+ enum:
158
+ - "unanimous"
159
+ - "majority"
160
+ - "minority"
161
+ description: "Degree of approval"
162
+
163
+ message:
164
+ type: string
165
+ description: "Approval details"
166
+
167
+ additionalProperties: false
168
+
169
+ Action:
170
+ type: object
171
+ description: "An action taken in a resolution"
172
+ properties:
173
+ type:
174
+ type: string
175
+ enum:
176
+ - "adopts"
177
+ - "thanks"
178
+ - "approves"
179
+ - "decides"
180
+ - "declares"
181
+ - "resolves"
182
+ - "requests"
183
+ - "recommends"
184
+ - "encourages"
185
+ - "welcomes"
186
+ - "notes"
187
+ - "confirms"
188
+ - "reaffirms"
189
+ - "withdraws"
190
+ - "abrogates"
191
+ - "establishes"
192
+ - "appoints"
193
+ - "nominates"
194
+ - "extends"
195
+ - "initiates"
196
+ description: "Type of action"
197
+
198
+ date_effective:
199
+ type: string
200
+ format: date
201
+ description: "Effective date of the action"
202
+
203
+ message:
204
+ type: string
205
+ description: "Action text"
206
+
207
+ subject:
208
+ type: string
209
+ description: "Subject of the action"
210
+
211
+ additionalProperties: false
212
+
213
+ MeetingIdentifier:
214
+ type: object
215
+ description: "Meeting identification information"
216
+ properties:
217
+ venue:
218
+ type: string
219
+ description: "Meeting venue"
220
+
221
+ date:
222
+ type: string
223
+ format: date
224
+ description: "Meeting date"
225
+
226
+ identifier:
227
+ type: string
228
+ description: "Meeting identifier"
229
+
230
+ additionalProperties: false
231
+
232
+ ResolutionRelationship:
233
+ type: object
234
+ description: "Relationship between resolutions"
235
+ properties:
236
+ type:
237
+ type: string
238
+ enum:
239
+ - "supersedes"
240
+ - "amends"
241
+ - "references"
242
+ - "replaces"
243
+ - "updates"
244
+ description: "Type of relationship"
245
+
246
+ target:
247
+ type: string
248
+ description: "Target resolution identifier"
249
+
250
+ description:
251
+ type: string
252
+ description: "Description of the relationship"
253
+
254
+ additionalProperties: false
255
+
256
+ StructuredIdentifier:
257
+ type: object
258
+ description: "Structured identifier with prefix and number"
259
+ properties:
260
+ prefix:
261
+ type: string
262
+ description: "Identifier prefix"
263
+
264
+ number:
265
+ oneOf:
266
+ - type: string
267
+ - type: integer
268
+ description: "Identifier number"
269
+
270
+ additionalProperties: false
271
+
272
+ SubjectBody:
273
+ type: object
274
+ description: "Subject body information"
275
+ properties:
276
+ name:
277
+ type: string
278
+ description: "Name of the subject body"
279
+
280
+ address:
281
+ type: string
282
+ description: "Address of the subject body"
283
+
284
+ additionalProperties: false
285
+
286
+ additionalProperties: false
data/sig/edoxen.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Edoxen
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: edoxen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Ribose Inc.
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-07-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lutaml-model
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.7'
27
+ description: 'Edoxen provides a Ruby library for working with resolution models, allowing
28
+ users to create, manipulate, and serialize resolution data in a structured format.
29
+ It is built on top of the lutaml-model serialization framework, which provides a
30
+ flexible and extensible way to define data models and serialize them to YAML or
31
+ JSON formats.
32
+
33
+ '
34
+ email:
35
+ - open.source@ribose.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - ".rspec"
41
+ - ".rubocop.yml"
42
+ - ".rubocop_todo.yml"
43
+ - CODE_OF_CONDUCT.md
44
+ - Gemfile
45
+ - README.adoc
46
+ - Rakefile
47
+ - edoxen.gemspec
48
+ - lib/edoxen.rb
49
+ - lib/edoxen/action.rb
50
+ - lib/edoxen/approval.rb
51
+ - lib/edoxen/consideration.rb
52
+ - lib/edoxen/meeting.rb
53
+ - lib/edoxen/meeting_identfier.rb
54
+ - lib/edoxen/resolution.rb
55
+ - lib/edoxen/resolution_collection.rb
56
+ - lib/edoxen/resolution_date.rb
57
+ - lib/edoxen/resolution_relationship.rb
58
+ - lib/edoxen/structured_identifier.rb
59
+ - lib/edoxen/subject_body.rb
60
+ - lib/edoxen/version.rb
61
+ - schema/edoxen.yaml
62
+ - sig/edoxen.rbs
63
+ homepage: https://github.com/metanorma/edoxen
64
+ licenses:
65
+ - BSD-2-Clause
66
+ metadata:
67
+ homepage_uri: https://github.com/metanorma/edoxen
68
+ source_code_uri: https://github.com/metanorma/edoxen
69
+ changelog_uri: https://github.com/metanorma/edoxen
70
+ post_install_message:
71
+ rdoc_options: []
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 3.0.0
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ requirements: []
85
+ rubygems_version: 3.5.22
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Edoxen is a set of information models used for representing resolution and
89
+ decision information.
90
+ test_files: []