tbx 0.1.0
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.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +15 -0
- data/.github/workflows/release.yml +29 -0
- data/.gitignore +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +17 -0
- data/.rubocop_todo.yml +16 -0
- data/CHANGELOG.md +5 -0
- data/CLAUDE.md +124 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/Gemfile +15 -0
- data/README.adoc +156 -0
- data/Rakefile +12 -0
- data/lib/tbx/admin.rb +35 -0
- data/lib/tbx/admin_grp.rb +25 -0
- data/lib/tbx/admin_note.rb +25 -0
- data/lib/tbx/back.rb +17 -0
- data/lib/tbx/body.rb +17 -0
- data/lib/tbx/change.rb +19 -0
- data/lib/tbx/concept_entry.rb +33 -0
- data/lib/tbx/date.rb +16 -0
- data/lib/tbx/descrip.rb +35 -0
- data/lib/tbx/descrip_grp.rb +31 -0
- data/lib/tbx/descrip_note.rb +25 -0
- data/lib/tbx/document.rb +23 -0
- data/lib/tbx/ec.rb +28 -0
- data/lib/tbx/encoding_desc.rb +17 -0
- data/lib/tbx/file_desc.rb +21 -0
- data/lib/tbx/foreign.rb +29 -0
- data/lib/tbx/hi.rb +19 -0
- data/lib/tbx/item.rb +29 -0
- data/lib/tbx/item_grp.rb +29 -0
- data/lib/tbx/item_set.rb +21 -0
- data/lib/tbx/lang_sec.rb +33 -0
- data/lib/tbx/namespaces.rb +9 -0
- data/lib/tbx/note.rb +29 -0
- data/lib/tbx/p.rb +31 -0
- data/lib/tbx/ph.rb +14 -0
- data/lib/tbx/publication_stmt.rb +17 -0
- data/lib/tbx/ref.rb +25 -0
- data/lib/tbx/ref_object.rb +21 -0
- data/lib/tbx/ref_object_sec.rb +19 -0
- data/lib/tbx/revision_desc.rb +19 -0
- data/lib/tbx/sc.rb +22 -0
- data/lib/tbx/source_desc.rb +19 -0
- data/lib/tbx/tbx_header.rb +21 -0
- data/lib/tbx/term.rb +19 -0
- data/lib/tbx/term_note.rb +35 -0
- data/lib/tbx/term_note_grp.rb +29 -0
- data/lib/tbx/term_sec.rb +37 -0
- data/lib/tbx/text_element.rb +19 -0
- data/lib/tbx/title.rb +19 -0
- data/lib/tbx/title_stmt.rb +21 -0
- data/lib/tbx/transac.rb +25 -0
- data/lib/tbx/transac_grp.rb +27 -0
- data/lib/tbx/transac_note.rb +25 -0
- data/lib/tbx/version.rb +5 -0
- data/lib/tbx/xref.rb +21 -0
- data/lib/tbx.rb +67 -0
- data/reference-docs/schemas/TBX-Basic_DCA.sch +142 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/Example_Astronomy_DCA_VALID.tbx +4032 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/TBX-Basic_DCA.sch +142 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/Example_Astronomy_DCT_VALID.tbx +4021 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic.nvdl +33 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic_DCT.sch +48 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.rng +164 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.sch +60 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.tbxmd +125 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.rng +77 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.sch +24 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.tbxmd +42 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.pdf +0 -0
- data/reference-docs/schemas/TBX_core.xsd +534 -0
- data/reference-docs/schemas/TBXcoreStructV03.rng +713 -0
- data/tbx.gemspec +35 -0
- metadata +140 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class DescripGrp < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :descrip, ::Tbx::Descrip
|
|
7
|
+
attribute :admin, ::Tbx::Admin, collection: true
|
|
8
|
+
attribute :admin_grp, ::Tbx::AdminGrp, collection: true
|
|
9
|
+
attribute :descrip_note, ::Tbx::DescripNote, collection: true
|
|
10
|
+
attribute :note, ::Tbx::Note, collection: true
|
|
11
|
+
attribute :ref, ::Tbx::Ref, collection: true
|
|
12
|
+
attribute :transac_grp, ::Tbx::TransacGrp, collection: true
|
|
13
|
+
attribute :xref, ::Tbx::Xref, collection: true
|
|
14
|
+
|
|
15
|
+
xml do
|
|
16
|
+
root "descripGrp"
|
|
17
|
+
mixed_content
|
|
18
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
19
|
+
|
|
20
|
+
map_attribute "id", to: :id
|
|
21
|
+
map_element "descrip", to: :descrip
|
|
22
|
+
map_element "admin", to: :admin
|
|
23
|
+
map_element "adminGrp", to: :admin_grp
|
|
24
|
+
map_element "descripNote", to: :descrip_note
|
|
25
|
+
map_element "note", to: :note
|
|
26
|
+
map_element "ref", to: :ref
|
|
27
|
+
map_element "transacGrp", to: :transac_grp
|
|
28
|
+
map_element "xref", to: :xref
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class DescripNote < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :target, :string
|
|
8
|
+
attribute :datatype, :string
|
|
9
|
+
attribute :type, :string
|
|
10
|
+
attribute :content, :string, collection: true
|
|
11
|
+
|
|
12
|
+
xml do
|
|
13
|
+
root "descripNote"
|
|
14
|
+
mixed_content
|
|
15
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
16
|
+
|
|
17
|
+
map_attribute "id", to: :id
|
|
18
|
+
w3c_attributes :lang
|
|
19
|
+
map_attribute "target", to: :target
|
|
20
|
+
map_attribute "datatype", to: :datatype
|
|
21
|
+
map_attribute "type", to: :type
|
|
22
|
+
map_content to: :content
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/tbx/document.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Document < Lutaml::Model::Serializable
|
|
5
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :style, :string
|
|
8
|
+
attribute :tbx_header, ::Tbx::TbxHeader
|
|
9
|
+
attribute :text, ::Tbx::TextElement
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
root "tbx"
|
|
13
|
+
mixed_content
|
|
14
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
15
|
+
|
|
16
|
+
w3c_attributes :lang
|
|
17
|
+
map_attribute "type", to: :type
|
|
18
|
+
map_attribute "style", to: :style
|
|
19
|
+
map_element "tbxHeader", to: :tbx_header
|
|
20
|
+
map_element "text", to: :text
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/tbx/ec.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Ec < Lutaml::Model::Serializable
|
|
5
|
+
attribute :start_ref, :string
|
|
6
|
+
attribute :isolated, :string
|
|
7
|
+
attribute :disp, :string
|
|
8
|
+
attribute :equiv, :string
|
|
9
|
+
attribute :id, :string
|
|
10
|
+
attribute :type, :string
|
|
11
|
+
attribute :subtype, :string
|
|
12
|
+
attribute :target, :string
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "ec"
|
|
16
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
17
|
+
|
|
18
|
+
map_attribute "startRef", to: :start_ref
|
|
19
|
+
map_attribute "isolated", to: :isolated
|
|
20
|
+
map_attribute "disp", to: :disp
|
|
21
|
+
map_attribute "equiv", to: :equiv
|
|
22
|
+
map_attribute "id", to: :id
|
|
23
|
+
map_attribute "type", to: :type
|
|
24
|
+
map_attribute "subtype", to: :subtype
|
|
25
|
+
map_attribute "target", to: :target
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class EncodingDesc < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :p, ::Tbx::P, collection: true
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
root "encodingDesc"
|
|
10
|
+
mixed_content
|
|
11
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
12
|
+
|
|
13
|
+
map_attribute "id", to: :id
|
|
14
|
+
map_element "p", to: :p
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class FileDesc < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :publication_stmt, ::Tbx::PublicationStmt
|
|
7
|
+
attribute :title_stmt, ::Tbx::TitleStmt
|
|
8
|
+
attribute :source_desc, ::Tbx::SourceDesc
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "fileDesc"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_element "publicationStmt", to: :publication_stmt
|
|
17
|
+
map_element "titleStmt", to: :title_stmt
|
|
18
|
+
map_element "sourceDesc", to: :source_desc
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/tbx/foreign.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Foreign < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :content, :string, collection: true
|
|
8
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
9
|
+
attribute :ec, ::Tbx::Ec, collection: true
|
|
10
|
+
attribute :foreign, ::Tbx::Foreign, collection: true
|
|
11
|
+
attribute :ph, ::Tbx::Ph, collection: true
|
|
12
|
+
attribute :sc, ::Tbx::Sc, collection: true
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "foreign"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
18
|
+
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
w3c_attributes :lang
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "hi", to: :hi
|
|
23
|
+
map_element "ec", to: :ec
|
|
24
|
+
map_element "foreign", to: :foreign
|
|
25
|
+
map_element "ph", to: :ph
|
|
26
|
+
map_element "sc", to: :sc
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/tbx/hi.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Hi < Lutaml::Model::Serializable
|
|
5
|
+
attribute :target, :string
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :content, :string, collection: true
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "hi"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
13
|
+
|
|
14
|
+
map_attribute "target", to: :target
|
|
15
|
+
map_attribute "type", to: :type
|
|
16
|
+
map_content to: :content
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/tbx/item.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Item < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :content, :string, collection: true
|
|
8
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
9
|
+
attribute :ec, ::Tbx::Ec, collection: true
|
|
10
|
+
attribute :foreign, ::Tbx::Foreign, collection: true
|
|
11
|
+
attribute :ph, ::Tbx::Ph, collection: true
|
|
12
|
+
attribute :sc, ::Tbx::Sc, collection: true
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "item"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
18
|
+
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
map_attribute "type", to: :type
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "hi", to: :hi
|
|
23
|
+
map_element "ec", to: :ec
|
|
24
|
+
map_element "foreign", to: :foreign
|
|
25
|
+
map_element "ph", to: :ph
|
|
26
|
+
map_element "sc", to: :sc
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/tbx/item_grp.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class ItemGrp < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :item, ::Tbx::Item
|
|
7
|
+
attribute :admin, ::Tbx::Admin, collection: true
|
|
8
|
+
attribute :admin_grp, ::Tbx::AdminGrp, collection: true
|
|
9
|
+
attribute :note, ::Tbx::Note, collection: true
|
|
10
|
+
attribute :ref, ::Tbx::Ref, collection: true
|
|
11
|
+
attribute :transac_grp, ::Tbx::TransacGrp, collection: true
|
|
12
|
+
attribute :xref, ::Tbx::Xref, collection: true
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "itemGrp"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
18
|
+
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
map_element "item", to: :item
|
|
21
|
+
map_element "admin", to: :admin
|
|
22
|
+
map_element "adminGrp", to: :admin_grp
|
|
23
|
+
map_element "note", to: :note
|
|
24
|
+
map_element "ref", to: :ref
|
|
25
|
+
map_element "transacGrp", to: :transac_grp
|
|
26
|
+
map_element "xref", to: :xref
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/tbx/item_set.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class ItemSet < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :item_grp, ::Tbx::ItemGrp, collection: true
|
|
8
|
+
attribute :item, ::Tbx::Item, collection: true
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "itemSet"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_attribute "type", to: :type
|
|
17
|
+
map_element "itemGrp", to: :item_grp
|
|
18
|
+
map_element "item", to: :item
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/tbx/lang_sec.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class LangSec < Lutaml::Model::Serializable
|
|
5
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
6
|
+
attribute :admin, ::Tbx::Admin, collection: true
|
|
7
|
+
attribute :admin_grp, ::Tbx::AdminGrp, collection: true
|
|
8
|
+
attribute :descrip, ::Tbx::Descrip, collection: true
|
|
9
|
+
attribute :descrip_grp, ::Tbx::DescripGrp, collection: true
|
|
10
|
+
attribute :note, ::Tbx::Note, collection: true
|
|
11
|
+
attribute :ref, ::Tbx::Ref, collection: true
|
|
12
|
+
attribute :transac_grp, ::Tbx::TransacGrp, collection: true
|
|
13
|
+
attribute :xref, ::Tbx::Xref, collection: true
|
|
14
|
+
attribute :term_sec, ::Tbx::TermSec, collection: true
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
root "langSec"
|
|
18
|
+
mixed_content
|
|
19
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
20
|
+
|
|
21
|
+
w3c_attributes :lang
|
|
22
|
+
map_element "admin", to: :admin
|
|
23
|
+
map_element "adminGrp", to: :admin_grp
|
|
24
|
+
map_element "descrip", to: :descrip
|
|
25
|
+
map_element "descripGrp", to: :descrip_grp
|
|
26
|
+
map_element "note", to: :note
|
|
27
|
+
map_element "ref", to: :ref
|
|
28
|
+
map_element "transacGrp", to: :transac_grp
|
|
29
|
+
map_element "xref", to: :xref
|
|
30
|
+
map_element "termSec", to: :term_sec
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/tbx/note.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Note < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :content, :string, collection: true
|
|
8
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
9
|
+
attribute :ec, ::Tbx::Ec, collection: true
|
|
10
|
+
attribute :foreign, ::Tbx::Foreign, collection: true
|
|
11
|
+
attribute :ph, ::Tbx::Ph, collection: true
|
|
12
|
+
attribute :sc, ::Tbx::Sc, collection: true
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "note"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
18
|
+
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
w3c_attributes :lang
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "hi", to: :hi
|
|
23
|
+
map_element "ec", to: :ec
|
|
24
|
+
map_element "foreign", to: :foreign
|
|
25
|
+
map_element "ph", to: :ph
|
|
26
|
+
map_element "sc", to: :sc
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/tbx/p.rb
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class P < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :type, :string
|
|
8
|
+
attribute :content, :string, collection: true
|
|
9
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
10
|
+
attribute :ec, ::Tbx::Ec, collection: true
|
|
11
|
+
attribute :foreign, ::Tbx::Foreign, collection: true
|
|
12
|
+
attribute :ph, ::Tbx::Ph, collection: true
|
|
13
|
+
attribute :sc, ::Tbx::Sc, collection: true
|
|
14
|
+
|
|
15
|
+
xml do
|
|
16
|
+
root "p"
|
|
17
|
+
mixed_content
|
|
18
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
19
|
+
|
|
20
|
+
map_attribute "id", to: :id
|
|
21
|
+
w3c_attributes :lang
|
|
22
|
+
map_attribute "type", to: :type
|
|
23
|
+
map_content to: :content
|
|
24
|
+
map_element "hi", to: :hi
|
|
25
|
+
map_element "ec", to: :ec
|
|
26
|
+
map_element "foreign", to: :foreign
|
|
27
|
+
map_element "ph", to: :ph
|
|
28
|
+
map_element "sc", to: :sc
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/lib/tbx/ph.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class PublicationStmt < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :p, ::Tbx::P, collection: true
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
root "publicationStmt"
|
|
10
|
+
mixed_content
|
|
11
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
12
|
+
|
|
13
|
+
map_attribute "id", to: :id
|
|
14
|
+
map_element "p", to: :p
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/tbx/ref.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Ref < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :target, :string
|
|
8
|
+
attribute :datatype, :string
|
|
9
|
+
attribute :type, :string
|
|
10
|
+
attribute :content, :string, collection: true
|
|
11
|
+
|
|
12
|
+
xml do
|
|
13
|
+
root "ref"
|
|
14
|
+
mixed_content
|
|
15
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
16
|
+
|
|
17
|
+
map_attribute "id", to: :id
|
|
18
|
+
w3c_attributes :lang
|
|
19
|
+
map_attribute "target", to: :target
|
|
20
|
+
map_attribute "datatype", to: :datatype
|
|
21
|
+
map_attribute "type", to: :type
|
|
22
|
+
map_content to: :content
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class RefObject < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :item_set, ::Tbx::ItemSet, collection: true
|
|
7
|
+
attribute :item_grp, ::Tbx::ItemGrp, collection: true
|
|
8
|
+
attribute :item, ::Tbx::Item, collection: true
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "refObject"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_element "itemSet", to: :item_set
|
|
17
|
+
map_element "itemGrp", to: :item_grp
|
|
18
|
+
map_element "item", to: :item
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class RefObjectSec < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :ref_object, ::Tbx::RefObject, collection: true
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "refObjectSec"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
13
|
+
|
|
14
|
+
map_attribute "id", to: :id
|
|
15
|
+
map_attribute "type", to: :type
|
|
16
|
+
map_element "refObject", to: :ref_object
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class RevisionDesc < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :change, ::Tbx::Change, collection: true
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "revisionDesc"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
13
|
+
|
|
14
|
+
map_attribute "id", to: :id
|
|
15
|
+
w3c_attributes :lang
|
|
16
|
+
map_element "change", to: :change
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/tbx/sc.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Sc < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :isolated, :string
|
|
7
|
+
attribute :type, :string
|
|
8
|
+
attribute :subtype, :string
|
|
9
|
+
attribute :target, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
root "sc"
|
|
13
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_attribute "isolated", to: :isolated
|
|
17
|
+
map_attribute "type", to: :type
|
|
18
|
+
map_attribute "subtype", to: :subtype
|
|
19
|
+
map_attribute "target", to: :target
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class SourceDesc < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :p, ::Tbx::P, collection: true
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "sourceDesc"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
13
|
+
|
|
14
|
+
map_attribute "id", to: :id
|
|
15
|
+
w3c_attributes :lang
|
|
16
|
+
map_element "p", to: :p
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class TbxHeader < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :file_desc, ::Tbx::FileDesc
|
|
7
|
+
attribute :encoding_desc, ::Tbx::EncodingDesc
|
|
8
|
+
attribute :revision_desc, ::Tbx::RevisionDesc
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "tbxHeader"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_element "fileDesc", to: :file_desc
|
|
17
|
+
map_element "encodingDesc", to: :encoding_desc
|
|
18
|
+
map_element "revisionDesc", to: :revision_desc
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/tbx/term.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class Term < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :content, :string, collection: true
|
|
7
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "term"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
13
|
+
|
|
14
|
+
map_attribute "id", to: :id
|
|
15
|
+
map_content to: :content
|
|
16
|
+
map_element "hi", to: :hi
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class TermNote < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :target, :string
|
|
8
|
+
attribute :datatype, :string
|
|
9
|
+
attribute :type, :string
|
|
10
|
+
attribute :content, :string, collection: true
|
|
11
|
+
attribute :hi, ::Tbx::Hi, collection: true
|
|
12
|
+
attribute :ec, ::Tbx::Ec, collection: true
|
|
13
|
+
attribute :foreign, ::Tbx::Foreign, collection: true
|
|
14
|
+
attribute :ph, ::Tbx::Ph, collection: true
|
|
15
|
+
attribute :sc, ::Tbx::Sc, collection: true
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
root "termNote"
|
|
19
|
+
mixed_content
|
|
20
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
21
|
+
|
|
22
|
+
map_attribute "id", to: :id
|
|
23
|
+
w3c_attributes :lang
|
|
24
|
+
map_attribute "target", to: :target
|
|
25
|
+
map_attribute "datatype", to: :datatype
|
|
26
|
+
map_attribute "type", to: :type
|
|
27
|
+
map_content to: :content
|
|
28
|
+
map_element "hi", to: :hi
|
|
29
|
+
map_element "ec", to: :ec
|
|
30
|
+
map_element "foreign", to: :foreign
|
|
31
|
+
map_element "ph", to: :ph
|
|
32
|
+
map_element "sc", to: :sc
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tbx
|
|
4
|
+
class TermNoteGrp < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :term_note, ::Tbx::TermNote
|
|
7
|
+
attribute :admin, ::Tbx::Admin, collection: true
|
|
8
|
+
attribute :admin_grp, ::Tbx::AdminGrp, collection: true
|
|
9
|
+
attribute :note, ::Tbx::Note, collection: true
|
|
10
|
+
attribute :ref, ::Tbx::Ref, collection: true
|
|
11
|
+
attribute :transac_grp, ::Tbx::TransacGrp, collection: true
|
|
12
|
+
attribute :xref, ::Tbx::Xref, collection: true
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
root "termNoteGrp"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Tbx::Namespaces::TbxNamespace
|
|
18
|
+
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
map_element "termNote", to: :term_note
|
|
21
|
+
map_element "admin", to: :admin
|
|
22
|
+
map_element "adminGrp", to: :admin_grp
|
|
23
|
+
map_element "note", to: :note
|
|
24
|
+
map_element "ref", to: :ref
|
|
25
|
+
map_element "transacGrp", to: :transac_grp
|
|
26
|
+
map_element "xref", to: :xref
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|