reqif 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/rake.yml +18 -0
  3. data/.github/workflows/release.yml +25 -0
  4. data/.gitignore +11 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +8 -0
  7. data/Gemfile +13 -0
  8. data/README.adoc +73 -0
  9. data/Rakefile +12 -0
  10. data/bin/console +11 -0
  11. data/bin/setup +8 -0
  12. data/lib/reqif/alternative_id.rb +14 -0
  13. data/lib/reqif/attribute_definition_boolean.rb +28 -0
  14. data/lib/reqif/attribute_definition_date.rb +28 -0
  15. data/lib/reqif/attribute_definition_enumeration.rb +30 -0
  16. data/lib/reqif/attribute_definition_integer.rb +28 -0
  17. data/lib/reqif/attribute_definition_real.rb +28 -0
  18. data/lib/reqif/attribute_definition_string.rb +28 -0
  19. data/lib/reqif/attribute_definition_xhtml.rb +28 -0
  20. data/lib/reqif/attribute_value_boolean.rb +16 -0
  21. data/lib/reqif/attribute_value_date.rb +16 -0
  22. data/lib/reqif/attribute_value_enumeration.rb +16 -0
  23. data/lib/reqif/attribute_value_integer.rb +16 -0
  24. data/lib/reqif/attribute_value_real.rb +16 -0
  25. data/lib/reqif/attribute_value_string.rb +16 -0
  26. data/lib/reqif/attribute_value_xhtml.rb +20 -0
  27. data/lib/reqif/children.rb +14 -0
  28. data/lib/reqif/core_content.rb +14 -0
  29. data/lib/reqif/datatype_definition_boolean.rb +22 -0
  30. data/lib/reqif/datatype_definition_date.rb +22 -0
  31. data/lib/reqif/datatype_definition_enumeration.rb +24 -0
  32. data/lib/reqif/datatype_definition_integer.rb +26 -0
  33. data/lib/reqif/datatype_definition_real.rb +28 -0
  34. data/lib/reqif/datatype_definition_string.rb +24 -0
  35. data/lib/reqif/datatype_definition_xhtml.rb +22 -0
  36. data/lib/reqif/datatypes.rb +26 -0
  37. data/lib/reqif/default_value.rb +27 -0
  38. data/lib/reqif/definition.rb +27 -0
  39. data/lib/reqif/editable_atts.rb +26 -0
  40. data/lib/reqif/embedded_value.rb +16 -0
  41. data/lib/reqif/enum_value.rb +24 -0
  42. data/lib/reqif/object.rb +14 -0
  43. data/lib/reqif/properties.rb +14 -0
  44. data/lib/reqif/relation_group.rb +30 -0
  45. data/lib/reqif/relation_group_type.rb +24 -0
  46. data/lib/reqif/req_if.rb +18 -0
  47. data/lib/reqif/req_if_content.rb +24 -0
  48. data/lib/reqif/req_if_header.rb +28 -0
  49. data/lib/reqif/req_if_tool_extension.rb +10 -0
  50. data/lib/reqif/source.rb +14 -0
  51. data/lib/reqif/source_specification.rb +14 -0
  52. data/lib/reqif/spec_attributes.rb +26 -0
  53. data/lib/reqif/spec_hierarchy.rb +32 -0
  54. data/lib/reqif/spec_object.rb +26 -0
  55. data/lib/reqif/spec_object_type.rb +24 -0
  56. data/lib/reqif/spec_objects.rb +14 -0
  57. data/lib/reqif/spec_relation.rb +30 -0
  58. data/lib/reqif/spec_relation_groups.rb +14 -0
  59. data/lib/reqif/spec_relation_type.rb +24 -0
  60. data/lib/reqif/spec_relations.rb +17 -0
  61. data/lib/reqif/spec_types.rb +20 -0
  62. data/lib/reqif/specification.rb +28 -0
  63. data/lib/reqif/specification_type.rb +24 -0
  64. data/lib/reqif/specifications.rb +14 -0
  65. data/lib/reqif/specified_values.rb +14 -0
  66. data/lib/reqif/target.rb +14 -0
  67. data/lib/reqif/target_specification.rb +14 -0
  68. data/lib/reqif/the_header.rb +14 -0
  69. data/lib/reqif/tool_extensions.rb +14 -0
  70. data/lib/reqif/type.rb +35 -0
  71. data/lib/reqif/values.rb +30 -0
  72. data/lib/reqif/version.rb +5 -0
  73. data/lib/reqif/xhtml_content.rb +10 -0
  74. data/lib/reqif.rb +22 -0
  75. data/references/driver.xsd +270 -0
  76. data/references/reqif.xsd +893 -0
  77. data/reqif.gemspec +36 -0
  78. data/sig/reqif.rbs +4 -0
  79. metadata +151 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f0f9bdc52dbdc885bb1b46156c06618ba14184f46fe33769c82e75382a40fcdc
4
+ data.tar.gz: f91af84530330b4ad4b412648db399903ea96a340ec510afe36c8644c60fb5f6
5
+ SHA512:
6
+ metadata.gz: 6939509f792d37e0822fbf9e3a363354cf3826ea1e89007622b864fa4e21ad3723e6d7792a05c0096be61069845ac7b4f9b66704759e5f582e40994416d7b69e
7
+ data.tar.gz: 4428ff962c5049f6542424a1c6aaeec7d30ccbe4525596cf087d2bfd034a3d27d83c43d28f03c442b23b6daaa35191e69e39f0c15f2e66d7b31aa4dd53a4e8a6
@@ -0,0 +1,18 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ rake:
16
+ uses: metanorma/ci/.github/workflows/generic-rake.yml@main
17
+ secrets:
18
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -0,0 +1,25 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
11
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
12
+ required: true
13
+ default: 'skip'
14
+ repository_dispatch:
15
+ types: [ do-release ]
16
+
17
+ jobs:
18
+ release:
19
+ uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
20
+ with:
21
+ next_version: ${{ github.event.inputs.next_version }}
22
+ secrets:
23
+ rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
24
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
25
+
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
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 reqif.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+ gem "rspec", "~> 3.0"
10
+ gem "rubocop", "~> 1.21"
11
+ gem "nokogiri"
12
+ gem "rubocop-performance"
13
+ gem "xml-c14n"
data/README.adoc ADDED
@@ -0,0 +1,73 @@
1
+ = ReqIF Ruby library
2
+
3
+ The `reqif` library is a parser and generator for ReqIF XML documents.
4
+
5
+ It is intended to be used to parse and generate ReqIF XML v1.2 documents.
6
+
7
+ == Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ [source,ruby]
12
+ ----
13
+ gem 'reqif'
14
+ ----
15
+
16
+ And then execute:
17
+
18
+ [source]
19
+ ----
20
+ $ bundle install
21
+ ----
22
+
23
+ Or install it yourself as:
24
+
25
+ [source]
26
+ ----
27
+ $ gem install reqif
28
+ ----
29
+
30
+
31
+ == Usage
32
+
33
+ To parse a ReqIF XML document:
34
+
35
+ [source,ruby]
36
+ ----
37
+ require 'reqif'
38
+
39
+ reqif = Reqif::ReqIf.new(File.read('reqif.xml'))
40
+ puts reqif.title
41
+ puts reqif.abstract
42
+ puts reqif.sections
43
+ ----
44
+
45
+ To generate a ReqIF XML document:
46
+
47
+ [source,ruby]
48
+ ----
49
+ require 'reqif'
50
+
51
+ reqif = Reqif::ReqIf.new
52
+ reqif.title = 'An Article Title'
53
+ reqif.abstract = 'An Article Abstract'
54
+ reqif.sections = [
55
+ Reqif::Section.new('Section 1', 'This is the first section'),
56
+ Reqif::Section.new('Section 2', 'This is the second section')
57
+ ]
58
+
59
+ puts reqif.to_xml
60
+ ----
61
+
62
+
63
+ == Contributing
64
+
65
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lutaml/reqif.
66
+
67
+
68
+ == Copyright and license
69
+
70
+ The gem is available as open source under the terms of the BSD 2-clause license.
71
+
72
+ All rights reserved. Ribose
73
+
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/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "reqif"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ require "irb"
11
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,14 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AlternativeId < Lutaml::Model::Serializable
5
+ attribute :identifier, :string
6
+
7
+ xml do
8
+ root "ALTERNATIVE-ID"
9
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
10
+
11
+ map_attribute "IDENTIFIER", to: :identifier
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionBoolean < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-BOOLEAN"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionDate < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-DATE"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionEnumeration < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :multi_valued, :boolean
11
+ attribute :default_value, DefaultValue
12
+ attribute :alternative_id, AlternativeId
13
+ attribute :type, Type
14
+
15
+ xml do
16
+ root "ATTRIBUTE-DEFINITION-ENUMERATION"
17
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
18
+
19
+ map_attribute "DESC", to: :desc
20
+ map_attribute "IDENTIFIER", to: :identifier
21
+ map_attribute "IS-EDITABLE", to: :is_editable
22
+ map_attribute "LAST-CHANGE", to: :last_change
23
+ map_attribute "LONG-NAME", to: :long_name
24
+ map_attribute "MULTI-VALUED", to: :multi_valued
25
+ map_element "DEFAULT-VALUE", to: :default_value
26
+ map_element "ALTERNATIVE-ID", to: :alternative_id
27
+ map_element "TYPE", to: :type
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionInteger < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-INTEGER"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionReal < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-REAL"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionString < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-STRING"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeDefinitionXhtml < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :is_editable, :boolean
8
+ attribute :last_change, :time
9
+ attribute :long_name, :string
10
+ attribute :alternative_id, AlternativeId
11
+ attribute :default_value, DefaultValue
12
+ attribute :type, Type
13
+
14
+ xml do
15
+ root "ATTRIBUTE-DEFINITION-XHTML"
16
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+
18
+ map_attribute "DESC", to: :desc
19
+ map_attribute "IDENTIFIER", to: :identifier
20
+ map_attribute "IS-EDITABLE", to: :is_editable
21
+ map_attribute "LAST-CHANGE", to: :last_change
22
+ map_attribute "LONG-NAME", to: :long_name
23
+ map_element "ALTERNATIVE-ID", to: :alternative_id
24
+ map_element "DEFAULT-VALUE", to: :default_value
25
+ map_element "TYPE", to: :type
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueBoolean < Lutaml::Model::Serializable
5
+ attribute :the_value, :boolean
6
+ attribute :definition, Definition
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-BOOLEAN"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_attribute "THE-VALUE", to: :the_value
13
+ map_element "DEFINITION", to: :definition
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueDate < Lutaml::Model::Serializable
5
+ attribute :the_value, :time
6
+ attribute :definition, Definition
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-DATE"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_attribute "THE-VALUE", to: :the_value
13
+ map_element "DEFINITION", to: :definition
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueEnumeration < Lutaml::Model::Serializable
5
+ attribute :definition, Definition
6
+ attribute :values, Values
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-ENUMERATION"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_element "DEFINITION", to: :definition
13
+ map_element "VALUES", to: :values
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueInteger < Lutaml::Model::Serializable
5
+ attribute :the_value, :integer
6
+ attribute :definition, Definition
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-INTEGER"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_attribute "THE-VALUE", to: :the_value
13
+ map_element "DEFINITION", to: :definition
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueReal < Lutaml::Model::Serializable
5
+ attribute :the_value, :float
6
+ attribute :definition, Definition
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-REAL"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_attribute "THE-VALUE", to: :the_value
13
+ map_element "DEFINITION", to: :definition
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueString < Lutaml::Model::Serializable
5
+ attribute :the_value, :string
6
+ attribute :definition, Definition
7
+
8
+ xml do
9
+ root "ATTRIBUTE-VALUE-STRING"
10
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
11
+
12
+ map_attribute "THE-VALUE", to: :the_value
13
+ map_element "DEFINITION", to: :definition
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class AttributeValueXhtml < Lutaml::Model::Serializable
5
+ attribute :is_simplified, :boolean
6
+ attribute :the_value, XhtmlContent
7
+ attribute :the_original_value, XhtmlContent
8
+ attribute :definition, Definition
9
+
10
+ xml do
11
+ root "ATTRIBUTE-VALUE-XHTML"
12
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
13
+
14
+ map_attribute "IS-SIMPLIFIED", to: :is_simplified
15
+ map_element "THE-VALUE", to: :the_value
16
+ map_element "THE-ORIGINAL-VALUE", to: :the_original_value
17
+ map_element "DEFINITION", to: :definition
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class Children < Lutaml::Model::Serializable
5
+ attribute :spec_hierarchy, SpecHierarchy, collection: true
6
+
7
+ xml do
8
+ root "CHILDREN"
9
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
10
+
11
+ map_element "SPEC-HIERARCHY", to: :spec_hierarchy
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class CoreContent < Lutaml::Model::Serializable
5
+ attribute :req_if_content, ReqIfContent
6
+
7
+ xml do
8
+ root "CORE-CONTENT"
9
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
10
+
11
+ map_element "REQ-IF-CONTENT", to: :req_if_content
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,22 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class DatatypeDefinitionBoolean < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :last_change, :time
8
+ attribute :long_name, :string
9
+ attribute :alternative_id, AlternativeId
10
+
11
+ xml do
12
+ root "DATATYPE-DEFINITION-BOOLEAN"
13
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
14
+
15
+ map_attribute "DESC", to: :desc
16
+ map_attribute "IDENTIFIER", to: :identifier
17
+ map_attribute "LAST-CHANGE", to: :last_change
18
+ map_attribute "LONG-NAME", to: :long_name
19
+ map_element "ALTERNATIVE-ID", to: :alternative_id
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class DatatypeDefinitionDate < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :last_change, :time
8
+ attribute :long_name, :string
9
+ attribute :alternative_id, AlternativeId
10
+
11
+ xml do
12
+ root "DATATYPE-DEFINITION-DATE"
13
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
14
+
15
+ map_attribute "DESC", to: :desc
16
+ map_attribute "IDENTIFIER", to: :identifier
17
+ map_attribute "LAST-CHANGE", to: :last_change
18
+ map_attribute "LONG-NAME", to: :long_name
19
+ map_element "ALTERNATIVE-ID", to: :alternative_id
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,24 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ class DatatypeDefinitionEnumeration < Lutaml::Model::Serializable
5
+ attribute :desc, :string
6
+ attribute :identifier, :string
7
+ attribute :last_change, :time
8
+ attribute :long_name, :string
9
+ attribute :alternative_id, AlternativeId
10
+ attribute :specified_values, SpecifiedValues
11
+
12
+ xml do
13
+ root "DATATYPE-DEFINITION-ENUMERATION"
14
+ namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
15
+
16
+ map_attribute "DESC", to: :desc
17
+ map_attribute "IDENTIFIER", to: :identifier
18
+ map_attribute "LAST-CHANGE", to: :last_change
19
+ map_attribute "LONG-NAME", to: :long_name
20
+ map_element "ALTERNATIVE-ID", to: :alternative_id
21
+ map_element "SPECIFIED-VALUES", to: :specified_values
22
+ end
23
+ end
24
+ end