loc_mods 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +83 -0
- data/README.adoc +48 -6
- data/lib/loc_mods/abstract.rb +9 -9
- data/lib/loc_mods/access_condition.rb +11 -11
- data/lib/loc_mods/alternative_name.rb +10 -10
- data/lib/loc_mods/area.rb +3 -3
- data/lib/loc_mods/cartographic_extension.rb +4 -4
- data/lib/loc_mods/cartographics.rb +8 -8
- data/lib/loc_mods/city_section.rb +3 -3
- data/lib/loc_mods/classification.rb +8 -8
- data/lib/loc_mods/cli.rb +48 -80
- data/lib/loc_mods/collection.rb +3 -3
- data/lib/loc_mods/copy_information.rb +5 -5
- data/lib/loc_mods/date.rb +8 -8
- data/lib/loc_mods/date_other.rb +4 -4
- data/lib/loc_mods/detail.rb +7 -7
- data/lib/loc_mods/edition.rb +4 -4
- data/lib/loc_mods/enumeration_and_chronology.rb +4 -4
- data/lib/loc_mods/extent.rb +4 -4
- data/lib/loc_mods/extent_definition.rb +7 -7
- data/lib/loc_mods/form.rb +5 -5
- data/lib/loc_mods/genre.rb +8 -8
- data/lib/loc_mods/geographic_code.rb +6 -6
- data/lib/loc_mods/hierarchical_geographic.rb +6 -6
- data/lib/loc_mods/hierarchical_part.rb +8 -8
- data/lib/loc_mods/holding_simple.rb +2 -2
- data/lib/loc_mods/identifier.rb +8 -8
- data/lib/loc_mods/item_identifier.rb +4 -4
- data/lib/loc_mods/language.rb +9 -9
- data/lib/loc_mods/language_term.rb +7 -7
- data/lib/loc_mods/location.rb +8 -8
- data/lib/loc_mods/name.rb +19 -19
- data/lib/loc_mods/name_part.rb +4 -4
- data/lib/loc_mods/non_sort.rb +4 -4
- data/lib/loc_mods/note.rb +7 -7
- data/lib/loc_mods/occupation.rb +6 -6
- data/lib/loc_mods/origin_info.rb +10 -10
- data/lib/loc_mods/part.rb +10 -10
- data/lib/loc_mods/physical_description.rb +10 -10
- data/lib/loc_mods/physical_description_note.rb +7 -7
- data/lib/loc_mods/physical_location.rb +5 -5
- data/lib/loc_mods/place.rb +3 -3
- data/lib/loc_mods/place_term.rb +7 -7
- data/lib/loc_mods/publisher.rb +6 -6
- data/lib/loc_mods/record.rb +4 -4
- data/lib/loc_mods/record_content_source.rb +4 -4
- data/lib/loc_mods/record_identifier.rb +4 -4
- data/lib/loc_mods/record_info.rb +9 -9
- data/lib/loc_mods/record_info_note.rb +8 -8
- data/lib/loc_mods/region.rb +3 -3
- data/lib/loc_mods/related_item.rb +10 -10
- data/lib/loc_mods/role.rb +2 -2
- data/lib/loc_mods/role_term.rb +4 -4
- data/lib/loc_mods/script_term.rb +4 -4
- data/lib/loc_mods/string_plus_language.rb +6 -6
- data/lib/loc_mods/string_plus_language_plus_authority.rb +6 -6
- data/lib/loc_mods/string_plus_language_plus_supplied.rb +4 -4
- data/lib/loc_mods/subject.rb +15 -15
- data/lib/loc_mods/subject_name.rb +14 -14
- data/lib/loc_mods/subject_title_info.rb +16 -16
- data/lib/loc_mods/table_of_contents.rb +9 -9
- data/lib/loc_mods/target_audience.rb +5 -5
- data/lib/loc_mods/temporal.rb +5 -5
- data/lib/loc_mods/text.rb +5 -5
- data/lib/loc_mods/title_info.rb +22 -22
- data/lib/loc_mods/type_of_resource.rb +8 -8
- data/lib/loc_mods/url.rb +8 -8
- data/lib/loc_mods/version.rb +1 -1
- data/lib/loc_mods.rb +7 -6
- data/references/allrecords-MODS.xml +1 -1
- metadata +5 -6
- data/lib/loc_mods/base_mapper.rb +0 -26
- data/lib/loc_mods/comparable_mapper.rb +0 -110
data/lib/loc_mods/publisher.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class Publisher <
|
7
|
-
attribute :content,
|
8
|
-
attribute :authority,
|
9
|
-
attribute :authority_uri,
|
10
|
-
attribute :value_uri,
|
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"
|
data/lib/loc_mods/record.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 "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 <
|
28
|
-
attribute :id,
|
29
|
-
attribute :version,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class RecordContentSource <
|
7
|
-
attribute :authority,
|
8
|
-
attribute :content,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class RecordIdentifier <
|
7
|
-
attribute :content,
|
8
|
-
attribute :source,
|
6
|
+
class RecordIdentifier < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :source, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "recordIdentifier"
|
data/lib/loc_mods/record_info.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 "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 <
|
13
|
-
attribute :lang,
|
14
|
-
attribute :script,
|
15
|
-
attribute :transliteration,
|
16
|
-
attribute :display_label,
|
17
|
-
attribute :alt_rep_group,
|
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,
|
24
|
-
attribute :description_standard,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class RecordInfoNote <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
10
|
-
attribute :type_uri,
|
11
|
-
attribute :id,
|
12
|
-
attribute :alt_rep_group,
|
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"
|
data/lib/loc_mods/region.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "hierarchical_part"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Region <
|
8
|
+
class Region < Lutaml::Model::Serializable
|
9
9
|
attribute :content, HierarchicalPart
|
10
|
-
attribute :region_type,
|
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
|
-
|
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 <
|
27
|
-
attribute :type,
|
28
|
-
attribute :other_type,
|
29
|
-
attribute :other_type_auth,
|
30
|
-
attribute :other_type_auth_uri,
|
31
|
-
attribute :other_type_uri,
|
32
|
-
attribute :display_label,
|
33
|
-
attribute :id,
|
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,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "role_term"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Role <
|
8
|
+
class Role < Lutaml::Model::Serializable
|
9
9
|
attribute :role_term, RoleTerm, collection: true
|
10
10
|
|
11
11
|
xml do
|
data/lib/loc_mods/role_term.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class RoleTerm <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
6
|
+
class RoleTerm < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :type, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "roleTerm"
|
data/lib/loc_mods/script_term.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class ScriptTerm <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class StringPlusLanguage <
|
7
|
-
attribute :content,
|
8
|
-
attribute :lang,
|
9
|
-
attribute :script,
|
10
|
-
attribute :transliteration,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class StringPlusLanguagePlusAuthority <
|
7
|
-
attribute :content,
|
8
|
-
attribute :authority,
|
9
|
-
attribute :authority_uri,
|
10
|
-
attribute :value_uri,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class StringPlusLanguagePlusSupplied <
|
7
|
-
attribute :content,
|
8
|
-
attribute :supplied,
|
6
|
+
class StringPlusLanguagePlusSupplied < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :supplied, :string
|
9
9
|
end
|
10
10
|
end
|
data/lib/loc_mods/subject.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 "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 <
|
16
|
-
attribute :id,
|
17
|
-
attribute :authority,
|
18
|
-
attribute :authority_uri,
|
19
|
-
attribute :value_uri,
|
20
|
-
attribute :lang,
|
21
|
-
attribute :script,
|
22
|
-
attribute :transliteration,
|
23
|
-
attribute :display_label,
|
24
|
-
attribute :alt_rep_group,
|
25
|
-
attribute :usage,
|
26
|
-
attribute :topic,
|
27
|
-
attribute :geographic,
|
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,
|
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
|
-
|
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 <
|
11
|
-
attribute :type,
|
12
|
-
attribute :id,
|
13
|
-
attribute :authority,
|
14
|
-
attribute :authority_uri,
|
15
|
-
attribute :value_uri,
|
16
|
-
attribute :lang,
|
17
|
-
attribute :script,
|
18
|
-
attribute :transliteration,
|
19
|
-
attribute :display_label,
|
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,
|
22
|
-
attribute :affiliation,
|
21
|
+
attribute :display_form, :string, collection: true
|
22
|
+
attribute :affiliation, :string, collection: true
|
23
23
|
attribute :role, Role, collection: true
|
24
|
-
attribute :description,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class SubjectTitleInfo <
|
7
|
-
attribute :id,
|
8
|
-
attribute :authority,
|
9
|
-
attribute :authority_uri,
|
10
|
-
attribute :value_uri,
|
11
|
-
attribute :lang,
|
12
|
-
attribute :script,
|
13
|
-
attribute :transliteration,
|
14
|
-
attribute :display_label,
|
15
|
-
attribute :type,
|
16
|
-
attribute :title,
|
17
|
-
attribute :sub_title,
|
18
|
-
attribute :part_number,
|
19
|
-
attribute :part_name,
|
20
|
-
attribute :non_sort,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class TableOfContents <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
10
|
-
attribute :shareable,
|
11
|
-
attribute :alt_rep_group,
|
12
|
-
attribute :alt_format,
|
13
|
-
attribute :content_type,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class TargetAudience <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :alt_rep_group,
|
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"
|
data/lib/loc_mods/temporal.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "date"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Temporal <
|
8
|
+
class Temporal < Lutaml::Model::Serializable
|
9
9
|
attribute :content, Date
|
10
|
-
attribute :authority,
|
11
|
-
attribute :authority_uri,
|
12
|
-
attribute :value_uri,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class Text <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
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"
|
data/lib/loc_mods/title_info.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
require_relative "non_sort"
|
5
5
|
|
6
6
|
module LocMods
|
7
|
-
class TitleInfo <
|
8
|
-
attribute :type,
|
9
|
-
attribute :other_type,
|
10
|
-
attribute :supplied,
|
11
|
-
attribute :alt_rep_group,
|
12
|
-
attribute :alt_format,
|
13
|
-
attribute :content_type,
|
14
|
-
attribute :name_title_group,
|
15
|
-
attribute :usage,
|
16
|
-
attribute :id,
|
17
|
-
attribute :authority,
|
18
|
-
attribute :authority_uri,
|
19
|
-
attribute :value_uri,
|
20
|
-
attribute :lang,
|
21
|
-
attribute :script,
|
22
|
-
attribute :transliteration,
|
23
|
-
attribute :display_label,
|
24
|
-
attribute :title,
|
25
|
-
attribute :sub_title,
|
26
|
-
attribute :part_number,
|
27
|
-
attribute :part_name,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class TypeOfResource <
|
7
|
-
attribute :content,
|
8
|
-
attribute :collection,
|
9
|
-
attribute :manuscript,
|
10
|
-
attribute :display_label,
|
11
|
-
attribute :alt_rep_group,
|
12
|
-
attribute :usage,
|
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
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class Url <
|
7
|
-
attribute :content,
|
8
|
-
attribute :date_last_accessed,
|
9
|
-
attribute :display_label,
|
10
|
-
attribute :note,
|
11
|
-
attribute :access,
|
12
|
-
attribute :usage,
|
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"
|
data/lib/loc_mods/version.rb
CHANGED