loc_mods 0.2.3 → 0.2.5

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/.rubocop_todo.yml +83 -0
  4. data/README.adoc +48 -6
  5. data/lib/loc_mods/abstract.rb +9 -9
  6. data/lib/loc_mods/access_condition.rb +11 -11
  7. data/lib/loc_mods/alternative_name.rb +10 -10
  8. data/lib/loc_mods/area.rb +3 -3
  9. data/lib/loc_mods/cartographic_extension.rb +4 -4
  10. data/lib/loc_mods/cartographics.rb +8 -8
  11. data/lib/loc_mods/city_section.rb +3 -3
  12. data/lib/loc_mods/classification.rb +8 -8
  13. data/lib/loc_mods/cli.rb +48 -80
  14. data/lib/loc_mods/collection.rb +3 -3
  15. data/lib/loc_mods/copy_information.rb +5 -5
  16. data/lib/loc_mods/date.rb +8 -8
  17. data/lib/loc_mods/date_other.rb +4 -4
  18. data/lib/loc_mods/detail.rb +7 -7
  19. data/lib/loc_mods/edition.rb +4 -4
  20. data/lib/loc_mods/enumeration_and_chronology.rb +4 -4
  21. data/lib/loc_mods/extent.rb +4 -4
  22. data/lib/loc_mods/extent_definition.rb +7 -7
  23. data/lib/loc_mods/form.rb +5 -5
  24. data/lib/loc_mods/genre.rb +8 -8
  25. data/lib/loc_mods/geographic_code.rb +6 -6
  26. data/lib/loc_mods/hierarchical_geographic.rb +6 -6
  27. data/lib/loc_mods/hierarchical_part.rb +8 -8
  28. data/lib/loc_mods/holding_simple.rb +2 -2
  29. data/lib/loc_mods/identifier.rb +8 -8
  30. data/lib/loc_mods/item_identifier.rb +4 -4
  31. data/lib/loc_mods/language.rb +9 -9
  32. data/lib/loc_mods/language_term.rb +7 -7
  33. data/lib/loc_mods/location.rb +8 -8
  34. data/lib/loc_mods/name.rb +19 -19
  35. data/lib/loc_mods/name_part.rb +4 -4
  36. data/lib/loc_mods/non_sort.rb +4 -4
  37. data/lib/loc_mods/note.rb +7 -7
  38. data/lib/loc_mods/occupation.rb +6 -6
  39. data/lib/loc_mods/origin_info.rb +10 -10
  40. data/lib/loc_mods/part.rb +10 -10
  41. data/lib/loc_mods/physical_description.rb +10 -10
  42. data/lib/loc_mods/physical_description_note.rb +7 -7
  43. data/lib/loc_mods/physical_location.rb +5 -5
  44. data/lib/loc_mods/place.rb +3 -3
  45. data/lib/loc_mods/place_term.rb +7 -7
  46. data/lib/loc_mods/publisher.rb +6 -6
  47. data/lib/loc_mods/record.rb +4 -4
  48. data/lib/loc_mods/record_content_source.rb +4 -4
  49. data/lib/loc_mods/record_identifier.rb +4 -4
  50. data/lib/loc_mods/record_info.rb +9 -9
  51. data/lib/loc_mods/record_info_note.rb +8 -8
  52. data/lib/loc_mods/region.rb +3 -3
  53. data/lib/loc_mods/related_item.rb +10 -10
  54. data/lib/loc_mods/role.rb +2 -2
  55. data/lib/loc_mods/role_term.rb +4 -4
  56. data/lib/loc_mods/script_term.rb +4 -4
  57. data/lib/loc_mods/string_plus_language.rb +6 -6
  58. data/lib/loc_mods/string_plus_language_plus_authority.rb +6 -6
  59. data/lib/loc_mods/string_plus_language_plus_supplied.rb +4 -4
  60. data/lib/loc_mods/subject.rb +15 -15
  61. data/lib/loc_mods/subject_name.rb +14 -14
  62. data/lib/loc_mods/subject_title_info.rb +16 -16
  63. data/lib/loc_mods/table_of_contents.rb +9 -9
  64. data/lib/loc_mods/target_audience.rb +5 -5
  65. data/lib/loc_mods/temporal.rb +5 -5
  66. data/lib/loc_mods/text.rb +5 -5
  67. data/lib/loc_mods/title_info.rb +22 -22
  68. data/lib/loc_mods/type_of_resource.rb +8 -8
  69. data/lib/loc_mods/url.rb +8 -8
  70. data/lib/loc_mods/version.rb +1 -1
  71. data/lib/loc_mods.rb +7 -6
  72. data/references/allrecords-MODS.xml +1 -1
  73. metadata +5 -6
  74. data/lib/loc_mods/base_mapper.rb +0 -26
  75. data/lib/loc_mods/comparable_mapper.rb +0 -110
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class Publisher < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :authority, Shale::Type::String
9
- attribute :authority_uri, Shale::Type::Value
10
- attribute :value_uri, Shale::Type::Value
6
+ class Publisher < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :authority, :string
9
+ attribute :authority_uri, :string
10
+ attribute :value_uri, :string
11
11
 
12
12
  xml do
13
13
  root "publisher"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "abstract"
6
6
  require_relative "access_condition"
@@ -24,9 +24,9 @@ require_relative "title_info"
24
24
  require_relative "type_of_resource"
25
25
 
26
26
  module LocMods
27
- class Record < BaseMapper
28
- attribute :id, Shale::Type::Value
29
- attribute :version, Shale::Type::String
27
+ class Record < Lutaml::Model::Serializable
28
+ attribute :id, :string
29
+ attribute :version, :string
30
30
  attribute :abstract, Abstract, collection: true
31
31
  attribute :access_condition, AccessCondition, collection: true
32
32
  attribute :classification, Classification, collection: true
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class RecordContentSource < BaseMapper
7
- attribute :authority, Shale::Type::String
8
- attribute :content, Shale::Type::String
6
+ class RecordContentSource < Lutaml::Model::Serializable
7
+ attribute :authority, :string
8
+ attribute :content, :string
9
9
 
10
10
  xml do
11
11
  root "RecordContentSource"
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class RecordIdentifier < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :source, Shale::Type::String
6
+ class RecordIdentifier < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :source, :string
9
9
 
10
10
  xml do
11
11
  root "recordIdentifier"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "date"
6
6
  require_relative "language"
@@ -9,19 +9,19 @@ require_relative "record_identifier"
9
9
  require_relative "record_content_source"
10
10
 
11
11
  module LocMods
12
- class RecordInfo < BaseMapper
13
- attribute :lang, Shale::Type::String
14
- attribute :script, Shale::Type::String
15
- attribute :transliteration, Shale::Type::String
16
- attribute :display_label, Shale::Type::String
17
- attribute :alt_rep_group, Shale::Type::String
12
+ class RecordInfo < Lutaml::Model::Serializable
13
+ attribute :lang, :string
14
+ attribute :script, :string
15
+ attribute :transliteration, :string
16
+ attribute :display_label, :string
17
+ attribute :alt_rep_group, :string
18
18
  attribute :record_content_source, RecordContentSource, collection: true
19
19
  attribute :record_creation_date, Date, collection: true
20
20
  attribute :record_change_date, Date, collection: true
21
21
  attribute :record_identifier, RecordIdentifier, collection: true
22
22
  attribute :language_of_cataloging, Language, collection: true
23
- attribute :record_origin, Shale::Type::String, collection: true
24
- attribute :description_standard, Shale::Type::String, collection: true
23
+ attribute :record_origin, :string, collection: true
24
+ attribute :description_standard, :string, collection: true
25
25
  attribute :record_info_note, RecordInfoNote, collection: true
26
26
 
27
27
  xml do
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class RecordInfoNote < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :display_label, Shale::Type::String
9
- attribute :type, Shale::Type::String
10
- attribute :type_uri, Shale::Type::Value
11
- attribute :id, Shale::Type::Value
12
- attribute :alt_rep_group, Shale::Type::String
6
+ class RecordInfoNote < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :display_label, :string
9
+ attribute :type, :string
10
+ attribute :type_uri, :string
11
+ attribute :id, :string
12
+ attribute :alt_rep_group, :string
13
13
 
14
14
  xml do
15
15
  root "recordInfoNote"
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "hierarchical_part"
6
6
 
7
7
  module LocMods
8
- class Region < BaseMapper
8
+ class Region < Lutaml::Model::Serializable
9
9
  attribute :content, HierarchicalPart
10
- attribute :region_type, Shale::Type::Value
10
+ attribute :region_type, :string
11
11
 
12
12
  xml do
13
13
  root "region"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "abstract"
6
6
  require_relative "access_condition"
@@ -23,14 +23,14 @@ require_relative "title_info"
23
23
  require_relative "type_of_resource"
24
24
 
25
25
  module LocMods
26
- class RelatedItem < BaseMapper
27
- attribute :type, Shale::Type::String
28
- attribute :other_type, Shale::Type::String
29
- attribute :other_type_auth, Shale::Type::String
30
- attribute :other_type_auth_uri, Shale::Type::String
31
- attribute :other_type_uri, Shale::Type::String
32
- attribute :display_label, Shale::Type::String
33
- attribute :id, Shale::Type::Value
26
+ class RelatedItem < Lutaml::Model::Serializable
27
+ attribute :type, :string
28
+ attribute :other_type, :string
29
+ attribute :other_type_auth, :string
30
+ attribute :other_type_auth_uri, :string
31
+ attribute :other_type_uri, :string
32
+ attribute :display_label, :string
33
+ attribute :id, :string
34
34
  attribute :abstract, Abstract, collection: true
35
35
  attribute :access_condition, AccessCondition, collection: true
36
36
  attribute :classification, Classification, collection: true
@@ -51,7 +51,7 @@ module LocMods
51
51
  attribute :target_audience, TargetAudience, collection: true
52
52
  attribute :title_info, TitleInfo, collection: true
53
53
  attribute :type_of_resource, TypeOfResource, collection: true
54
- attribute :href, Shale::Type::String
54
+ attribute :href, :string
55
55
 
56
56
  xml do
57
57
  root "relatedItem"
data/lib/loc_mods/role.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "role_term"
6
6
 
7
7
  module LocMods
8
- class Role < BaseMapper
8
+ class Role < Lutaml::Model::Serializable
9
9
  attribute :role_term, RoleTerm, collection: true
10
10
 
11
11
  xml do
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class RoleTerm < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :type, Shale::Type::String
6
+ class RoleTerm < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :type, :string
9
9
 
10
10
  xml do
11
11
  root "roleTerm"
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class ScriptTerm < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :type, Shale::Type::String
6
+ class ScriptTerm < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :type, :string
9
9
 
10
10
  xml do
11
11
  root "scriptTerm"
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class StringPlusLanguage < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :lang, Shale::Type::String
9
- attribute :script, Shale::Type::String
10
- attribute :transliteration, Shale::Type::String
6
+ class StringPlusLanguage < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :lang, :string
9
+ attribute :script, :string
10
+ attribute :transliteration, :string
11
11
 
12
12
  xml do
13
13
  root "nonSort"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class StringPlusLanguagePlusAuthority < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :authority, Shale::Type::String
9
- attribute :authority_uri, Shale::Type::Value
10
- attribute :value_uri, Shale::Type::Value
6
+ class StringPlusLanguagePlusAuthority < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :authority, :string
9
+ attribute :authority_uri, :string
10
+ attribute :value_uri, :string
11
11
  end
12
12
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class StringPlusLanguagePlusSupplied < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :supplied, Shale::Type::Value
6
+ class StringPlusLanguagePlusSupplied < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :supplied, :string
9
9
  end
10
10
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "cartographics"
6
6
  require_relative "genre"
@@ -12,19 +12,19 @@ require_relative "temporal"
12
12
  require_relative "occupation"
13
13
 
14
14
  module LocMods
15
- class Subject < BaseMapper
16
- attribute :id, Shale::Type::Value
17
- attribute :authority, Shale::Type::String
18
- attribute :authority_uri, Shale::Type::Value
19
- attribute :value_uri, Shale::Type::Value
20
- attribute :lang, Shale::Type::String
21
- attribute :script, Shale::Type::String
22
- attribute :transliteration, Shale::Type::String
23
- attribute :display_label, Shale::Type::String
24
- attribute :alt_rep_group, Shale::Type::String
25
- attribute :usage, Shale::Type::Value
26
- attribute :topic, Shale::Type::String, collection: true
27
- attribute :geographic, Shale::Type::String, collection: true
15
+ class Subject < Lutaml::Model::Serializable
16
+ attribute :id, :string
17
+ attribute :authority, :string
18
+ attribute :authority_uri, :string
19
+ attribute :value_uri, :string
20
+ attribute :lang, :string
21
+ attribute :script, :string
22
+ attribute :transliteration, :string
23
+ attribute :display_label, :string
24
+ attribute :alt_rep_group, :string
25
+ attribute :usage, :string
26
+ attribute :topic, :string, collection: true
27
+ attribute :geographic, :string, collection: true
28
28
  attribute :temporal, Temporal, collection: true
29
29
  attribute :title_info, SubjectTitleInfo, collection: true
30
30
  attribute :name, SubjectName, collection: true
@@ -33,7 +33,7 @@ module LocMods
33
33
  attribute :cartographics, Cartographics, collection: true
34
34
  attribute :occupation, Occupation, collection: true
35
35
  attribute :genre, Genre, collection: true
36
- attribute :href, Shale::Type::String
36
+ attribute :href, :string
37
37
 
38
38
  xml do
39
39
  root "subject"
@@ -1,27 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "identifier"
6
6
  require_relative "name_part"
7
7
  require_relative "role"
8
8
 
9
9
  module LocMods
10
- class SubjectName < BaseMapper
11
- attribute :type, Shale::Type::String
12
- attribute :id, Shale::Type::Value
13
- attribute :authority, Shale::Type::String
14
- attribute :authority_uri, Shale::Type::Value
15
- attribute :value_uri, Shale::Type::Value
16
- attribute :lang, Shale::Type::String
17
- attribute :script, Shale::Type::String
18
- attribute :transliteration, Shale::Type::String
19
- attribute :display_label, Shale::Type::String
10
+ class SubjectName < Lutaml::Model::Serializable
11
+ attribute :type, :string
12
+ attribute :id, :string
13
+ attribute :authority, :string
14
+ attribute :authority_uri, :string
15
+ attribute :value_uri, :string
16
+ attribute :lang, :string
17
+ attribute :script, :string
18
+ attribute :transliteration, :string
19
+ attribute :display_label, :string
20
20
  attribute :name_part, NamePart, collection: true
21
- attribute :display_form, Shale::Type::String, collection: true
22
- attribute :affiliation, Shale::Type::String, collection: true
21
+ attribute :display_form, :string, collection: true
22
+ attribute :affiliation, :string, collection: true
23
23
  attribute :role, Role, collection: true
24
- attribute :description, Shale::Type::String, collection: true
24
+ attribute :description, :string, collection: true
25
25
  attribute :name_identifier, Identifier, collection: true
26
26
 
27
27
  xml do
@@ -1,23 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class SubjectTitleInfo < BaseMapper
7
- attribute :id, Shale::Type::Value
8
- attribute :authority, Shale::Type::String
9
- attribute :authority_uri, Shale::Type::Value
10
- attribute :value_uri, Shale::Type::Value
11
- attribute :lang, Shale::Type::String
12
- attribute :script, Shale::Type::String
13
- attribute :transliteration, Shale::Type::String
14
- attribute :display_label, Shale::Type::String
15
- attribute :type, Shale::Type::String
16
- attribute :title, Shale::Type::String, collection: true
17
- attribute :sub_title, Shale::Type::String, collection: true
18
- attribute :part_number, Shale::Type::String, collection: true
19
- attribute :part_name, Shale::Type::String, collection: true
20
- attribute :non_sort, Shale::Type::String, collection: true
6
+ class SubjectTitleInfo < Lutaml::Model::Serializable
7
+ attribute :id, :string
8
+ attribute :authority, :string
9
+ attribute :authority_uri, :string
10
+ attribute :value_uri, :string
11
+ attribute :lang, :string
12
+ attribute :script, :string
13
+ attribute :transliteration, :string
14
+ attribute :display_label, :string
15
+ attribute :type, :string
16
+ attribute :title, :string, collection: true
17
+ attribute :sub_title, :string, collection: true
18
+ attribute :part_number, :string, collection: true
19
+ attribute :part_name, :string, collection: true
20
+ attribute :non_sort, :string, collection: true
21
21
 
22
22
  xml do
23
23
  root "subjectTitleInfo"
@@ -1,16 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class TableOfContents < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :display_label, Shale::Type::String
9
- attribute :type, Shale::Type::String
10
- attribute :shareable, Shale::Type::Value
11
- attribute :alt_rep_group, Shale::Type::String
12
- attribute :alt_format, Shale::Type::Value
13
- attribute :content_type, Shale::Type::String
6
+ class TableOfContents < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :display_label, :string
9
+ attribute :type, :string
10
+ attribute :shareable, :string
11
+ attribute :alt_rep_group, :string
12
+ attribute :alt_format, :string
13
+ attribute :content_type, :string
14
14
 
15
15
  xml do
16
16
  root "tableOfContents"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class TargetAudience < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :display_label, Shale::Type::String
9
- attribute :alt_rep_group, Shale::Type::String
6
+ class TargetAudience < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :display_label, :string
9
+ attribute :alt_rep_group, :string
10
10
 
11
11
  xml do
12
12
  root "targetAudience"
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "date"
6
6
 
7
7
  module LocMods
8
- class Temporal < BaseMapper
8
+ class Temporal < Lutaml::Model::Serializable
9
9
  attribute :content, Date
10
- attribute :authority, Shale::Type::String
11
- attribute :authority_uri, Shale::Type::Value
12
- attribute :value_uri, Shale::Type::Value
10
+ attribute :authority, :string
11
+ attribute :authority_uri, :string
12
+ attribute :value_uri, :string
13
13
 
14
14
  xml do
15
15
  root "temporal"
data/lib/loc_mods/text.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class Text < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :display_label, Shale::Type::String
9
- attribute :type, Shale::Type::String
6
+ class Text < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :display_label, :string
9
+ attribute :type, :string
10
10
 
11
11
  xml do
12
12
  root "text"
@@ -1,30 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
  require_relative "non_sort"
5
5
 
6
6
  module LocMods
7
- class TitleInfo < BaseMapper
8
- attribute :type, Shale::Type::String
9
- attribute :other_type, Shale::Type::Value
10
- attribute :supplied, Shale::Type::Value
11
- attribute :alt_rep_group, Shale::Type::String
12
- attribute :alt_format, Shale::Type::Value
13
- attribute :content_type, Shale::Type::String
14
- attribute :name_title_group, Shale::Type::String
15
- attribute :usage, Shale::Type::Value
16
- attribute :id, Shale::Type::Value
17
- attribute :authority, Shale::Type::String
18
- attribute :authority_uri, Shale::Type::Value
19
- attribute :value_uri, Shale::Type::Value
20
- attribute :lang, Shale::Type::String
21
- attribute :script, Shale::Type::String
22
- attribute :transliteration, Shale::Type::String
23
- attribute :display_label, Shale::Type::String
24
- attribute :title, Shale::Type::String, collection: true
25
- attribute :sub_title, Shale::Type::String, collection: true
26
- attribute :part_number, Shale::Type::String, collection: true
27
- attribute :part_name, Shale::Type::String, collection: true
7
+ class TitleInfo < Lutaml::Model::Serializable
8
+ attribute :type, :string
9
+ attribute :other_type, :string
10
+ attribute :supplied, :string
11
+ attribute :alt_rep_group, :string
12
+ attribute :alt_format, :string
13
+ attribute :content_type, :string
14
+ attribute :name_title_group, :string
15
+ attribute :usage, :string
16
+ attribute :id, :string
17
+ attribute :authority, :string
18
+ attribute :authority_uri, :string
19
+ attribute :value_uri, :string
20
+ attribute :lang, :string
21
+ attribute :script, :string
22
+ attribute :transliteration, :string
23
+ attribute :display_label, :string
24
+ attribute :title, :string, collection: true
25
+ attribute :sub_title, :string, collection: true
26
+ attribute :part_number, :string, collection: true
27
+ attribute :part_name, :string, collection: true
28
28
  attribute :non_sort, NonSort, collection: true
29
29
 
30
30
  xml do
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class TypeOfResource < BaseMapper
7
- attribute :content, Shale::Type::String
8
- attribute :collection, Shale::Type::Value
9
- attribute :manuscript, Shale::Type::Value
10
- attribute :display_label, Shale::Type::String
11
- attribute :alt_rep_group, Shale::Type::String
12
- attribute :usage, Shale::Type::Value
6
+ class TypeOfResource < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :collection, :string
9
+ attribute :manuscript, :string
10
+ attribute :display_label, :string
11
+ attribute :alt_rep_group, :string
12
+ attribute :usage, :string
13
13
 
14
14
  xml do
15
15
  root "typeOfResource"
data/lib/loc_mods/url.rb CHANGED
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "base_mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
- class Url < BaseMapper
7
- attribute :content, Shale::Type::Value
8
- attribute :date_last_accessed, Shale::Type::String
9
- attribute :display_label, Shale::Type::String
10
- attribute :note, Shale::Type::String
11
- attribute :access, Shale::Type::String
12
- attribute :usage, Shale::Type::String
6
+ class Url < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+ attribute :date_last_accessed, :string
9
+ attribute :display_label, :string
10
+ attribute :note, :string
11
+ attribute :access, :string
12
+ attribute :usage, :string
13
13
 
14
14
  xml do
15
15
  root "url"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LocMods
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.5"
5
5
  end