sts 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +471 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +27 -0
- data/lib/sts/niso_sts/adoption.rb +4 -4
- data/lib/sts/niso_sts/app.rb +8 -8
- data/lib/sts/niso_sts/app_group.rb +2 -2
- data/lib/sts/niso_sts/back.rb +2 -2
- data/lib/sts/niso_sts/body.rb +2 -2
- data/lib/sts/niso_sts/caption.rb +3 -3
- data/lib/sts/niso_sts/custom_meta.rb +5 -5
- data/lib/sts/niso_sts/custom_meta_group.rb +2 -2
- data/lib/sts/niso_sts/def.rb +2 -2
- data/lib/sts/niso_sts/def_item.rb +3 -3
- data/lib/sts/niso_sts/def_list.rb +5 -5
- data/lib/sts/niso_sts/display_formula.rb +3 -5
- data/lib/sts/niso_sts/document_identification.rb +8 -8
- data/lib/sts/niso_sts/ext_link.rb +5 -5
- data/lib/sts/niso_sts/figure.rb +6 -6
- data/lib/sts/niso_sts/fn.rb +3 -3
- data/lib/sts/niso_sts/fn_group.rb +2 -2
- data/lib/sts/niso_sts/front.rb +2 -2
- data/lib/sts/niso_sts/graphic.rb +3 -3
- data/lib/sts/niso_sts/inline_formula.rb +2 -4
- data/lib/sts/niso_sts/label.rb +3 -3
- data/lib/sts/niso_sts/list.rb +4 -6
- data/lib/sts/niso_sts/list_item.rb +4 -4
- data/lib/sts/niso_sts/meta_date.rb +4 -4
- data/lib/sts/niso_sts/meta_note.rb +7 -6
- data/lib/sts/niso_sts/metadata_iso.rb +10 -10
- data/lib/sts/niso_sts/metadata_std.rb +12 -12
- data/lib/sts/niso_sts/mixed_citation.rb +8 -8
- data/lib/sts/niso_sts/non_normative_example.rb +5 -5
- data/lib/sts/niso_sts/non_normative_note.rb +5 -5
- data/lib/sts/niso_sts/object_id.rb +4 -4
- data/lib/sts/niso_sts/page_count.rb +3 -3
- data/lib/sts/niso_sts/paragraph.rb +12 -12
- data/lib/sts/niso_sts/permissions.rb +5 -5
- data/lib/sts/niso_sts/reference.rb +3 -5
- data/lib/sts/niso_sts/reference_list.rb +5 -7
- data/lib/sts/niso_sts/reference_standard.rb +7 -7
- data/lib/sts/niso_sts/section.rb +8 -8
- data/lib/sts/niso_sts/section_array.rb +3 -3
- data/lib/sts/niso_sts/standard.rb +6 -8
- data/lib/sts/niso_sts/standard_identification.rb +9 -9
- data/lib/sts/niso_sts/standard_ref.rb +4 -4
- data/lib/sts/niso_sts/std_cross_reference.rb +3 -3
- data/lib/sts/niso_sts/std_id.rb +6 -6
- data/lib/sts/niso_sts/std_id_group.rb +2 -2
- data/lib/sts/niso_sts/term_display.rb +2 -2
- data/lib/sts/niso_sts/term_section.rb +5 -5
- data/lib/sts/niso_sts/title.rb +4 -4
- data/lib/sts/niso_sts/title_wrap.rb +11 -9
- data/lib/sts/tbx_iso_tml/bold.rb +3 -3
- data/lib/sts/tbx_iso_tml/caption.rb +3 -3
- data/lib/sts/tbx_iso_tml/col.rb +6 -6
- data/lib/sts/tbx_iso_tml/definition.rb +5 -7
- data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -6
- data/lib/sts/tbx_iso_tml/example.rb +6 -8
- data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -3
- data/lib/sts/tbx_iso_tml/external_source.rb +4 -4
- data/lib/sts/tbx_iso_tml/fn.rb +3 -5
- data/lib/sts/tbx_iso_tml/fn_group.rb +2 -2
- data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -3
- data/lib/sts/tbx_iso_tml/grammatical_gender.rb +4 -4
- data/lib/sts/tbx_iso_tml/grammatical_number.rb +4 -4
- data/lib/sts/tbx_iso_tml/italic.rb +5 -5
- data/lib/sts/tbx_iso_tml/lang_set.rb +9 -9
- data/lib/sts/tbx_iso_tml/math.rb +12 -12
- data/lib/sts/tbx_iso_tml/mfenced.rb +10 -10
- data/lib/sts/tbx_iso_tml/mfrac.rb +8 -8
- data/lib/sts/tbx_iso_tml/mi.rb +3 -3
- data/lib/sts/tbx_iso_tml/mrow.rb +11 -11
- data/lib/sts/tbx_iso_tml/mspace.rb +3 -3
- data/lib/sts/tbx_iso_tml/mstyle.rb +8 -8
- data/lib/sts/tbx_iso_tml/msub.rb +7 -7
- data/lib/sts/tbx_iso_tml/msup.rb +5 -5
- data/lib/sts/tbx_iso_tml/munder.rb +3 -3
- data/lib/sts/tbx_iso_tml/munderover.rb +5 -5
- data/lib/sts/tbx_iso_tml/named_content.rb +4 -4
- data/lib/sts/tbx_iso_tml/normative_authorization.rb +4 -4
- data/lib/sts/tbx_iso_tml/note.rb +8 -8
- data/lib/sts/tbx_iso_tml/part_of_speech.rb +4 -4
- data/lib/sts/tbx_iso_tml/see.rb +4 -4
- data/lib/sts/tbx_iso_tml/semantics.rb +6 -5
- data/lib/sts/tbx_iso_tml/source.rb +4 -6
- data/lib/sts/tbx_iso_tml/sup.rb +4 -6
- data/lib/sts/tbx_iso_tml/table.rb +6 -6
- data/lib/sts/tbx_iso_tml/table_break.rb +10 -0
- data/lib/sts/tbx_iso_tml/table_wrap.rb +6 -6
- data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -2
- data/lib/sts/tbx_iso_tml/tbody.rb +5 -5
- data/lib/sts/tbx_iso_tml/td.rb +17 -15
- data/lib/sts/tbx_iso_tml/term.rb +10 -10
- data/lib/sts/tbx_iso_tml/term_entry.rb +4 -4
- data/lib/sts/tbx_iso_tml/term_information_group.rb +6 -6
- data/lib/sts/tbx_iso_tml/term_type.rb +4 -12
- data/lib/sts/tbx_iso_tml/th.rb +17 -16
- data/lib/sts/tbx_iso_tml/thead.rb +6 -6
- data/lib/sts/tbx_iso_tml/tr.rb +2 -2
- data/lib/sts/tbx_iso_tml/xref.rb +5 -7
- data/lib/sts/version.rb +1 -1
- data/lib/sts.rb +6 -4
- data/sts.gemspec +4 -1
- metadata +22 -5
- 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"
|
6
4
|
|
7
5
|
module Sts
|
8
6
|
module NisoSts
|
9
|
-
class ReferenceList <
|
10
|
-
attribute :content_type,
|
11
|
-
attribute :id,
|
12
|
-
attribute :specific_use,
|
13
|
-
attribute :title,
|
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
|
14
12
|
attribute :label, Label
|
15
13
|
attribute :ref, Reference, collection: true
|
16
14
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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 <
|
12
|
-
attribute :type,
|
13
|
-
attribute :std_id,
|
14
|
-
attribute :content,
|
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,
|
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
|
data/lib/sts/niso_sts/section.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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 <
|
19
|
+
class Title < Lutaml::Model::Serializable; end
|
20
20
|
|
21
|
-
class Section <
|
22
|
-
attribute :id,
|
23
|
-
attribute :specific_use,
|
21
|
+
class Section < Lutaml::Model::Serializable
|
22
|
+
attribute :id, Lutaml::Model::Type::String
|
23
|
+
attribute :specific_use, Lutaml::Model::Type::String
|
24
24
|
attribute :label, Label
|
25
25
|
attribute :title, Title
|
26
|
-
attribute :type,
|
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
|
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
|
-
|
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 <
|
10
|
-
attribute :id,
|
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 <
|
9
|
+
class Standard < Lutaml::Model::Serializable
|
12
10
|
attribute :front, Front
|
13
11
|
attribute :body, Body
|
14
12
|
attribute :back, Back
|
15
|
-
attribute :id,
|
16
|
-
attribute :lang,
|
17
|
-
attribute :mml,
|
18
|
-
attribute :tbx,
|
19
|
-
attribute :xlink,
|
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
|
-
|
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 <
|
10
|
-
attribute :originator,
|
11
|
-
attribute :doc_type,
|
12
|
-
attribute :doc_number,
|
13
|
-
attribute :edition,
|
14
|
-
attribute :version,
|
15
|
-
attribute :part_number,
|
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-
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module NisoSts
|
7
|
-
class StandardRef <
|
8
|
-
attribute :type,
|
9
|
-
attribute :value,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module NisoSts
|
7
|
-
class StdCrossReference <
|
8
|
-
attribute :type,
|
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
|
data/lib/sts/niso_sts/std_id.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module NisoSts
|
7
|
-
class StdId <
|
8
|
-
attribute :std_id_link_type,
|
9
|
-
attribute :std_id_type,
|
10
|
-
attribute :specific_use,
|
11
|
-
attribute :content,
|
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
|
-
|
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 <
|
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
|
-
|
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 <
|
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
|
-
|
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 <
|
12
|
-
attribute :id,
|
13
|
-
attribute :sec_type,
|
11
|
+
class TermSection < Lutaml::Model::Serializable
|
12
|
+
attribute :id, Lutaml::Model::Type::String
|
13
|
+
attribute :sec_type, Lutaml::Model::Type::String
|
14
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
|
|
data/lib/sts/niso_sts/title.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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 <
|
11
|
-
attribute :content,
|
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
|
-
|
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 <
|
11
|
-
attribute :content,
|
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 <
|
30
|
-
attribute :intro,
|
31
|
-
attribute :main,
|
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,
|
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"
|
data/lib/sts/tbx_iso_tml/bold.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class Bold <
|
8
|
-
attribute :value,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class Caption <
|
8
|
-
attribute :p,
|
7
|
+
class Caption < Lutaml::Model::Serializable
|
8
|
+
attribute :p, Lutaml::Model::Type::String
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "caption"
|
data/lib/sts/tbx_iso_tml/col.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class Col <
|
8
|
-
attribute :width,
|
9
|
-
attribute :char,
|
10
|
-
attribute :charoff,
|
11
|
-
attribute :span,
|
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 <
|
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,
|
15
|
+
attribute :value, Lutaml::Model::Type::String
|
18
16
|
attribute :italic, Italic
|
19
17
|
attribute :math, Sts::TbxIsoTml::Math
|
20
|
-
attribute :sub,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class EntailedTerm <
|
8
|
-
attribute :target,
|
9
|
-
attribute :xtarget,
|
10
|
-
attribute :lang,
|
11
|
-
attribute :value,
|
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 "
|
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 <
|
13
|
-
attribute :id,
|
14
|
-
attribute :value,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class ExternalGraphic <
|
8
|
-
attribute :target,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class ExternalSource <
|
8
|
-
attribute :target,
|
9
|
-
attribute :value,
|
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"
|
data/lib/sts/tbx_iso_tml/fn.rb
CHANGED
@@ -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 <
|
10
|
-
attribute :id,
|
11
|
-
attribute :label,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "fn"
|
6
6
|
|
7
7
|
module Sts
|
8
8
|
module TbxIsoTml
|
9
|
-
class FnGroup <
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class GeographicalUsage <
|
8
|
-
attribute :value,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class GrammaticalGender <
|
8
|
-
|
9
|
-
|
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"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class GrammaticalNumber <
|
8
|
-
|
9
|
-
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module Sts
|
6
6
|
module TbxIsoTml
|
7
|
-
class Italic <
|
8
|
-
attribute :value,
|
9
|
-
attribute :sub,
|
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
|