sts 0.3.2 → 0.3.4

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +472 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +42 -0
  5. data/Gemfile +6 -12
  6. data/lib/sts/niso_sts/adoption.rb +4 -4
  7. data/lib/sts/niso_sts/app.rb +8 -8
  8. data/lib/sts/niso_sts/app_group.rb +2 -2
  9. data/lib/sts/niso_sts/back.rb +2 -2
  10. data/lib/sts/niso_sts/body.rb +2 -2
  11. data/lib/sts/niso_sts/caption.rb +3 -3
  12. data/lib/sts/niso_sts/custom_meta.rb +5 -5
  13. data/lib/sts/niso_sts/custom_meta_group.rb +2 -2
  14. data/lib/sts/niso_sts/def.rb +2 -2
  15. data/lib/sts/niso_sts/def_item.rb +3 -3
  16. data/lib/sts/niso_sts/def_list.rb +5 -5
  17. data/lib/sts/niso_sts/display_formula.rb +3 -5
  18. data/lib/sts/niso_sts/document_identification.rb +8 -8
  19. data/lib/sts/niso_sts/ext_link.rb +5 -5
  20. data/lib/sts/niso_sts/figure.rb +6 -6
  21. data/lib/sts/niso_sts/fn.rb +3 -3
  22. data/lib/sts/niso_sts/fn_group.rb +2 -2
  23. data/lib/sts/niso_sts/front.rb +2 -2
  24. data/lib/sts/niso_sts/graphic.rb +3 -3
  25. data/lib/sts/niso_sts/inline_formula.rb +2 -4
  26. data/lib/sts/niso_sts/label.rb +3 -3
  27. data/lib/sts/niso_sts/list.rb +4 -6
  28. data/lib/sts/niso_sts/list_item.rb +4 -4
  29. data/lib/sts/niso_sts/meta_date.rb +4 -4
  30. data/lib/sts/niso_sts/meta_note.rb +7 -6
  31. data/lib/sts/niso_sts/metadata_iso.rb +12 -11
  32. data/lib/sts/niso_sts/metadata_std.rb +16 -14
  33. data/lib/sts/niso_sts/mixed_citation.rb +8 -8
  34. data/lib/sts/niso_sts/non_normative_example.rb +5 -5
  35. data/lib/sts/niso_sts/non_normative_note.rb +5 -5
  36. data/lib/sts/niso_sts/object_id.rb +4 -4
  37. data/lib/sts/niso_sts/page_count.rb +3 -3
  38. data/lib/sts/niso_sts/paragraph.rb +12 -12
  39. data/lib/sts/niso_sts/permissions.rb +5 -5
  40. data/lib/sts/niso_sts/reference.rb +3 -5
  41. data/lib/sts/niso_sts/reference_list.rb +5 -7
  42. data/lib/sts/niso_sts/reference_standard.rb +7 -7
  43. data/lib/sts/niso_sts/section.rb +8 -8
  44. data/lib/sts/niso_sts/section_array.rb +3 -3
  45. data/lib/sts/niso_sts/standard.rb +6 -8
  46. data/lib/sts/niso_sts/standard_identification.rb +13 -11
  47. data/lib/sts/niso_sts/standard_ref.rb +4 -4
  48. data/lib/sts/niso_sts/std_cross_reference.rb +3 -3
  49. data/lib/sts/niso_sts/std_id.rb +6 -6
  50. data/lib/sts/niso_sts/std_id_group.rb +2 -2
  51. data/lib/sts/niso_sts/term_display.rb +2 -2
  52. data/lib/sts/niso_sts/term_section.rb +5 -5
  53. data/lib/sts/niso_sts/title.rb +4 -4
  54. data/lib/sts/niso_sts/title_wrap.rb +11 -9
  55. data/lib/sts/tbx_iso_tml/bold.rb +3 -3
  56. data/lib/sts/tbx_iso_tml/caption.rb +3 -3
  57. data/lib/sts/tbx_iso_tml/col.rb +7 -7
  58. data/lib/sts/tbx_iso_tml/definition.rb +5 -7
  59. data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -6
  60. data/lib/sts/tbx_iso_tml/example.rb +6 -8
  61. data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -3
  62. data/lib/sts/tbx_iso_tml/external_source.rb +4 -4
  63. data/lib/sts/tbx_iso_tml/fn.rb +3 -5
  64. data/lib/sts/tbx_iso_tml/fn_group.rb +2 -2
  65. data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -3
  66. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +4 -4
  67. data/lib/sts/tbx_iso_tml/grammatical_number.rb +4 -4
  68. data/lib/sts/tbx_iso_tml/italic.rb +5 -5
  69. data/lib/sts/tbx_iso_tml/lang_set.rb +9 -9
  70. data/lib/sts/tbx_iso_tml/math.rb +12 -12
  71. data/lib/sts/tbx_iso_tml/mfenced.rb +12 -11
  72. data/lib/sts/tbx_iso_tml/mfrac.rb +8 -8
  73. data/lib/sts/tbx_iso_tml/mi.rb +3 -3
  74. data/lib/sts/tbx_iso_tml/mrow.rb +11 -11
  75. data/lib/sts/tbx_iso_tml/mspace.rb +3 -3
  76. data/lib/sts/tbx_iso_tml/mstyle.rb +8 -8
  77. data/lib/sts/tbx_iso_tml/msub.rb +7 -7
  78. data/lib/sts/tbx_iso_tml/msup.rb +5 -5
  79. data/lib/sts/tbx_iso_tml/munder.rb +3 -3
  80. data/lib/sts/tbx_iso_tml/munderover.rb +5 -5
  81. data/lib/sts/tbx_iso_tml/named_content.rb +4 -4
  82. data/lib/sts/tbx_iso_tml/normative_authorization.rb +4 -4
  83. data/lib/sts/tbx_iso_tml/note.rb +8 -8
  84. data/lib/sts/tbx_iso_tml/part_of_speech.rb +4 -4
  85. data/lib/sts/tbx_iso_tml/see.rb +4 -4
  86. data/lib/sts/tbx_iso_tml/semantics.rb +6 -5
  87. data/lib/sts/tbx_iso_tml/source.rb +4 -6
  88. data/lib/sts/tbx_iso_tml/sup.rb +4 -6
  89. data/lib/sts/tbx_iso_tml/table.rb +6 -6
  90. data/lib/sts/tbx_iso_tml/table_break.rb +10 -0
  91. data/lib/sts/tbx_iso_tml/table_wrap.rb +6 -6
  92. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -2
  93. data/lib/sts/tbx_iso_tml/tbody.rb +6 -6
  94. data/lib/sts/tbx_iso_tml/td.rb +18 -16
  95. data/lib/sts/tbx_iso_tml/term.rb +10 -10
  96. data/lib/sts/tbx_iso_tml/term_entry.rb +4 -4
  97. data/lib/sts/tbx_iso_tml/term_information_group.rb +6 -6
  98. data/lib/sts/tbx_iso_tml/term_type.rb +4 -12
  99. data/lib/sts/tbx_iso_tml/th.rb +18 -17
  100. data/lib/sts/tbx_iso_tml/thead.rb +7 -7
  101. data/lib/sts/tbx_iso_tml/tr.rb +2 -2
  102. data/lib/sts/tbx_iso_tml/xref.rb +5 -7
  103. data/lib/sts/version.rb +1 -1
  104. data/lib/sts.rb +6 -4
  105. data/sts.gemspec +4 -1
  106. metadata +27 -10
  107. data/lib/sts/mapper.rb +0 -442
@@ -1,14 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "../niso_sts/paragraph"
6
4
 
7
5
  module Sts
8
6
  module TbxIsoTml
9
- class Fn < Sts::Mapper
10
- attribute :id, Shale::Type::String
11
- attribute :label, Shale::Type::String
7
+ class Fn < Lutaml::Model::Serializable
8
+ attribute :id, :string
9
+ attribute :label, :string
12
10
  attribute :p, Sts::NisoSts::Paragraph
13
11
 
14
12
  xml do
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "fn"
6
6
 
7
7
  module Sts
8
8
  module TbxIsoTml
9
- class FnGroup < Sts::Mapper
9
+ class FnGroup < Lutaml::Model::Serializable
10
10
  attribute :fn, Sts::TbxIsoTml::Fn, collection: true
11
11
 
12
12
  xml do
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class GeographicalUsage < Sts::Mapper
8
- attribute :value, Shale::Type::String
7
+ class GeographicalUsage < Lutaml::Model::Serializable
8
+ attribute :value, :string
9
9
 
10
10
  xml do
11
11
  root "geographicalUsage"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class GrammaticalGender < Sts::Mapper
8
- # TODO: can be masculine, feminine, singular
9
- attribute :value, Shale::Type::String
7
+ class GrammaticalGender < Lutaml::Model::Serializable
8
+ attribute :value, :string,
9
+ values: %w[masculine feminine neuter]
10
10
 
11
11
  xml do
12
12
  root "grammaticalGender"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class GrammaticalNumber < Sts::Mapper
8
- # TODO: can be singular | plural
9
- attribute :value, Shale::Type::String
7
+ class GrammaticalNumber < Lutaml::Model::Serializable
8
+ attribute :value, :string,
9
+ values: %w[singular plural]
10
10
 
11
11
  xml do
12
12
  root "grammaticalNumber"
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class Italic < Sts::Mapper
8
- attribute :value, Shale::Type::String
9
- attribute :sub, Shale::Type::String
7
+ class Italic < Lutaml::Model::Serializable
8
+ attribute :value, :string
9
+ attribute :sub, :string
10
10
 
11
11
  xml do
12
- root "italic"
12
+ root "italic", mixed: true
13
13
  namespace nil, nil
14
14
 
15
15
  map_content to: :value
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "note"
6
6
  require_relative "example"
@@ -12,12 +12,12 @@ require_relative "term_information_group"
12
12
 
13
13
  module Sts
14
14
  module TbxIsoTml
15
- class Definition < Sts::Mapper; end
16
- class Note < Sts::Mapper; end
17
- class Caption < Sts::Mapper; end
15
+ class Definition < Lutaml::Model::Serializable; end
16
+ class Note < Lutaml::Model::Serializable; end
17
+ class Caption < Lutaml::Model::Serializable; end
18
18
 
19
- class LangSet < Sts::Mapper
20
- attribute :lang, Shale::Type::String
19
+ class LangSet < Lutaml::Model::Serializable
20
+ attribute :lang, :string
21
21
  attribute :definition, Sts::TbxIsoTml::Definition, collection: true
22
22
  attribute :note, Note, collection: true
23
23
  attribute :example, Example, collection: true
@@ -25,12 +25,12 @@ module Sts
25
25
  attribute :see, See, collection: true
26
26
  attribute :source, Source, collection: true
27
27
  attribute :x_source, ExternalSource, collection: true
28
- attribute :cross_reference, Shale::Type::String, collection: true
29
- attribute :subject_field, Shale::Type::String
28
+ attribute :cross_reference, :string, collection: true
29
+ attribute :subject_field, :string
30
30
  # attribute :x_graphic, ExternalGraphic, collection: true
31
31
 
32
32
  xml do
33
- root "langSet"
33
+ root "langSet", mixed: true
34
34
  namespace "urn:iso:std:iso:30042:ed-1", "tbx"
35
35
 
36
36
  map_attribute "lang", to: :lang,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "semantics"
6
6
  require_relative "mrow"
@@ -14,19 +14,19 @@ require_relative "munderover"
14
14
 
15
15
  module Sts
16
16
  module TbxIsoTml
17
- class Mfenced < Sts::Mapper; end
17
+ class Mfenced < Lutaml::Model::Serializable; end
18
18
 
19
- class Math < Sts::Mapper
20
- attribute :id, Shale::Type::String
21
- attribute :content, Shale::Type::String
22
- attribute :display, Shale::Type::String
19
+ class Math < Lutaml::Model::Serializable
20
+ attribute :id, :string
21
+ attribute :content, :string
22
+ attribute :display, :string
23
23
  attribute :mrow, Mrow
24
- attribute :msub, Msub
24
+ attribute :msub, Msub, collection: true
25
25
  attribute :msup, Msup
26
- attribute :mn, Shale::Type::String
27
- attribute :mo, Shale::Type::String
28
- attribute :mi, Shale::Type::String
29
- attribute :mtext, Shale::Type::String
26
+ attribute :mn, :string, collection: true
27
+ attribute :mo, :string, collection: true
28
+ attribute :mi, :string
29
+ attribute :mtext, :string
30
30
  attribute :semantics, Semantics
31
31
  attribute :mstyle, Mstyle, collection: true
32
32
  attribute :mfenced, Mfenced, collection: true
@@ -35,7 +35,7 @@ module Sts
35
35
  attribute :munderover, Munderover, collection: true
36
36
 
37
37
  xml do
38
- root "math"
38
+ root "math", mixed: true
39
39
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
40
40
 
41
41
  map_attribute "id", to: :id
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mspace"
6
6
  require_relative "msub"
@@ -9,24 +9,25 @@ require_relative "mfrac"
9
9
 
10
10
  module Sts
11
11
  module TbxIsoTml
12
- class Mfenced < Sts::Mapper
13
- attribute :separators, Shale::Type::String
14
- attribute :open, Shale::Type::String
15
- attribute :close, Shale::Type::String
16
- attribute :mo, Shale::Type::String
17
- attribute :mn, Shale::Type::String
18
- attribute :mi, Shale::Type::String
19
- attribute :mtext, Shale::Type::String
12
+ class Mfenced < Lutaml::Model::Serializable
13
+ attribute :separators, :string
14
+ attribute :open, :string
15
+ attribute :close, :string
16
+ attribute :mo, :string, collection: true
17
+ attribute :mn, :string, collection: true
18
+ attribute :mi, :string
19
+ attribute :mtext, :string
20
20
  attribute :mspace, Mspace, collection: true
21
21
  attribute :msub, Msub, collection: true
22
22
  attribute :mstyle, Mstyle, collection: true
23
23
  attribute :mfrac, Mfrac, collection: true
24
24
 
25
25
  xml do
26
- root "math"
26
+ root "mfenced", mixed: true
27
27
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
28
28
 
29
- map_attribute "separators", to: :separators
29
+ map_attribute "separators", to: :separators,
30
+ value_map: { to: { empty: :empty } }
30
31
  map_attribute "open", to: :open
31
32
  map_attribute "close", to: :close
32
33
 
@@ -1,23 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "mrow"
5
5
  require_relative "mstyle"
6
6
 
7
7
  module Sts
8
8
  module TbxIsoTml
9
- class Mrow < Sts::Mapper; end
9
+ class Mrow < Lutaml::Model::Serializable; end
10
10
 
11
- class Mfrac < Sts::Mapper
11
+ class Mfrac < Lutaml::Model::Serializable
12
12
  attribute :mrow, Mrow, collection: true
13
13
  attribute :mstyle, Mstyle, collection: true
14
- attribute :bevelled, Shale::Type::String
15
- attribute :linethickness, Shale::Type::String
16
- attribute :mn, Shale::Type::String
17
- attribute :mtext, Shale::Type::String
14
+ attribute :bevelled, :string
15
+ attribute :linethickness, :string
16
+ attribute :mn, :string, collection: true
17
+ attribute :mtext, :string, collection: true
18
18
 
19
19
  xml do
20
- root "math"
20
+ root "mfrac", mixed: true
21
21
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
22
22
 
23
23
  map_attribute "bevelled", to: :bevelled
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "mstyle"
5
5
 
6
6
  module Sts
7
7
  module TbxIsoTml
8
- class Mi < Sts::Mapper
9
- attribute :content, Shale::Type::String
8
+ class Mi < Lutaml::Model::Serializable
9
+ attribute :content, :string
10
10
 
11
11
  xml do
12
12
  root "mi"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "mfrac"
5
5
  require_relative "mstyle"
6
6
  require_relative "msub"
@@ -10,22 +10,22 @@ require_relative "mfenced"
10
10
 
11
11
  module Sts
12
12
  module TbxIsoTml
13
- class Mrow < Sts::Mapper
14
- attribute :content, Shale::Type::String
15
- attribute :mo, Shale::Type::String
16
- attribute :mi, Shale::Type::String
17
- attribute :mn, Shale::Type::String
18
- attribute :mtext, Shale::Type::String
13
+ class Mrow < Lutaml::Model::Serializable
14
+ attribute :content, :string
15
+ attribute :mo, :string, collection: true
16
+ attribute :mi, :string, collection: true
17
+ attribute :mn, :string, collection: true
18
+ attribute :mtext, :string, collection: true
19
19
  attribute :mrow, Mrow
20
- attribute :mfrac, Mfrac
21
- attribute :mstyle, Mstyle
22
- attribute :msub, Msub
20
+ attribute :mfrac, Mfrac, collection: true
21
+ attribute :mstyle, Mstyle, collection: true
22
+ attribute :msub, Msub, collection: true
23
23
  attribute :msup, Msup
24
24
  attribute :mfenced, Mfenced, collection: true
25
25
  attribute :mspace, Mspace, collection: true
26
26
 
27
27
  xml do
28
- root "math"
28
+ root "mrow", mixed: true
29
29
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
30
30
 
31
31
  map_element "mo", to: :mo
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class Mspace < Sts::Mapper
8
- attribute :width, Shale::Type::String
7
+ class Mspace < Lutaml::Model::Serializable
8
+ attribute :width, :string
9
9
 
10
10
  xml do
11
11
  root "mspace"
@@ -1,20 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "mspace"
5
5
 
6
6
  module Sts
7
7
  module TbxIsoTml
8
- class Mstyle < Sts::Mapper
9
- attribute :mathvariant, Shale::Type::String
8
+ class Mstyle < Lutaml::Model::Serializable
9
+ attribute :mathvariant, :string
10
10
  attribute :mstyle, Mstyle
11
- attribute :mspace, Mspace
12
- attribute :mi, Shale::Type::String, collection: true
13
- attribute :mn, Shale::Type::String, collection: true
14
- attribute :mo, Shale::Type::String, collection: true
11
+ attribute :mspace, Mspace, collection: true
12
+ attribute :mi, :string, collection: true
13
+ attribute :mn, :string, collection: true
14
+ attribute :mo, :string, collection: true
15
15
 
16
16
  xml do
17
- root "math"
17
+ root "mstyle", mixed: true
18
18
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
19
19
 
20
20
  map_attribute "mathvariant", to: :mathvariant
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mstyle"
6
6
  require_relative "mrow"
@@ -8,17 +8,17 @@ require_relative "mspace"
8
8
 
9
9
  module Sts
10
10
  module TbxIsoTml
11
- class Msub < Sts::Mapper
11
+ class Msub < Lutaml::Model::Serializable
12
12
  attribute :mstyle, Mstyle, collection: true
13
13
  attribute :mrow, Mrow
14
14
  attribute :mspace, Mspace
15
- attribute :mo, Shale::Type::String, collection: true
16
- attribute :mi, Shale::Type::String, collection: true
17
- attribute :mn, Shale::Type::String, collection: true
18
- attribute :mtext, Shale::Type::String, collection: true
15
+ attribute :mo, :string, collection: true
16
+ attribute :mi, :string, collection: true
17
+ attribute :mn, :string, collection: true
18
+ attribute :mtext, :string, collection: true
19
19
 
20
20
  xml do
21
- root "mstyle"
21
+ root "msub", mixed: true
22
22
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
23
23
 
24
24
  map_element "mstyle", to: :mstyle
@@ -1,20 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mstyle"
6
6
  require_relative "mrow"
7
7
 
8
8
  module Sts
9
9
  module TbxIsoTml
10
- class Msup < Sts::Mapper
10
+ class Msup < Lutaml::Model::Serializable
11
11
  attribute :mstyle, Mstyle
12
12
  attribute :mrow, Mrow
13
- attribute :mi, Shale::Type::String
14
- attribute :mn, Shale::Type::String
13
+ attribute :mi, :string
14
+ attribute :mn, :string, collection: true
15
15
 
16
16
  xml do
17
- root "mstyle"
17
+ root "msup"
18
18
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
19
19
 
20
20
  map_element "mstyle", to: :mstyle
@@ -1,16 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mrow"
6
6
 
7
7
  module Sts
8
8
  module TbxIsoTml
9
- class Munder < Sts::Mapper
9
+ class Munder < Lutaml::Model::Serializable
10
10
  attribute :mrow, Mrow, collection: true
11
11
 
12
12
  xml do
13
- root "math"
13
+ root "munder"
14
14
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
15
15
 
16
16
  map_element "mrow", to: :mrow
@@ -1,18 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mrow"
6
6
 
7
7
  module Sts
8
8
  module TbxIsoTml
9
- class Munderover < Sts::Mapper
10
- attribute :mo, Shale::Type::String
11
- attribute :mi, Shale::Type::String
9
+ class Munderover < Lutaml::Model::Serializable
10
+ attribute :mo, :string
11
+ attribute :mi, :string
12
12
  attribute :mrow, Mrow, collection: true
13
13
 
14
14
  xml do
15
- root "math"
15
+ root "munderover", mixed: true
16
16
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
17
17
 
18
18
  map_element "mo", to: :mo
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class NamedContent < Sts::Mapper
8
- attribute :content_type, Shale::Type::String
9
- attribute :content, Shale::Type::String
7
+ class NamedContent < Lutaml::Model::Serializable
8
+ attribute :content_type, :string
9
+ attribute :content, :string
10
10
 
11
11
  xml do
12
12
  root "named-content"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class NormativeAuthorization < Sts::Mapper
8
- # TODO: can be: admittedTerm, preferredTerm, deprecatedTerm
9
- attribute :value, Shale::Type::String
7
+ class NormativeAuthorization < Lutaml::Model::Serializable
8
+ attribute :value, :string,
9
+ values: %w[admittedTerm preferredTerm deprecatedTerm]
10
10
 
11
11
  xml do
12
12
  root "normativeAuthorization"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "table_wrap"
6
6
  require_relative "entailed_term"
@@ -13,20 +13,20 @@ require_relative "../niso_sts/reference_standard"
13
13
 
14
14
  module Sts
15
15
  module TbxIsoTml
16
- class Note < Sts::Mapper
17
- attribute :id, Shale::Type::String
18
- attribute :value, Shale::Type::String
16
+ class Note < Lutaml::Model::Serializable
17
+ attribute :id, :string
18
+ attribute :value, :string
19
19
  attribute :table_wrap, Sts::TbxIsoTml::TableWrap
20
- attribute :entailed_term, EntailedTerm
21
- attribute :math, Sts::TbxIsoTml::Math
20
+ attribute :entailed_term, EntailedTerm, collection: true
21
+ attribute :math, Sts::TbxIsoTml::Math, collection: true
22
22
  attribute :xref, Sts::TbxIsoTml::Xref
23
23
  attribute :list, Sts::NisoSts::List
24
24
  attribute :std, Sts::NisoSts::ReferenceStandard
25
25
  attribute :sup, Sup
26
- attribute :italic, Italic
26
+ attribute :italic, Italic, collection: true
27
27
 
28
28
  xml do
29
- root "note"
29
+ root "note", mixed: true
30
30
  namespace "urn:iso:std:iso:30042:ed-1", "tbx"
31
31
 
32
32
  map_attribute "id", to: :id
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class PartOfSpeech < Sts::Mapper
8
- # TODO: can be `noun`, `verb`, `adj`, `adv`
9
- attribute :value, Shale::Type::String
7
+ class PartOfSpeech < Lutaml::Model::Serializable
8
+ attribute :value, :string,
9
+ values: %w[noun verb adj adv]
10
10
 
11
11
  xml do
12
12
  root "partOfSpeech"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module TbxIsoTml
7
- class See < Sts::Mapper
8
- attribute :script, Shale::Type::String
9
- attribute :value, Shale::Type::String
7
+ class See < Lutaml::Model::Serializable
8
+ attribute :script, :string
9
+ attribute :value, :string
10
10
 
11
11
  xml do
12
12
  root "see"
@@ -1,20 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "mrow"
6
6
  require_relative "munder"
7
7
 
8
8
  module Sts
9
9
  module TbxIsoTml
10
- class Semantics < Sts::Mapper
10
+ class Semantics < Lutaml::Model::Serializable
11
11
  attribute :mrow, Mrow, collection: true
12
- attribute :mo, Shale::Type::String
13
- attribute :mtext, Shale::Type::String
12
+ attribute :mo, :string
13
+ attribute :mtext, :string
14
14
  attribute :munder, Sts::TbxIsoTml::Munder
15
+ attribute :content, :string
15
16
 
16
17
  xml do
17
- root "math"
18
+ root "semantics", mixed: true
18
19
  namespace "http://www.w3.org/1998/Math/MathML", "mml"
19
20
 
20
21
  map_element "mrow", to: :mrow
@@ -1,18 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "italic"
6
- require_relative "../mapper"
4
+ require "lutaml/model"
7
5
 
8
6
  module Sts
9
7
  module TbxIsoTml
10
- class Source < Sts::Mapper
11
- attribute :value, Shale::Type::String
8
+ class Source < Lutaml::Model::Serializable
9
+ attribute :value, :string
12
10
  attribute :italic, Italic
13
11
 
14
12
  xml do
15
- root "source"
13
+ root "source", mixed: true
16
14
  namespace "urn:iso:std:iso:30042:ed-1", "tbx"
17
15
 
18
16
  map_content to: :value