sts 0.3.1 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +471 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +27 -0
  5. data/lib/sts/niso_sts/adoption.rb +4 -4
  6. data/lib/sts/niso_sts/app.rb +9 -9
  7. data/lib/sts/niso_sts/app_group.rb +2 -2
  8. data/lib/sts/niso_sts/back.rb +2 -2
  9. data/lib/sts/niso_sts/body.rb +2 -2
  10. data/lib/sts/niso_sts/caption.rb +3 -3
  11. data/lib/sts/niso_sts/custom_meta.rb +5 -5
  12. data/lib/sts/niso_sts/custom_meta_group.rb +2 -2
  13. data/lib/sts/niso_sts/def.rb +2 -2
  14. data/lib/sts/niso_sts/def_item.rb +3 -3
  15. data/lib/sts/niso_sts/def_list.rb +5 -5
  16. data/lib/sts/niso_sts/display_formula.rb +4 -6
  17. data/lib/sts/niso_sts/document_identification.rb +8 -8
  18. data/lib/sts/niso_sts/ext_link.rb +5 -5
  19. data/lib/sts/niso_sts/figure.rb +7 -7
  20. data/lib/sts/niso_sts/fn.rb +3 -3
  21. data/lib/sts/niso_sts/fn_group.rb +2 -2
  22. data/lib/sts/niso_sts/front.rb +2 -2
  23. data/lib/sts/niso_sts/graphic.rb +3 -3
  24. data/lib/sts/niso_sts/inline_formula.rb +2 -4
  25. data/lib/sts/niso_sts/label.rb +3 -3
  26. data/lib/sts/niso_sts/list.rb +4 -6
  27. data/lib/sts/niso_sts/list_item.rb +5 -5
  28. data/lib/sts/niso_sts/meta_date.rb +4 -4
  29. data/lib/sts/niso_sts/meta_note.rb +7 -6
  30. data/lib/sts/niso_sts/metadata_iso.rb +10 -10
  31. data/lib/sts/niso_sts/metadata_std.rb +12 -12
  32. data/lib/sts/niso_sts/mixed_citation.rb +8 -8
  33. data/lib/sts/niso_sts/non_normative_example.rb +6 -6
  34. data/lib/sts/niso_sts/non_normative_note.rb +6 -6
  35. data/lib/sts/niso_sts/object_id.rb +4 -4
  36. data/lib/sts/niso_sts/page_count.rb +3 -3
  37. data/lib/sts/niso_sts/paragraph.rb +12 -12
  38. data/lib/sts/niso_sts/permissions.rb +5 -5
  39. data/lib/sts/niso_sts/reference.rb +4 -6
  40. data/lib/sts/niso_sts/reference_list.rb +6 -8
  41. data/lib/sts/niso_sts/reference_standard.rb +7 -7
  42. data/lib/sts/niso_sts/section.rb +9 -9
  43. data/lib/sts/niso_sts/section_array.rb +3 -3
  44. data/lib/sts/niso_sts/standard.rb +6 -8
  45. data/lib/sts/niso_sts/standard_identification.rb +9 -9
  46. data/lib/sts/niso_sts/standard_ref.rb +4 -4
  47. data/lib/sts/niso_sts/std_cross_reference.rb +3 -3
  48. data/lib/sts/niso_sts/std_id.rb +6 -6
  49. data/lib/sts/niso_sts/std_id_group.rb +2 -2
  50. data/lib/sts/niso_sts/term_display.rb +2 -2
  51. data/lib/sts/niso_sts/term_section.rb +6 -6
  52. data/lib/sts/niso_sts/title.rb +4 -4
  53. data/lib/sts/niso_sts/title_wrap.rb +11 -9
  54. data/lib/sts/tbx_iso_tml/bold.rb +3 -3
  55. data/lib/sts/tbx_iso_tml/caption.rb +3 -3
  56. data/lib/sts/tbx_iso_tml/col.rb +6 -6
  57. data/lib/sts/tbx_iso_tml/definition.rb +5 -7
  58. data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -6
  59. data/lib/sts/tbx_iso_tml/example.rb +6 -8
  60. data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -3
  61. data/lib/sts/tbx_iso_tml/external_source.rb +4 -4
  62. data/lib/sts/tbx_iso_tml/fn.rb +3 -5
  63. data/lib/sts/tbx_iso_tml/fn_group.rb +2 -2
  64. data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -3
  65. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +4 -4
  66. data/lib/sts/tbx_iso_tml/grammatical_number.rb +4 -4
  67. data/lib/sts/tbx_iso_tml/italic.rb +5 -5
  68. data/lib/sts/tbx_iso_tml/lang_set.rb +9 -9
  69. data/lib/sts/tbx_iso_tml/math.rb +12 -12
  70. data/lib/sts/tbx_iso_tml/mfenced.rb +10 -10
  71. data/lib/sts/tbx_iso_tml/mfrac.rb +8 -8
  72. data/lib/sts/tbx_iso_tml/mi.rb +3 -3
  73. data/lib/sts/tbx_iso_tml/mrow.rb +11 -11
  74. data/lib/sts/tbx_iso_tml/mspace.rb +3 -3
  75. data/lib/sts/tbx_iso_tml/mstyle.rb +8 -8
  76. data/lib/sts/tbx_iso_tml/msub.rb +7 -7
  77. data/lib/sts/tbx_iso_tml/msup.rb +5 -5
  78. data/lib/sts/tbx_iso_tml/munder.rb +3 -3
  79. data/lib/sts/tbx_iso_tml/munderover.rb +5 -5
  80. data/lib/sts/tbx_iso_tml/named_content.rb +4 -4
  81. data/lib/sts/tbx_iso_tml/normative_authorization.rb +4 -4
  82. data/lib/sts/tbx_iso_tml/note.rb +8 -8
  83. data/lib/sts/tbx_iso_tml/part_of_speech.rb +4 -4
  84. data/lib/sts/tbx_iso_tml/see.rb +4 -4
  85. data/lib/sts/tbx_iso_tml/semantics.rb +6 -5
  86. data/lib/sts/tbx_iso_tml/source.rb +4 -6
  87. data/lib/sts/tbx_iso_tml/sup.rb +4 -6
  88. data/lib/sts/tbx_iso_tml/table.rb +6 -6
  89. data/lib/sts/tbx_iso_tml/table_break.rb +10 -0
  90. data/lib/sts/tbx_iso_tml/table_wrap.rb +6 -6
  91. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -2
  92. data/lib/sts/tbx_iso_tml/tbody.rb +5 -5
  93. data/lib/sts/tbx_iso_tml/td.rb +17 -15
  94. data/lib/sts/tbx_iso_tml/term.rb +10 -10
  95. data/lib/sts/tbx_iso_tml/term_entry.rb +4 -4
  96. data/lib/sts/tbx_iso_tml/term_information_group.rb +6 -6
  97. data/lib/sts/tbx_iso_tml/term_type.rb +4 -12
  98. data/lib/sts/tbx_iso_tml/th.rb +17 -16
  99. data/lib/sts/tbx_iso_tml/thead.rb +6 -6
  100. data/lib/sts/tbx_iso_tml/tr.rb +2 -2
  101. data/lib/sts/tbx_iso_tml/xref.rb +5 -7
  102. data/lib/sts/version.rb +1 -1
  103. data/lib/sts.rb +6 -4
  104. data/sts.gemspec +4 -1
  105. metadata +22 -5
  106. data/lib/sts/mapper.rb +0 -442
@@ -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, Lutaml::Model::Type::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, Lutaml::Model::Type::String
9
+ attribute :sub, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String, collection: true
29
+ attribute :subject_field, Lutaml::Model::Type::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, Lutaml::Model::Type::String
21
+ attribute :content, Lutaml::Model::Type::String
22
+ attribute :display, Lutaml::Model::Type::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, Lutaml::Model::Type::String, collection: true
27
+ attribute :mo, Lutaml::Model::Type::String, collection: true
28
+ attribute :mi, Lutaml::Model::Type::String
29
+ attribute :mtext, Lutaml::Model::Type::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,21 +9,21 @@ 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, Lutaml::Model::Type::String
14
+ attribute :open, Lutaml::Model::Type::String
15
+ attribute :close, Lutaml::Model::Type::String
16
+ attribute :mo, Lutaml::Model::Type::String, collection: true
17
+ attribute :mn, Lutaml::Model::Type::String, collection: true
18
+ attribute :mi, Lutaml::Model::Type::String
19
+ attribute :mtext, Lutaml::Model::Type::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
29
  map_attribute "separators", to: :separators
@@ -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, Lutaml::Model::Type::String
15
+ attribute :linethickness, Lutaml::Model::Type::String
16
+ attribute :mn, Lutaml::Model::Type::String, collection: true
17
+ attribute :mtext, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String
15
+ attribute :mo, Lutaml::Model::Type::String, collection: true
16
+ attribute :mi, Lutaml::Model::Type::String, collection: true
17
+ attribute :mn, Lutaml::Model::Type::String, collection: true
18
+ attribute :mtext, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String, collection: true
13
+ attribute :mn, Lutaml::Model::Type::String, collection: true
14
+ attribute :mo, Lutaml::Model::Type::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, Lutaml::Model::Type::String, collection: true
16
+ attribute :mi, Lutaml::Model::Type::String, collection: true
17
+ attribute :mn, Lutaml::Model::Type::String, collection: true
18
+ attribute :mtext, Lutaml::Model::Type::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, Lutaml::Model::Type::String
14
+ attribute :mn, Lutaml::Model::Type::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, Lutaml::Model::Type::String
11
+ attribute :mi, Lutaml::Model::Type::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, Lutaml::Model::Type::String
9
+ attribute :content, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String
18
+ attribute :value, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String
9
+ attribute :value, Lutaml::Model::Type::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, Lutaml::Model::Type::String
13
+ attribute :mtext, Lutaml::Model::Type::String
14
14
  attribute :munder, Sts::TbxIsoTml::Munder
15
+ attribute :content, Lutaml::Model::Type::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, Lutaml::Model::Type::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
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
- require_relative "../mapper"
3
+ require "lutaml/model"
6
4
  require_relative "xref"
7
5
 
8
6
  module Sts
9
7
  module TbxIsoTml
10
- class Xref < Sts::Mapper; end
8
+ class Xref < Lutaml::Model::Serializable; end
11
9
 
12
- class Sup < Sts::Mapper
13
- attribute :value, Shale::Type::String
10
+ class Sup < Lutaml::Model::Serializable
11
+ attribute :value, Lutaml::Model::Type::String
14
12
  attribute :xref, Xref
15
13
 
16
14
  xml do
@@ -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 "col"
6
6
  require_relative "thead"
@@ -8,14 +8,14 @@ require_relative "tbody"
8
8
 
9
9
  module Sts
10
10
  module TbxIsoTml
11
- class Table < Sts::Mapper
11
+ class Table < Lutaml::Model::Serializable
12
12
  attribute :col, Sts::TbxIsoTml::Col, collection: true
13
13
  attribute :thead, Sts::TbxIsoTml::Thead
14
14
  attribute :tbody, Sts::TbxIsoTml::Tbody
15
- attribute :border, Shale::Type::String
16
- attribute :rules, Shale::Type::String
17
- attribute :frame, Shale::Type::String
18
- attribute :width, Shale::Type::String
15
+ attribute :border, Lutaml::Model::Type::String
16
+ attribute :rules, Lutaml::Model::Type::String
17
+ attribute :frame, Lutaml::Model::Type::String
18
+ attribute :width, Lutaml::Model::Type::String
19
19
 
20
20
  xml do
21
21
  root "table"
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Sts
6
+ module TbxIsoTml
7
+ class TableBreak < Lutaml::Model::Serializable
8
+ end
9
+ end
10
+ end