loc_mods 0.2.4 → 0.2.6
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 +87 -0
- 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 +10 -8
- data/lib/loc_mods/cli.rb +2 -3
- 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 +11 -11
- data/lib/loc_mods/part.rb +10 -10
- data/lib/loc_mods/physical_description.rb +11 -11
- 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 +5 -5
- 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 +16 -16
- 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 +7 -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
- metadata +8 -9
- data/lib/loc_mods/base_mapper.rb +0 -26
- data/lib/loc_mods/comparable_mapper.rb +0 -501
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5613f1f712d8203015a0fb3e47fd3741086837e9d428867aab27b572719b2747
|
4
|
+
data.tar.gz: 021aa87a31a69b90abbd870de1ca2a5e6bdfb2379a5e42db002b7fefd1ac8466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5960d07721a5de9a030c3137c1a66072f5399ea96b897eceb98a81dd273967073de1e48f8237209dc66ca28514230f42bc9c8bc596db11d777545eca71159c
|
7
|
+
data.tar.gz: 44f4ec3fd0969b5a45458917ef386556901e9ec032affcce994d34456ebeb9d15d2bb55f9d8554e6767cc17335a7ff19d0523df93c21591124c909fab242912a
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2025-01-14 08:30:09 UTC using RuboCop version 1.70.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Severity, Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'loc_mods.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Configuration parameters: AllowedMethods.
|
18
|
+
# AllowedMethods: enums
|
19
|
+
Lint/ConstantDefinitionInBlock:
|
20
|
+
Exclude:
|
21
|
+
- 'spec/loc_mods/collection_spec.rb'
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
25
|
+
Metrics/AbcSize:
|
26
|
+
Max: 50
|
27
|
+
|
28
|
+
# Offense count: 1
|
29
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
30
|
+
# AllowedMethods: refine
|
31
|
+
Metrics/BlockLength:
|
32
|
+
Max: 32
|
33
|
+
|
34
|
+
# Offense count: 2
|
35
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
36
|
+
Metrics/CyclomaticComplexity:
|
37
|
+
Max: 15
|
38
|
+
|
39
|
+
# Offense count: 3
|
40
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
41
|
+
Metrics/MethodLength:
|
42
|
+
Max: 43
|
43
|
+
|
44
|
+
# Offense count: 2
|
45
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
46
|
+
Metrics/PerceivedComplexity:
|
47
|
+
Max: 16
|
48
|
+
|
49
|
+
# Offense count: 1
|
50
|
+
# Configuration parameters: ForbiddenDelimiters.
|
51
|
+
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
52
|
+
Naming/HeredocDelimiterNaming:
|
53
|
+
Exclude:
|
54
|
+
- 'bin/update-nist-mods'
|
55
|
+
|
56
|
+
# Offense count: 1
|
57
|
+
Security/Open:
|
58
|
+
Exclude:
|
59
|
+
- 'bin/update-nist-mods'
|
60
|
+
|
61
|
+
# Offense count: 63
|
62
|
+
# Configuration parameters: AllowedConstants.
|
63
|
+
Style/Documentation:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
# Offense count: 1
|
67
|
+
# This cop supports safe autocorrection (--autocorrect).
|
68
|
+
# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
|
69
|
+
Style/NumericLiterals:
|
70
|
+
MinDigits: 6
|
71
|
+
|
72
|
+
# Offense count: 2
|
73
|
+
# This cop supports safe autocorrection (--autocorrect).
|
74
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
75
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
76
|
+
Style/TrailingCommaInArguments:
|
77
|
+
Exclude:
|
78
|
+
- 'lib/loc_mods/cli.rb'
|
79
|
+
- 'spec/loc_mods/collection_spec.rb'
|
80
|
+
|
81
|
+
# Offense count: 1
|
82
|
+
# This cop supports safe autocorrection (--autocorrect).
|
83
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
84
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
85
|
+
Style/TrailingCommaInArrayLiteral:
|
86
|
+
Exclude:
|
87
|
+
- 'spec/loc_mods/collection_spec.rb'
|
data/lib/loc_mods/abstract.rb
CHANGED
@@ -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 Abstract <
|
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 Abstract < 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 "abstract"
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class AccessCondition <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :lang,
|
10
|
-
attribute :script,
|
11
|
-
attribute :transliteration,
|
12
|
-
attribute :type,
|
13
|
-
attribute :alt_rep_group,
|
14
|
-
attribute :alt_format,
|
15
|
-
attribute :content_type,
|
6
|
+
class AccessCondition < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :display_label, :string
|
9
|
+
attribute :lang, :string
|
10
|
+
attribute :script, :string
|
11
|
+
attribute :transliteration, :string
|
12
|
+
attribute :type, :string
|
13
|
+
attribute :alt_rep_group, :string
|
14
|
+
attribute :alt_format, :string
|
15
|
+
attribute :content_type, :string
|
16
16
|
|
17
17
|
xml do
|
18
18
|
root "accessCondition"
|
@@ -1,23 +1,23 @@
|
|
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 AlternativeName <
|
11
|
-
attribute :lang,
|
12
|
-
attribute :script,
|
13
|
-
attribute :transliteration,
|
14
|
-
attribute :display_label,
|
15
|
-
attribute :alt_type,
|
10
|
+
class AlternativeName < Lutaml::Model::Serializable
|
11
|
+
attribute :lang, :string
|
12
|
+
attribute :script, :string
|
13
|
+
attribute :transliteration, :string
|
14
|
+
attribute :display_label, :string
|
15
|
+
attribute :alt_type, :string
|
16
16
|
attribute :name_part, NamePart, collection: true
|
17
|
-
attribute :display_form,
|
18
|
-
attribute :affiliation,
|
17
|
+
attribute :display_form, :string, collection: true
|
18
|
+
attribute :affiliation, :string, collection: true
|
19
19
|
attribute :role, Role, collection: true
|
20
|
-
attribute :description,
|
20
|
+
attribute :description, :string, collection: true
|
21
21
|
attribute :name_identifier, Identifier, collection: true
|
22
22
|
|
23
23
|
xml do
|
data/lib/loc_mods/area.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 Area <
|
8
|
+
class Area < Lutaml::Model::Serializable
|
9
9
|
attribute :content, HierarchicalPart
|
10
|
-
attribute :area_type,
|
10
|
+
attribute :area_type, :string
|
11
11
|
|
12
12
|
xml do
|
13
13
|
root "area"
|
@@ -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 CartographicExtension <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
6
|
+
class CartographicExtension < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :display_label, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "cartographicExtension"
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "cartographic_extension"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Cartographics <
|
9
|
-
attribute :authority,
|
10
|
-
attribute :authority_uri,
|
11
|
-
attribute :value_uri,
|
12
|
-
attribute :scale,
|
13
|
-
attribute :projection,
|
14
|
-
attribute :coordinates,
|
8
|
+
class Cartographics < Lutaml::Model::Serializable
|
9
|
+
attribute :authority, :string
|
10
|
+
attribute :authority_uri, :string
|
11
|
+
attribute :value_uri, :string
|
12
|
+
attribute :scale, :string
|
13
|
+
attribute :projection, :string
|
14
|
+
attribute :coordinates, :string, collection: true
|
15
15
|
attribute :cartographic_extension, CartographicExtension, collection: true
|
16
16
|
|
17
17
|
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 "hierarchical_part"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class CitySection <
|
8
|
+
class CitySection < Lutaml::Model::Serializable
|
9
9
|
attribute :content, HierarchicalPart
|
10
|
-
attribute :city_section_type,
|
10
|
+
attribute :city_section_type, :string
|
11
11
|
|
12
12
|
xml do
|
13
13
|
root "citySection"
|
@@ -1,21 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class Classification <
|
7
|
-
attribute :content,
|
8
|
-
attribute :
|
9
|
-
attribute :
|
10
|
-
attribute :
|
11
|
-
attribute :
|
12
|
-
attribute :
|
6
|
+
class Classification < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :authority, :string
|
9
|
+
attribute :edition, :string
|
10
|
+
attribute :display_label, :string
|
11
|
+
attribute :alt_rep_group, :string
|
12
|
+
attribute :usage, :string
|
13
|
+
attribute :generator, :string
|
13
14
|
|
14
15
|
xml do
|
15
16
|
root "classification"
|
16
17
|
namespace "http://www.loc.gov/mods/v3", nil
|
17
18
|
|
18
19
|
map_content to: :content
|
20
|
+
map_attribute "authority", to: :authority
|
19
21
|
map_attribute "edition", to: :edition
|
20
22
|
map_attribute "displayLabel", to: :display_label
|
21
23
|
map_attribute "altRepGroup", to: :alt_rep_group
|
data/lib/loc_mods/cli.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# lib/loc_mods/cli.rb
|
4
3
|
require "thor"
|
5
4
|
require "loc_mods"
|
6
5
|
|
@@ -73,13 +72,13 @@ module LocMods
|
|
73
72
|
end
|
74
73
|
|
75
74
|
def print_differences(record1, record2, show_unchanged, highlight_diff, use_colors)
|
76
|
-
diff_score, diff_tree =
|
75
|
+
diff_score, diff_tree = Lutaml::Model::Serialize.diff_with_score(
|
77
76
|
record1,
|
78
77
|
record2,
|
79
78
|
show_unchanged: show_unchanged,
|
80
79
|
highlight_diff: highlight_diff,
|
81
80
|
use_colors: use_colors,
|
82
|
-
indent: " "
|
81
|
+
indent: " "
|
83
82
|
)
|
84
83
|
similarity_percentage = (1 - diff_score) * 100
|
85
84
|
|
data/lib/loc_mods/collection.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 "record"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Collection <
|
8
|
+
class Collection < Lutaml::Model::Serializable
|
9
9
|
attribute :mods, Record, collection: true
|
10
|
-
attribute :schema_location,
|
10
|
+
attribute :schema_location, :string
|
11
11
|
|
12
12
|
xml do
|
13
13
|
root "modsCollection"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "enumeration_and_chronology"
|
6
6
|
require_relative "form"
|
@@ -8,11 +8,11 @@ require_relative "item_identifier"
|
|
8
8
|
require_relative "note"
|
9
9
|
|
10
10
|
module LocMods
|
11
|
-
class CopyInformation <
|
11
|
+
class CopyInformation < Lutaml::Model::Serializable
|
12
12
|
attribute :form, Form
|
13
|
-
attribute :sub_location,
|
14
|
-
attribute :shelf_locator,
|
15
|
-
attribute :electronic_locator,
|
13
|
+
attribute :sub_location, :string, collection: true
|
14
|
+
attribute :shelf_locator, :string, collection: true
|
15
|
+
attribute :electronic_locator, :string, collection: true
|
16
16
|
attribute :note, Note, collection: true
|
17
17
|
attribute :enumeration_and_chronology, EnumerationAndChronology,
|
18
18
|
collection: true
|
data/lib/loc_mods/date.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 Date <
|
7
|
-
attribute :content,
|
8
|
-
attribute :encoding,
|
9
|
-
attribute :qualifier,
|
10
|
-
attribute :point,
|
11
|
-
attribute :key_date,
|
12
|
-
attribute :calendar,
|
6
|
+
class Date < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :encoding, :string
|
9
|
+
attribute :qualifier, :string
|
10
|
+
attribute :point, :string
|
11
|
+
attribute :key_date, :string
|
12
|
+
attribute :calendar, :string
|
13
13
|
|
14
14
|
xml do
|
15
15
|
root "recordChangeDate"
|
data/lib/loc_mods/date_other.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 "date"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class DateOther <
|
9
|
-
attribute :content,
|
10
|
-
attribute :type,
|
8
|
+
class DateOther < Lutaml::Model::Serializable
|
9
|
+
attribute :content, :string
|
10
|
+
attribute :type, :string
|
11
11
|
|
12
12
|
xml do
|
13
13
|
root "dateOther"
|
data/lib/loc_mods/detail.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class Detail <
|
7
|
-
attribute :type,
|
8
|
-
attribute :level,
|
9
|
-
attribute :number,
|
10
|
-
attribute :caption,
|
11
|
-
attribute :title,
|
6
|
+
class Detail < Lutaml::Model::Serializable
|
7
|
+
attribute :type, :string
|
8
|
+
attribute :level, :integer
|
9
|
+
attribute :number, :string, collection: true
|
10
|
+
attribute :caption, :string, collection: true
|
11
|
+
attribute :title, :string, collection: true
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "detail"
|
data/lib/loc_mods/edition.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
6
|
# LocMods::StringPlusLanguagePlusSupplied
|
7
|
-
class Edition <
|
8
|
-
attribute :content,
|
9
|
-
attribute :supplied,
|
7
|
+
class Edition < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
attribute :supplied, :string
|
10
10
|
|
11
11
|
xml do
|
12
12
|
root "edition"
|
@@ -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 EnumerationAndChronology <
|
7
|
-
attribute :content,
|
8
|
-
attribute :unit_type,
|
6
|
+
class EnumerationAndChronology < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :unit_type, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "enumerationAndChronology"
|
data/lib/loc_mods/extent.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 Extent <
|
7
|
-
attribute :content,
|
8
|
-
attribute :unit,
|
6
|
+
class Extent < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :unit, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "extent"
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
module LocMods
|
6
|
-
class ExtentDefinition <
|
7
|
-
attribute :unit,
|
8
|
-
attribute :start,
|
9
|
-
attribute :end,
|
10
|
-
attribute :total,
|
11
|
-
attribute :list,
|
6
|
+
class ExtentDefinition < Lutaml::Model::Serializable
|
7
|
+
attribute :unit, :string
|
8
|
+
attribute :start, :string
|
9
|
+
attribute :end, :string
|
10
|
+
attribute :total, :integer
|
11
|
+
attribute :list, :string
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "extentDefinition"
|
data/lib/loc_mods/form.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 Form <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
9
|
-
attribute :authority,
|
6
|
+
class Form < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :type, :string
|
9
|
+
attribute :authority, :string
|
10
10
|
|
11
11
|
xml do
|
12
12
|
root "form"
|
data/lib/loc_mods/genre.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 Genre <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
9
|
-
attribute :display_label,
|
10
|
-
attribute :alt_rep_group,
|
11
|
-
attribute :usage,
|
12
|
-
attribute :authority,
|
6
|
+
class Genre < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :type, :string
|
9
|
+
attribute :display_label, :string
|
10
|
+
attribute :alt_rep_group, :string
|
11
|
+
attribute :usage, :string
|
12
|
+
attribute :authority, :string
|
13
13
|
|
14
14
|
xml do
|
15
15
|
root "genre"
|
@@ -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 GeographicCode <
|
7
|
-
attribute :content,
|
8
|
-
attribute :authority_uri,
|
9
|
-
attribute :value_uri,
|
10
|
-
attribute :authority,
|
6
|
+
class GeographicCode < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :authority_uri, :string
|
9
|
+
attribute :value_uri, :string
|
10
|
+
attribute :authority, :string
|
11
11
|
|
12
12
|
xml do
|
13
13
|
root "geographicCode"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "area"
|
6
6
|
require_relative "city_section"
|
@@ -8,14 +8,14 @@ require_relative "hierarchical_part"
|
|
8
8
|
require_relative "region"
|
9
9
|
|
10
10
|
module LocMods
|
11
|
-
class HierarchicalGeographic <
|
12
|
-
attribute :authority,
|
13
|
-
attribute :authority_uri,
|
14
|
-
attribute :value_uri,
|
11
|
+
class HierarchicalGeographic < Lutaml::Model::Serializable
|
12
|
+
attribute :authority, :string
|
13
|
+
attribute :authority_uri, :string
|
14
|
+
attribute :value_uri, :string
|
15
15
|
attribute :extra_terrestrial_area, HierarchicalPart, collection: true
|
16
16
|
attribute :continent, HierarchicalPart, collection: true
|
17
17
|
attribute :country, HierarchicalPart, collection: true
|
18
|
-
attribute :province,
|
18
|
+
attribute :province, :string, collection: true
|
19
19
|
attribute :region, Region, collection: true
|
20
20
|
attribute :state, HierarchicalPart, collection: true
|
21
21
|
attribute :territory, HierarchicalPart, collection: true
|
@@ -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 HierarchicalPart <
|
7
|
-
attribute :content,
|
8
|
-
attribute :level,
|
9
|
-
attribute :period,
|
10
|
-
attribute :authority,
|
11
|
-
attribute :authority_uri,
|
12
|
-
attribute :value_uri,
|
6
|
+
class HierarchicalPart < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :level, :string
|
9
|
+
attribute :period, :string
|
10
|
+
attribute :authority, :string
|
11
|
+
attribute :authority_uri, :string
|
12
|
+
attribute :value_uri, :string
|
13
13
|
|
14
14
|
xml do
|
15
15
|
root "territory"
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "copy_information"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class HoldingSimple <
|
8
|
+
class HoldingSimple < Lutaml::Model::Serializable
|
9
9
|
attribute :copy_information, CopyInformation, collection: true
|
10
10
|
|
11
11
|
xml do
|