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,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "reference_standard"
6
4
  require_relative "mixed_citation"
7
5
 
8
6
  module Sts
9
7
  module NisoSts
10
- class Reference < Sts::Mapper
11
- attribute :content_type, Shale::Type::String
12
- attribute :id, Shale::Type::String
13
- attribute :label, Shale::Type::String
8
+ class Reference < Lutaml::Model::Serializable
9
+ attribute :content_type, Lutaml::Model::Type::String
10
+ attribute :id, Lutaml::Model::Type::String
11
+ attribute :label, Label
14
12
  attribute :mixed_citation, MixedCitation
15
13
  attribute :std, ReferenceStandard, collection: true
16
14
 
@@ -1,17 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "reference"
6
4
 
7
5
  module Sts
8
6
  module NisoSts
9
- class ReferenceList < Sts::Mapper
10
- attribute :content_type, Shale::Type::String
11
- attribute :id, Shale::Type::String
12
- attribute :specific_use, Shale::Type::String
13
- attribute :title, Shale::Type::String
14
- attribute :label, Shale::Type::String
7
+ class ReferenceList < Lutaml::Model::Serializable
8
+ attribute :content_type, Lutaml::Model::Type::String
9
+ attribute :id, Lutaml::Model::Type::String
10
+ attribute :specific_use, Lutaml::Model::Type::String
11
+ attribute :title, Lutaml::Model::Type::String
12
+ attribute :label, Label
15
13
  attribute :ref, Reference, collection: true
16
14
 
17
15
  xml do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "standard_ref"
5
5
  require_relative "std_id_group"
6
6
  require_relative "fn"
@@ -8,18 +8,18 @@ require_relative "../tbx_iso_tml/xref"
8
8
 
9
9
  module Sts
10
10
  module NisoSts
11
- class ReferenceStandard < Sts::Mapper
12
- attribute :type, Shale::Type::String
13
- attribute :std_id, Shale::Type::String
14
- attribute :content, Shale::Type::String
11
+ class ReferenceStandard < Lutaml::Model::Serializable
12
+ attribute :type, Lutaml::Model::Type::String
13
+ attribute :std_id, Lutaml::Model::Type::String
14
+ attribute :content, Lutaml::Model::Type::String
15
15
  attribute :std_ref, StandardRef
16
- attribute :title, Shale::Type::String
16
+ attribute :title, Lutaml::Model::Type::String
17
17
  attribute :fn, Fn, collection: true
18
18
  attribute :std_id_group, StdIdGroup, collection: true
19
19
  attribute :xref, Sts::TbxIsoTml::Xref, collection: true
20
20
 
21
21
  xml do
22
- root "std"
22
+ root "std", mixed: true
23
23
 
24
24
  map_attribute "type", to: :type
25
25
  map_attribute "std-id", to: :std_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 "paragraph"
6
6
  require_relative "list"
@@ -16,14 +16,14 @@ require_relative "../tbx_iso_tml/table_wrap"
16
16
 
17
17
  module Sts
18
18
  module NisoSts
19
- class Title < Sts::Mapper; end
19
+ class Title < Lutaml::Model::Serializable; end
20
20
 
21
- class Section < Sts::Mapper
22
- attribute :id, Shale::Type::String
23
- attribute :specific_use, Shale::Type::String
24
- attribute :label, Shale::Type::String
21
+ class Section < Lutaml::Model::Serializable
22
+ attribute :id, Lutaml::Model::Type::String
23
+ attribute :specific_use, Lutaml::Model::Type::String
24
+ attribute :label, Label
25
25
  attribute :title, Title
26
- attribute :type, Shale::Type::String
26
+ attribute :type, Lutaml::Model::Type::String
27
27
  attribute :array, SectionArray
28
28
  attribute :paragraphs, Paragraph, collection: true
29
29
  attribute :list, List, collection: true
@@ -38,13 +38,13 @@ module Sts
38
38
  attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
39
39
 
40
40
  xml do
41
- root "sec"
41
+ root "sec", mixed: true
42
42
 
43
43
  map_attribute "id", to: :id
44
44
  map_attribute "sec-type", to: :type
45
45
  map_attribute "specific-use", to: :specific_use
46
46
 
47
- map_element "label", to: :label, render_nil: true
47
+ map_element "label", to: :label
48
48
  map_element "title", to: :title
49
49
  map_element "p", to: :paragraphs
50
50
  map_element "sec", to: :sec
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "../tbx_iso_tml/table"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class SectionArray < Sts::Mapper
10
- attribute :id, Shale::Type::String
9
+ class SectionArray < Lutaml::Model::Serializable
10
+ attribute :id, Lutaml::Model::Type::String
11
11
  attribute :table, Sts::TbxIsoTml::Table
12
12
 
13
13
  xml do
@@ -1,22 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "front"
6
4
  require_relative "body"
7
5
  require_relative "back"
8
6
 
9
7
  module Sts
10
8
  module NisoSts
11
- class Standard < Sts::Mapper
9
+ class Standard < Lutaml::Model::Serializable
12
10
  attribute :front, Front
13
11
  attribute :body, Body
14
12
  attribute :back, Back
15
- attribute :id, Shale::Type::String
16
- attribute :lang, Shale::Type::String
17
- attribute :mml, Shale::Type::String
18
- attribute :tbx, Shale::Type::String
19
- attribute :xlink, Shale::Type::String
13
+ attribute :id, Lutaml::Model::Type::String
14
+ attribute :lang, Lutaml::Model::Type::String
15
+ attribute :mml, Lutaml::Model::Type::String
16
+ attribute :tbx, Lutaml::Model::Type::String
17
+ attribute :xlink, Lutaml::Model::Type::String
20
18
 
21
19
  xml do
22
20
  root "standard"
@@ -1,22 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "std_id_group"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class StandardIdentification < Sts::Mapper
10
- attribute :originator, Shale::Type::String
11
- attribute :doc_type, Shale::Type::String
12
- attribute :doc_number, Shale::Type::String
13
- attribute :edition, Shale::Type::String
14
- attribute :version, Shale::Type::String
15
- attribute :part_number, Shale::Type::String
9
+ class StandardIdentification < Lutaml::Model::Serializable
10
+ attribute :originator, Lutaml::Model::Type::String
11
+ attribute :doc_type, Lutaml::Model::Type::String
12
+ attribute :doc_number, Lutaml::Model::Type::String
13
+ attribute :edition, Lutaml::Model::Type::String
14
+ attribute :version, Lutaml::Model::Type::String
15
+ attribute :part_number, Lutaml::Model::Type::String
16
16
  attribute :std_id_group, StdIdGroup
17
17
 
18
18
  xml do
19
- root "std-iden"
19
+ root "std-ident", mixed: true
20
20
 
21
21
  map_element "originator", to: :originator
22
22
  map_element "doc-type", to: :doc_type
@@ -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 NisoSts
7
- class StandardRef < Sts::Mapper
8
- attribute :type, Shale::Type::String
9
- attribute :value, Shale::Type::String
7
+ class StandardRef < Lutaml::Model::Serializable
8
+ attribute :type, Lutaml::Model::Type::String
9
+ attribute :value, Lutaml::Model::Type::String
10
10
 
11
11
  xml do
12
12
  root "std-ref"
@@ -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 NisoSts
7
- class StdCrossReference < Sts::Mapper
8
- attribute :type, Shale::Type::String
7
+ class StdCrossReference < Lutaml::Model::Serializable
8
+ attribute :type, Lutaml::Model::Type::String
9
9
  attribute :std_ref, StandardRef, collection: true
10
10
 
11
11
  xml do
@@ -1,14 +1,14 @@
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 NisoSts
7
- class StdId < Sts::Mapper
8
- attribute :std_id_link_type, Shale::Type::String
9
- attribute :std_id_type, Shale::Type::String
10
- attribute :specific_use, Shale::Type::String
11
- attribute :content, Shale::Type::String
7
+ class StdId < Lutaml::Model::Serializable
8
+ attribute :std_id_link_type, Lutaml::Model::Type::String
9
+ attribute :std_id_type, Lutaml::Model::Type::String
10
+ attribute :specific_use, Lutaml::Model::Type::String
11
+ attribute :content, Lutaml::Model::Type::String
12
12
 
13
13
  xml do
14
14
  root "std-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
  require_relative "std_id"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class StdIdGroup < Sts::Mapper
9
+ class StdIdGroup < Lutaml::Model::Serializable
10
10
  attribute :std_id, StdId, collection: true
11
11
 
12
12
  xml do
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "paragraph"
6
6
  require_relative "non_normative_note"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class TermDisplay < Sts::Mapper
10
+ class TermDisplay < Lutaml::Model::Serializable
11
11
  attribute :p, Paragraph, collection: true
12
12
  attribute :non_normative_note, NonNormativeNote, collection: true
13
13
 
@@ -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 "../tbx_iso_tml"
6
6
  require_relative "term_display"
@@ -8,15 +8,15 @@ require_relative "../tbx_iso_tml/term_entry"
8
8
 
9
9
  module Sts
10
10
  module NisoSts
11
- class TermSection < Sts::Mapper
12
- attribute :id, Shale::Type::String
13
- attribute :sec_type, Shale::Type::String
14
- attribute :label, Shale::Type::String
11
+ class TermSection < Lutaml::Model::Serializable
12
+ attribute :id, Lutaml::Model::Type::String
13
+ attribute :sec_type, Lutaml::Model::Type::String
14
+ attribute :label, Label
15
15
  attribute :term_entry, Sts::TbxIsoTml::TermEntry # , collection: true
16
16
  attribute :term_display, TermDisplay # , collection: true
17
17
 
18
18
  xml do
19
- root "term-sec"
19
+ root "term-sec", mixed: true
20
20
  map_attribute "id", to: :id
21
21
  map_attribute "sec-type", to: :sec_type
22
22
 
@@ -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 "section"
6
6
  require_relative "inline_formula"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class Title < Sts::Mapper
11
- attribute :content, Shale::Type::String
10
+ class Title < Lutaml::Model::Serializable
11
+ attribute :content, Lutaml::Model::Type::String
12
12
  attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
13
13
 
14
14
  xml do
15
- root "title"
15
+ root "title", mixed: true
16
16
 
17
17
  map_content to: :content
18
18
  map_element "inline-formula", to: :inline_formula
@@ -1,18 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "reference_list"
6
6
  require_relative "reference_standard"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class TitleFull < Sts::Mapper
11
- attribute :content, Shale::Type::String
10
+ class TitleFull < Lutaml::Model::Serializable
11
+ attribute :content, Lutaml::Model::Type::String
12
12
  attribute :std, ReferenceStandard
13
13
 
14
14
  xml do
15
- root "full"
15
+ root "full", mixed: true
16
+
16
17
  map_content to: :content
17
18
  map_element "std", to: :std, namespace: nil, prefix: nil
18
19
  end
@@ -21,20 +22,21 @@ module Sts
21
22
  class TitleCompl < TitleFull
22
23
  xml do
23
24
  root "compl"
25
+
24
26
  map_content to: :content
25
27
  map_element "std", to: :std, namespace: nil, prefix: nil
26
28
  end
27
29
  end
28
30
 
29
- class TitleWrap < Sts::Mapper
30
- attribute :intro, Shale::Type::String
31
- attribute :main, Shale::Type::String
31
+ class TitleWrap < Lutaml::Model::Serializable
32
+ attribute :intro, Lutaml::Model::Type::String
33
+ attribute :main, Lutaml::Model::Type::String
32
34
  attribute :full, TitleFull
33
35
  attribute :compl, TitleCompl
34
- attribute :lang, Shale::Type::String
36
+ attribute :lang, Lutaml::Model::Type::String
35
37
 
36
38
  xml do
37
- root "title-wrap"
39
+ root "title-wrap", mixed: true
38
40
  map_attribute "lang", to: :lang,
39
41
  namespace: "http://www.w3.org/XML/1998/namespace",
40
42
  prefix: "xml"
@@ -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 Bold < Sts::Mapper
8
- attribute :value, Shale::Type::String
7
+ class Bold < Lutaml::Model::Serializable
8
+ attribute :value, Lutaml::Model::Type::String
9
9
 
10
10
  xml do
11
11
  root "bold"
@@ -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 Caption < Sts::Mapper
8
- attribute :p, Shale::Type::String
7
+ class Caption < Lutaml::Model::Serializable
8
+ attribute :p, Lutaml::Model::Type::String
9
9
 
10
10
  xml do
11
11
  root "caption"
@@ -1,14 +1,14 @@
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 Col < Sts::Mapper
8
- attribute :width, Sts::TbxIsoTml::Col
9
- attribute :char, Sts::TbxIsoTml::Col
10
- attribute :charoff, Sts::TbxIsoTml::Col
11
- attribute :span, Sts::TbxIsoTml::Col
7
+ class Col < Lutaml::Model::Serializable
8
+ attribute :width, Lutaml::Model::Type::String
9
+ attribute :char, Lutaml::Model::Type::String
10
+ attribute :charoff, Lutaml::Model::Type::String
11
+ attribute :span, Lutaml::Model::Type::String
12
12
 
13
13
  xml do
14
14
  root "col"
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "entailed_term"
6
4
  require_relative "note"
7
5
  require_relative "italic"
@@ -11,18 +9,18 @@ require_relative "../niso_sts/reference_standard"
11
9
 
12
10
  module Sts
13
11
  module TbxIsoTml
14
- class Definition < Sts::Mapper
15
- attribute :entailed_term, EntailedTerm
12
+ class Definition < Lutaml::Model::Serializable
13
+ attribute :entailed_term, EntailedTerm, collection: true
16
14
  attribute :note, Note
17
- attribute :value, Shale::Type::String
15
+ attribute :value, Lutaml::Model::Type::String
18
16
  attribute :italic, Italic
19
17
  attribute :math, Sts::TbxIsoTml::Math
20
- attribute :sub, Shale::Type::String
18
+ attribute :sub, Lutaml::Model::Type::String
21
19
  attribute :list, Sts::NisoSts::List, collection: true
22
20
  attribute :std, Sts::NisoSts::ReferenceStandard, collection: true
23
21
 
24
22
  xml do
25
- root "definition"
23
+ root "definition", mixed: true
26
24
  namespace "urn:iso:std:iso:30042:ed-1", "tbx"
27
25
 
28
26
  map_content to: :value
@@ -1,14 +1,14 @@
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 EntailedTerm < Sts::Mapper
8
- attribute :target, Shale::Type::String
9
- attribute :xtarget, Shale::Type::String
10
- attribute :lang, Shale::Type::String
11
- attribute :value, Shale::Type::String
7
+ class EntailedTerm < Lutaml::Model::Serializable
8
+ attribute :target, Lutaml::Model::Type::String
9
+ attribute :xtarget, Lutaml::Model::Type::String
10
+ attribute :lang, Lutaml::Model::Type::String
11
+ attribute :value, Lutaml::Model::Type::String
12
12
 
13
13
  xml do
14
14
  root "entailedTerm"
@@ -1,22 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
- require_relative "../mapper"
3
+ require "lutaml/model"
6
4
  require_relative "entailed_term"
7
5
 
8
6
  require_relative "../niso_sts/inline_formula"
9
7
 
10
8
  module Sts
11
9
  module TbxIsoTml
12
- class Example < Sts::Mapper
13
- attribute :id, Shale::Type::String
14
- attribute :value, Shale::Type::String
15
- attribute :entailed_term, EntailedTerm
10
+ class Example < Lutaml::Model::Serializable
11
+ attribute :id, Lutaml::Model::Type::String
12
+ attribute :value, Lutaml::Model::Type::String
13
+ attribute :entailed_term, EntailedTerm, collection: true
16
14
  attribute :inline_formula, Sts::NisoSts::InlineFormula
17
15
 
18
16
  xml do
19
- root "example"
17
+ root "example", mixed: true
20
18
  namespace "urn:iso:std:iso:30042:ed-1", "tbx"
21
19
 
22
20
  map_content to: :value
@@ -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 ExternalGraphic < Sts::Mapper
8
- attribute :target, Shale::Type::String
7
+ class ExternalGraphic < Lutaml::Model::Serializable
8
+ attribute :target, Lutaml::Model::Type::String
9
9
 
10
10
  xml do
11
11
  root "xGraphic"
@@ -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 ExternalSource < Sts::Mapper
8
- attribute :target, Shale::Type::String
9
- attribute :value, Shale::Type::String
7
+ class ExternalSource < Lutaml::Model::Serializable
8
+ attribute :target, Lutaml::Model::Type::String
9
+ attribute :value, Lutaml::Model::Type::String
10
10
 
11
11
  xml do
12
12
  root "xSource"
@@ -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, Lutaml::Model::Type::String
9
+ attribute :label, Lutaml::Model::Type::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, Lutaml::Model::Type::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, Lutaml::Model::Type::String,
9
+ values: %w[masculine feminine neuter]
10
10
 
11
11
  xml do
12
12
  root "grammaticalGender"