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,4 +1,4 @@
1
- require_relative "../mapper"
1
+ require "lutaml/model"
2
2
 
3
3
  require_relative "paragraph"
4
4
  require_relative "title"
@@ -30,13 +30,13 @@ require_relative "non_normative_note"
30
30
 
31
31
  module Sts
32
32
  module NisoSts
33
- class Caption < Sts::Mapper
33
+ class Caption < Lutaml::Model::Serializable
34
34
  attribute :title, Title
35
35
  attribute :paragraphs, Paragraph, collection: true
36
36
  attribute :non_normative_note, NonNormativeNote, collection: true
37
37
 
38
38
  xml do
39
- root "caption"
39
+ root "caption", mixed: true
40
40
 
41
41
  map_element "p", to: :paragraphs
42
42
  map_element "non-normative-note", to: :non_normative_note
@@ -1,13 +1,13 @@
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 CustomMeta < Sts::Mapper
8
- attribute :lang, Shale::Type::String
9
- attribute :meta_name, Shale::Type::String
10
- attribute :meta_value, Shale::Type::String
7
+ class CustomMeta < Lutaml::Model::Serializable
8
+ attribute :lang, :string
9
+ attribute :meta_name, :string
10
+ attribute :meta_value, :string
11
11
 
12
12
  xml do
13
13
  root "custom-meta"
@@ -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 "custom_meta"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class CustomMetaGroup < Sts::Mapper
9
+ class CustomMetaGroup < Lutaml::Model::Serializable
10
10
  attribute :custom_meta, CustomMeta, collection: true
11
11
 
12
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 "paragraph"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class Def < Sts::Mapper
9
+ class Def < Lutaml::Model::Serializable
10
10
  attribute :paragraph, Paragraph
11
11
 
12
12
  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
  require_relative "def"
6
6
  require_relative "../tbx_iso_tml/term"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class DefItem < Sts::Mapper
11
- attribute :specific_use, Shale::Type::String
10
+ class DefItem < Lutaml::Model::Serializable
11
+ attribute :specific_use, :string
12
12
  attribute :term, TbxIsoTml::Term
13
13
  attribute :definition, Def
14
14
 
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "def_item"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class DefList < Sts::Mapper
10
- attribute :title, Shale::Type::String
11
- attribute :specific_use, Shale::Type::String
12
- attribute :list_type, Shale::Type::String
9
+ class DefList < Lutaml::Model::Serializable
10
+ attribute :title, :string
11
+ attribute :specific_use, :string
12
+ attribute :list_type, :string
13
13
  attribute :def_item, DefItem, collection: true
14
14
  attribute :def_list, DefList
15
15
 
@@ -1,14 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
- require_relative "../mapper"
3
+ require "lutaml/model"
6
4
  require_relative "../tbx_iso_tml/math"
7
5
 
8
6
  module Sts
9
7
  module NisoSts
10
- class DisplayFormula < Sts::Mapper
11
- attribute :id, Shale::Type::String
8
+ class DisplayFormula < Lutaml::Model::Serializable
9
+ attribute :id, :string
12
10
  attribute :label, Label
13
11
  attribute :math, TbxIsoTml::Math
14
12
 
@@ -1,18 +1,18 @@
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 DocumentIdentification < Sts::Mapper
8
- attribute :sdo, Shale::Type::String
9
- attribute :proj_id, Shale::Type::String
10
- attribute :language, Shale::Type::String
11
- attribute :release_version, Shale::Type::String
12
- attribute :urn, Shale::Type::String
7
+ class DocumentIdentification < Lutaml::Model::Serializable
8
+ attribute :sdo, :string
9
+ attribute :proj_id, :string
10
+ attribute :language, :string
11
+ attribute :release_version, :string
12
+ attribute :urn, :string
13
13
 
14
14
  xml do
15
- root "doc-iden"
15
+ root "doc-ident"
16
16
 
17
17
  map_element "sdo", to: :sdo
18
18
  map_element "proj-id", to: :proj_id
@@ -1,13 +1,13 @@
1
1
  # frozen_striing_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module NisoSts
7
- class ExtLink < Sts::Mapper
8
- attribute :ext_link_type, Shale::Type::String
9
- attribute :href, Shale::Type::String
10
- attribute :content, Shale::Type::String
7
+ class ExtLink < Lutaml::Model::Serializable
8
+ attribute :ext_link_type, :string
9
+ attribute :href, :string
10
+ attribute :content, :string
11
11
 
12
12
  xml do
13
13
  root "ext-link"
@@ -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 "caption"
6
6
  require_relative "graphic"
@@ -14,18 +14,18 @@ require_relative "def_list"
14
14
 
15
15
  module Sts
16
16
  module NisoSts
17
- class Caption < Sts::Mapper; end
17
+ class Caption < Lutaml::Model::Serializable; end
18
18
 
19
- class Figure < Sts::Mapper
20
- attribute :id, Shale::Type::String
21
- attribute :orientation, Shale::Type::String
19
+ class Figure < Lutaml::Model::Serializable
20
+ attribute :id, :string
21
+ attribute :orientation, :string
22
22
  attribute :caption, Caption
23
23
  attribute :def_list, DefList
24
24
  attribute :label, Label
25
25
  attribute :graphic, Graphic, collection: true
26
26
 
27
27
  xml do
28
- root "fig"
28
+ root "fig", mixed: true
29
29
 
30
30
  map_attribute "id", to: :id
31
31
  map_attribute "orientation", to: :orientation
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "label"
6
6
  require_relative "paragraph"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class Fn < Sts::Mapper
11
- attribute :id, Shale::Type::String
10
+ class Fn < Lutaml::Model::Serializable
11
+ attribute :id, :string
12
12
  attribute :label, Label
13
13
  attribute :paragraph, Paragraph
14
14
 
@@ -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 NisoSts
9
- class FnGroup < Sts::Mapper
9
+ class FnGroup < Lutaml::Model::Serializable
10
10
  attribute :fn, Fn, collection: true
11
11
 
12
12
  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 "metadata_iso"
6
6
  require_relative "metadata_std"
@@ -8,7 +8,7 @@ require_relative "section"
8
8
 
9
9
  module Sts
10
10
  module NisoSts
11
- class Front < Sts::Mapper
11
+ class Front < Lutaml::Model::Serializable
12
12
  attribute :iso_meta, MetadataIso
13
13
  attribute :std_meta, MetadataStd
14
14
  attribute :sec, Section, collection: true
@@ -1,4 +1,4 @@
1
- require_relative "../mapper"
1
+ require "lutaml/model"
2
2
 
3
3
  require_relative "object_id"
4
4
 
@@ -12,8 +12,8 @@ require_relative "object_id"
12
12
 
13
13
  module Sts
14
14
  module NisoSts
15
- class Graphic < Sts::Mapper
16
- attribute :href, Shale::Type::String
15
+ class Graphic < Lutaml::Model::Serializable
16
+ attribute :href, :string
17
17
  attribute :object_id, ObjectId, collection: true
18
18
 
19
19
  xml do
@@ -1,13 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
- require_relative "../mapper"
3
+ require "lutaml/model"
6
4
  require_relative "../tbx_iso_tml/math"
7
5
 
8
6
  module Sts
9
7
  module NisoSts
10
- class InlineFormula < Sts::Mapper
8
+ class InlineFormula < Lutaml::Model::Serializable
11
9
  attribute :math, TbxIsoTml::Math
12
10
 
13
11
  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 "../tbx_iso_tml/sup"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class Label < Sts::Mapper
10
- attribute :content, Shale::Type::String
9
+ class Label < Lutaml::Model::Serializable
10
+ attribute :content, :string
11
11
  attribute :sup, Sts::TbxIsoTml::Sup
12
12
 
13
13
  xml do
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "shale"
4
-
5
3
  require_relative "list_item"
6
- require_relative "../mapper"
4
+ require "lutaml/model"
7
5
 
8
6
  module Sts
9
7
  module NisoSts
10
- class List < Sts::Mapper
11
- attribute :text, Shale::Type::String
12
- attribute :list_type, Shale::Type::String
8
+ class List < Lutaml::Model::Serializable
9
+ attribute :text, :string
10
+ attribute :list_type, :string
13
11
  attribute :list_item, ListItem, collection: true
14
12
 
15
13
  xml do
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "list"
5
5
  require_relative "non_normative_example"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class Paragraph < Sts::Mapper; end
10
- class List < Sts::Mapper; end
9
+ class Paragraph < Lutaml::Model::Serializable; end
10
+ class List < Lutaml::Model::Serializable; end
11
11
 
12
- class ListItem < Sts::Mapper
12
+ class ListItem < Lutaml::Model::Serializable
13
13
  attribute :label, Label
14
14
  attribute :list, List
15
15
  attribute :non_normative_example, NonNormativeExample
@@ -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 MetaDate < Sts::Mapper
8
- attribute :content, Shale::Type::String
9
- attribute :type, Shale::Type::String
7
+ class MetaDate < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :type, :string
10
10
 
11
11
  xml do
12
12
  root "meta-date"
@@ -1,19 +1,20 @@
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
 
7
7
  module Sts
8
8
  module NisoSts
9
- class MetaNote < Sts::Mapper
10
- attribute :id, Shale::Type::String
11
- attribute :content_type, Shale::Type::String
9
+ class MetaNote < Lutaml::Model::Serializable
10
+ attribute :id, :string
11
+ attribute :content_type, :string
12
12
  attribute :p, Paragraph, collection: true
13
- attribute :title, Shale::Type::String
13
+ attribute :title, :string
14
14
 
15
15
  xml do
16
- root "meta-note"
16
+ root "meta-note", mixed: true
17
+
17
18
  map_attribute "id", to: :id
18
19
  map_attribute "content-type", to: :content_type
19
20
  map_element "p", to: :p
@@ -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 "custom_meta_group"
6
6
  require_relative "document_identification"
@@ -14,28 +14,29 @@ require_relative "title_wrap"
14
14
 
15
15
  module Sts
16
16
  module NisoSts
17
- class MetadataIso < Sts::Mapper
18
- attribute :comm_ref, Shale::Type::String
19
- attribute :content_language, Shale::Type::String
17
+ class MetadataIso < Lutaml::Model::Serializable
18
+ attribute :comm_ref, :string
19
+ attribute :content_language, :string
20
20
  attribute :custom_meta_group, CustomMetaGroup
21
21
  attribute :doc_ident, DocumentIdentification
22
- attribute :doc_ref, Shale::Type::String
23
- attribute :ics, Shale::Type::String
22
+ attribute :doc_ref, :string
23
+ attribute :ics, :string
24
24
  attribute :meta_date, MetaDate
25
25
  attribute :page_count, PageCount
26
26
  attribute :permissions, Permissions
27
- attribute :pub_date, Shale::Type::String
28
- attribute :release_date, Shale::Type::String
29
- attribute :secretariat, Shale::Type::String
27
+ attribute :pub_date, :string
28
+ attribute :release_date, :string
29
+ attribute :secretariat, :string
30
30
  attribute :std_ident, StandardIdentification
31
31
  attribute :std_ref, StandardRef
32
32
  attribute :std_xref, StdCrossReference
33
33
  attribute :title_wrap, TitleWrap
34
34
 
35
35
  xml do
36
- root "iso-meta"
36
+ root "iso-meta", mixed: true
37
37
 
38
- map_element "comm-ref", to: :comm_ref
38
+ map_element "comm-ref", to: :comm_ref,
39
+ value_map: { to: { empty: :empty } }
39
40
  map_element "content-language", to: :content_language
40
41
  map_element "custom-meta-group", to: :custom_meta_group
41
42
  map_element "doc-ident", to: :doc_ident
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
  require_relative "title_wrap"
5
5
  require_relative "document_identification"
6
6
  require_relative "standard_identification"
@@ -13,28 +13,28 @@ require_relative "permissions"
13
13
 
14
14
  module Sts
15
15
  module NisoSts
16
- class MetadataStd < Sts::Mapper
17
- attribute :id, Shale::Type::String
16
+ class MetadataStd < Lutaml::Model::Serializable
17
+ attribute :id, :string
18
18
  attribute :title_wrap, TitleWrap, collection: true
19
- attribute :content_language, Shale::Type::String
19
+ attribute :content_language, :string
20
20
  attribute :std_ident, StandardIdentification
21
21
  attribute :doc_ident, DocumentIdentification
22
22
  attribute :std_ref, StandardRef, collection: true
23
- attribute :doc_ref, Shale::Type::String
24
- attribute :pub_date, Shale::Type::String
25
- attribute :release_date, Shale::Type::String
26
- attribute :release_version, Shale::Type::String
27
- attribute :comm_ref, Shale::Type::String
28
- attribute :secretariat, Shale::Type::String
23
+ attribute :doc_ref, :string
24
+ attribute :pub_date, :string
25
+ attribute :release_date, :string
26
+ attribute :release_version, :string
27
+ attribute :comm_ref, :string
28
+ attribute :secretariat, :string
29
29
  attribute :page_count, PageCount
30
- attribute :ics, Shale::Type::String
30
+ attribute :ics, :string
31
31
  attribute :std_xref, StdCrossReference
32
32
  attribute :permissions, Permissions
33
33
  attribute :meta_note, MetaNote, collection: true
34
34
  attribute :custom_meta_group, CustomMetaGroup, collection: true
35
35
 
36
36
  xml do
37
- root "std-meta"
37
+ root "std-meta", mixed: true
38
38
 
39
39
  map_attribute "id", to: :id
40
40
 
@@ -47,8 +47,10 @@ module Sts
47
47
  map_element "pub-date", to: :pub_date
48
48
  map_element "release-date", to: :release_date
49
49
  map_element "release-version", to: :release_version
50
- map_element "comm-ref", to: :comm_ref, render_nil: true
51
- map_element "secretariat", to: :secretariat, render_nil: true
50
+ map_element "comm-ref", to: :comm_ref,
51
+ value_map: { to: { empty: :empty } }
52
+ map_element "secretariat", to: :secretariat,
53
+ value_map: { to: { empty: :empty } }
52
54
  map_element "page-count", to: :page_count
53
55
  map_element "ics", to: :ics
54
56
  map_element "std-xref", to: :std_xref
@@ -1,22 +1,22 @@
1
1
  # frozen_striing_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "ext_link"
6
6
  require_relative "reference_standard"
7
7
 
8
8
  module Sts
9
9
  module NisoSts
10
- class MixedCitation < Sts::Mapper
11
- attribute :content, Shale::Type::String
12
- attribute :bold, Shale::Type::String
13
- attribute :italic, Shale::Type::String
14
- attribute :publication_type, Shale::Type::String
15
- attribute :std, ReferenceStandard
10
+ class MixedCitation < Lutaml::Model::Serializable
11
+ attribute :content, :string
12
+ attribute :bold, :string
13
+ attribute :italic, :string
14
+ attribute :publication_type, :string
15
+ attribute :std, ReferenceStandard, collection: true
16
16
  attribute :ext_link, ExtLink
17
17
 
18
18
  xml do
19
- root "mixed-citation"
19
+ root "mixed-citation", mixed: true
20
20
 
21
21
  map_content to: :content
22
22
 
@@ -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 "paragraph"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class Paragraph < Sts::Mapper; end
9
+ class Paragraph < Lutaml::Model::Serializable; end
10
10
 
11
- class NonNormativeExample < Sts::Mapper
12
- attribute :id, Shale::Type::String
11
+ class NonNormativeExample < Lutaml::Model::Serializable
12
+ attribute :id, :string
13
13
  attribute :p, Paragraph
14
14
  attribute :label, Label
15
15
 
16
16
  xml do
17
- root "non-normative-example"
17
+ root "non-normative-example", mixed: true
18
18
 
19
19
  map_attribute "id", to: :id
20
20
  map_element "p", to: :p
@@ -1,19 +1,19 @@
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
 
7
7
  module Sts
8
8
  module NisoSts
9
- class NonNormativeNote < Sts::Mapper
10
- attribute :id, Shale::Type::String
11
- attribute :content_type, Shale::Type::String
9
+ class NonNormativeNote < Lutaml::Model::Serializable
10
+ attribute :id, :string
11
+ attribute :content_type, :string
12
12
  attribute :p, Paragraph
13
13
  attribute :label, Label
14
14
 
15
15
  xml do
16
- root "non-normative-note"
16
+ root "non-normative-note", mixed: true
17
17
 
18
18
  map_attribute "content-type", to: :content_type
19
19
  map_attribute "id", to: :id
@@ -4,13 +4,13 @@
4
4
  # <object-id pub-id-type="publisher-id">fig-1</object-id>
5
5
  # rubocop:enable Layout/LineLength
6
6
 
7
- require_relative "../mapper"
7
+ require "lutaml/model"
8
8
 
9
9
  module Sts
10
10
  module NisoSts
11
- class ObjectId < Sts::Mapper
12
- attribute :pub_id_type, Shale::Type::String
13
- attribute :content, Shale::Type::String
11
+ class ObjectId < Lutaml::Model::Serializable
12
+ attribute :pub_id_type, :string
13
+ attribute :content, :string
14
14
 
15
15
  xml do
16
16
  root "object-id"
@@ -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 PageCount < Sts::Mapper
8
- attribute :count, Shale::Type::Integer
7
+ class PageCount < Lutaml::Model::Serializable
8
+ attribute :count, :integer
9
9
 
10
10
  xml do
11
11
  root "page-count"