loc_mods 0.2.7 → 0.3.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 +4 -4
- data/.rubocop.yml +16 -7
- data/.rubocop_todo.yml +38 -37
- data/README.adoc +16 -0
- data/lib/loc_mods/abstract.rb +2 -2
- data/lib/loc_mods/access_condition.rb +2 -2
- data/lib/loc_mods/alternative_name.rb +2 -2
- data/lib/loc_mods/area.rb +2 -2
- data/lib/loc_mods/cartographic_extension.rb +2 -2
- data/lib/loc_mods/cartographics.rb +2 -2
- data/lib/loc_mods/city_section.rb +2 -2
- data/lib/loc_mods/classification.rb +2 -2
- data/lib/loc_mods/cli.rb +15 -9
- data/lib/loc_mods/collection.rb +2 -2
- data/lib/loc_mods/copy_information.rb +2 -2
- data/lib/loc_mods/date.rb +4 -4
- data/lib/loc_mods/date_other.rb +2 -2
- data/lib/loc_mods/detail.rb +2 -2
- data/lib/loc_mods/edition.rb +2 -2
- data/lib/loc_mods/enumeration_and_chronology.rb +2 -2
- data/lib/loc_mods/extent.rb +2 -2
- data/lib/loc_mods/extent_definition.rb +2 -2
- data/lib/loc_mods/form.rb +2 -2
- data/lib/loc_mods/genre.rb +2 -2
- data/lib/loc_mods/geographic_code.rb +2 -2
- data/lib/loc_mods/hierarchical_geographic.rb +2 -2
- data/lib/loc_mods/hierarchical_part.rb +2 -2
- data/lib/loc_mods/holding_simple.rb +2 -2
- data/lib/loc_mods/identifier.rb +2 -2
- data/lib/loc_mods/item_identifier.rb +2 -2
- data/lib/loc_mods/language.rb +2 -2
- data/lib/loc_mods/language_term.rb +2 -2
- data/lib/loc_mods/location.rb +2 -2
- data/lib/loc_mods/name.rb +4 -6
- data/lib/loc_mods/name_part.rb +2 -2
- data/lib/loc_mods/namespace.rb +10 -0
- data/lib/loc_mods/non_sort.rb +4 -5
- data/lib/loc_mods/note.rb +2 -2
- data/lib/loc_mods/occupation.rb +2 -2
- data/lib/loc_mods/origin_info.rb +3 -2
- data/lib/loc_mods/part.rb +2 -2
- data/lib/loc_mods/physical_description.rb +3 -2
- data/lib/loc_mods/physical_description_note.rb +2 -2
- data/lib/loc_mods/physical_location.rb +2 -2
- data/lib/loc_mods/place.rb +2 -2
- data/lib/loc_mods/place_term.rb +2 -2
- data/lib/loc_mods/publisher.rb +2 -2
- data/lib/loc_mods/record.rb +3 -2
- data/lib/loc_mods/record_content_source.rb +1 -1
- data/lib/loc_mods/record_identifier.rb +2 -2
- data/lib/loc_mods/record_info.rb +2 -2
- data/lib/loc_mods/record_info_note.rb +2 -2
- data/lib/loc_mods/region.rb +2 -2
- data/lib/loc_mods/related_item.rb +4 -6
- data/lib/loc_mods/role.rb +2 -2
- data/lib/loc_mods/role_term.rb +2 -2
- data/lib/loc_mods/script_term.rb +2 -2
- data/lib/loc_mods/string_plus_language.rb +2 -2
- data/lib/loc_mods/subject.rb +6 -7
- data/lib/loc_mods/subject_name.rb +2 -2
- data/lib/loc_mods/subject_title_info.rb +2 -2
- data/lib/loc_mods/table_of_contents.rb +2 -2
- data/lib/loc_mods/target_audience.rb +2 -2
- data/lib/loc_mods/temporal.rb +2 -2
- data/lib/loc_mods/text.rb +2 -2
- data/lib/loc_mods/title_info.rb +2 -2
- data/lib/loc_mods/type_of_resource.rb +2 -2
- data/lib/loc_mods/url.rb +2 -2
- data/lib/loc_mods/version.rb +1 -1
- data/lib/loc_mods/xlink_href.rb +9 -0
- data/lib/loc_mods/xlink_namespace.rb +8 -0
- data/lib/loc_mods/xml_space.rb +9 -0
- data/lib/loc_mods.rb +71 -8
- metadata +10 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 169bec73df0640577af6a10da45138fa11502b00d8cb4f2d1152c2f360c02999
|
|
4
|
+
data.tar.gz: cf3045ea76530e0caba326d6ee326f5afc94e7f2022d00f850aa3800a58fa33b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c68a2d4981a688b61af9a329b7d0393d6f0f3f3f4ca56e4fca7ce1b5958227a5180d66be34de64ad34871dec37a341fde55e75581f7039706ba17f69936d7ed1
|
|
7
|
+
data.tar.gz: b3e6b998a759d09eec487fcc01ab4b3f1fb44c6df5457231c1fddde76f3c078676e5898bcd05bee6e46c0281ebb2f18c102df3d78feb0671ed79cf95d7f11494
|
data/.rubocop.yml
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
inherit_from:
|
|
4
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
|
+
- .rubocop_todo.yml
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
7
|
+
inherit_mode:
|
|
8
|
+
merge:
|
|
9
|
+
- Exclude
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
# local repo-specific modifications
|
|
12
|
+
# ...
|
|
13
|
+
plugins:
|
|
14
|
+
- rubocop-rspec
|
|
15
|
+
- rubocop-performance
|
|
16
|
+
- rubocop-rake
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
AllCops:
|
|
19
|
+
TargetRubyVersion: 3.0
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2026-03-24 02:27:27 UTC using RuboCop version 1.86.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
9
|
# Offense count: 1
|
|
10
|
-
# Configuration parameters: Severity, Include.
|
|
11
|
-
# Include: **/*.gemspec
|
|
12
10
|
Gemspec/RequiredRubyVersion:
|
|
13
11
|
Exclude:
|
|
14
12
|
- 'loc_mods.gemspec'
|
|
15
13
|
|
|
14
|
+
# Offense count: 5
|
|
15
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
16
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
17
|
+
# URISchemes: http, https
|
|
18
|
+
Layout/LineLength:
|
|
19
|
+
Exclude:
|
|
20
|
+
- 'bin/update-nist-mods'
|
|
21
|
+
- 'lib/loc_mods/cli.rb'
|
|
22
|
+
- 'loc_mods.gemspec'
|
|
23
|
+
- 'spec/loc_mods/collection_spec.rb'
|
|
24
|
+
|
|
16
25
|
# Offense count: 1
|
|
17
26
|
# Configuration parameters: AllowedMethods.
|
|
18
27
|
# AllowedMethods: enums
|
|
@@ -20,31 +29,34 @@ Lint/ConstantDefinitionInBlock:
|
|
|
20
29
|
Exclude:
|
|
21
30
|
- 'spec/loc_mods/collection_spec.rb'
|
|
22
31
|
|
|
23
|
-
# Offense count:
|
|
24
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
32
|
+
# Offense count: 2
|
|
33
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
25
34
|
Metrics/AbcSize:
|
|
26
|
-
|
|
35
|
+
Exclude:
|
|
36
|
+
- 'lib/loc_mods/cli.rb'
|
|
27
37
|
|
|
28
38
|
# Offense count: 1
|
|
29
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
39
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
30
40
|
# AllowedMethods: refine
|
|
31
41
|
Metrics/BlockLength:
|
|
32
|
-
Max:
|
|
42
|
+
Max: 30
|
|
33
43
|
|
|
34
44
|
# Offense count: 2
|
|
35
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
45
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
36
46
|
Metrics/CyclomaticComplexity:
|
|
37
|
-
|
|
47
|
+
Exclude:
|
|
48
|
+
- 'lib/loc_mods/cli.rb'
|
|
38
49
|
|
|
39
50
|
# Offense count: 3
|
|
40
51
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
41
52
|
Metrics/MethodLength:
|
|
42
|
-
Max:
|
|
53
|
+
Max: 45
|
|
43
54
|
|
|
44
55
|
# Offense count: 2
|
|
45
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
56
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
46
57
|
Metrics/PerceivedComplexity:
|
|
47
|
-
|
|
58
|
+
Exclude:
|
|
59
|
+
- 'lib/loc_mods/cli.rb'
|
|
48
60
|
|
|
49
61
|
# Offense count: 1
|
|
50
62
|
# Configuration parameters: ForbiddenDelimiters.
|
|
@@ -54,34 +66,23 @@ Naming/HeredocDelimiterNaming:
|
|
|
54
66
|
- 'bin/update-nist-mods'
|
|
55
67
|
|
|
56
68
|
# Offense count: 1
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# Offense count: 63
|
|
62
|
-
# Configuration parameters: AllowedConstants.
|
|
63
|
-
Style/Documentation:
|
|
64
|
-
Enabled: false
|
|
69
|
+
# Configuration parameters: CountAsOne.
|
|
70
|
+
RSpec/ExampleLength:
|
|
71
|
+
Max: 7
|
|
65
72
|
|
|
66
73
|
# Offense count: 1
|
|
67
|
-
|
|
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:
|
|
74
|
+
RSpec/LeakyConstantDeclaration:
|
|
77
75
|
Exclude:
|
|
78
|
-
- 'lib/loc_mods/cli.rb'
|
|
79
76
|
- 'spec/loc_mods/collection_spec.rb'
|
|
80
77
|
|
|
81
78
|
# Offense count: 1
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
-
|
|
85
|
-
Style/TrailingCommaInArrayLiteral:
|
|
79
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
80
|
+
# SupportedInflectors: default, active_support
|
|
81
|
+
RSpec/SpecFilePathFormat:
|
|
86
82
|
Exclude:
|
|
87
|
-
- 'spec/
|
|
83
|
+
- 'spec/loc_mods_spec.rb'
|
|
84
|
+
|
|
85
|
+
# Offense count: 1
|
|
86
|
+
Security/Open:
|
|
87
|
+
Exclude:
|
|
88
|
+
- 'bin/update-nist-mods'
|
data/README.adoc
CHANGED
|
@@ -119,6 +119,22 @@ metadata.
|
|
|
119
119
|
bin/update-nist-mods
|
|
120
120
|
----
|
|
121
121
|
|
|
122
|
+
=== Running tests
|
|
123
|
+
|
|
124
|
+
Run all tests:
|
|
125
|
+
|
|
126
|
+
[source,sh]
|
|
127
|
+
----
|
|
128
|
+
bundle exec rake spec
|
|
129
|
+
----
|
|
130
|
+
|
|
131
|
+
Run a single test by description:
|
|
132
|
+
|
|
133
|
+
[source,sh]
|
|
134
|
+
----
|
|
135
|
+
bundle exec rspec spec/loc_mods/collection_spec.rb --example "991000197019708106"
|
|
136
|
+
----
|
|
137
|
+
|
|
122
138
|
== License
|
|
123
139
|
|
|
124
140
|
Copyright Ribose.
|
data/lib/loc_mods/abstract.rb
CHANGED
|
@@ -13,8 +13,8 @@ module LocMods
|
|
|
13
13
|
attribute :content_type, :string
|
|
14
14
|
|
|
15
15
|
xml do
|
|
16
|
-
|
|
17
|
-
namespace
|
|
16
|
+
element "abstract"
|
|
17
|
+
namespace Namespace
|
|
18
18
|
|
|
19
19
|
map_content to: :content
|
|
20
20
|
map_attribute "displayLabel", to: :display_label
|
|
@@ -15,8 +15,8 @@ module LocMods
|
|
|
15
15
|
attribute :content_type, :string
|
|
16
16
|
|
|
17
17
|
xml do
|
|
18
|
-
|
|
19
|
-
namespace
|
|
18
|
+
element "accessCondition"
|
|
19
|
+
namespace Namespace
|
|
20
20
|
|
|
21
21
|
map_content to: :content
|
|
22
22
|
map_attribute "displayLabel", to: :display_label
|
|
@@ -21,8 +21,8 @@ module LocMods
|
|
|
21
21
|
attribute :name_identifier, Identifier, collection: true
|
|
22
22
|
|
|
23
23
|
xml do
|
|
24
|
-
|
|
25
|
-
namespace
|
|
24
|
+
element "alternativeName"
|
|
25
|
+
namespace Namespace
|
|
26
26
|
|
|
27
27
|
map_attribute "lang", to: :lang
|
|
28
28
|
map_attribute "script", to: :script
|
data/lib/loc_mods/area.rb
CHANGED
|
@@ -8,8 +8,8 @@ module LocMods
|
|
|
8
8
|
attribute :display_label, :string
|
|
9
9
|
|
|
10
10
|
xml do
|
|
11
|
-
|
|
12
|
-
namespace
|
|
11
|
+
element "cartographicExtension"
|
|
12
|
+
namespace Namespace
|
|
13
13
|
|
|
14
14
|
map_content to: :content
|
|
15
15
|
map_attribute "displayLabel", to: :display_label
|
|
@@ -15,8 +15,8 @@ module LocMods
|
|
|
15
15
|
attribute :cartographic_extension, CartographicExtension, collection: true
|
|
16
16
|
|
|
17
17
|
xml do
|
|
18
|
-
|
|
19
|
-
namespace
|
|
18
|
+
element "cartographics"
|
|
19
|
+
namespace Namespace
|
|
20
20
|
|
|
21
21
|
map_attribute "authority", to: :authority
|
|
22
22
|
map_attribute "authorityURI", to: :authority_uri
|
|
@@ -10,8 +10,8 @@ module LocMods
|
|
|
10
10
|
attribute :city_section_type, :string
|
|
11
11
|
|
|
12
12
|
xml do
|
|
13
|
-
|
|
14
|
-
namespace
|
|
13
|
+
element "citySection"
|
|
14
|
+
namespace Namespace
|
|
15
15
|
|
|
16
16
|
map_content to: :content
|
|
17
17
|
map_attribute "citySectionType", to: :city_section_type
|
|
@@ -13,8 +13,8 @@ module LocMods
|
|
|
13
13
|
attribute :generator, :string
|
|
14
14
|
|
|
15
15
|
xml do
|
|
16
|
-
|
|
17
|
-
namespace
|
|
16
|
+
element "classification"
|
|
17
|
+
namespace Namespace
|
|
18
18
|
|
|
19
19
|
map_content to: :content
|
|
20
20
|
map_attribute "authority", to: :authority
|
data/lib/loc_mods/cli.rb
CHANGED
|
@@ -5,9 +5,12 @@ require "loc_mods"
|
|
|
5
5
|
|
|
6
6
|
module LocMods
|
|
7
7
|
class Cli < Thor
|
|
8
|
-
desc "detect-duplicates PATH...",
|
|
9
|
-
|
|
10
|
-
method_option :
|
|
8
|
+
desc "detect-duplicates PATH...",
|
|
9
|
+
"Detect duplicate records in MODS XML files or directories"
|
|
10
|
+
method_option :show_unchanged, type: :boolean, default: false,
|
|
11
|
+
desc: "Show unchanged attributes in the diff output"
|
|
12
|
+
method_option :highlight_diff, type: :boolean, default: false,
|
|
13
|
+
desc: "Highlight only the differences"
|
|
11
14
|
method_option :color, type: :string, enum: %w[auto on off], default: "auto",
|
|
12
15
|
desc: "Use colors in the diff output (auto, on, off)"
|
|
13
16
|
|
|
@@ -27,7 +30,9 @@ module LocMods
|
|
|
27
30
|
|
|
28
31
|
records_by_url = {}
|
|
29
32
|
all_records.each do |record|
|
|
30
|
-
urls = record[:record].location.flat_map
|
|
33
|
+
urls = record[:record].location.flat_map do |loc|
|
|
34
|
+
loc.url.map(&:content)
|
|
35
|
+
end.compact
|
|
31
36
|
unless urls.any?
|
|
32
37
|
puts "Warning: Record without URL found in file: #{record[:file]}"
|
|
33
38
|
next
|
|
@@ -54,7 +59,7 @@ module LocMods
|
|
|
54
59
|
record2[:record],
|
|
55
60
|
options[:show_unchanged],
|
|
56
61
|
options[:highlight_diff],
|
|
57
|
-
color_enabled
|
|
62
|
+
color_enabled?,
|
|
58
63
|
)
|
|
59
64
|
puts "\n"
|
|
60
65
|
end
|
|
@@ -71,14 +76,15 @@ module LocMods
|
|
|
71
76
|
end
|
|
72
77
|
end
|
|
73
78
|
|
|
74
|
-
def print_differences(record1, record2, show_unchanged, highlight_diff,
|
|
79
|
+
def print_differences(record1, record2, show_unchanged, highlight_diff,
|
|
80
|
+
use_colors)
|
|
75
81
|
diff_score, diff_tree = Lutaml::Model::Serialize.diff_with_score(
|
|
76
82
|
record1,
|
|
77
83
|
record2,
|
|
78
84
|
show_unchanged: show_unchanged,
|
|
79
85
|
highlight_diff: highlight_diff,
|
|
80
86
|
use_colors: use_colors,
|
|
81
|
-
indent: " "
|
|
87
|
+
indent: " ",
|
|
82
88
|
)
|
|
83
89
|
similarity_percentage = (1 - diff_score) * 100
|
|
84
90
|
|
|
@@ -101,7 +107,7 @@ module LocMods
|
|
|
101
107
|
def supports_color?
|
|
102
108
|
return false unless $stdout.tty?
|
|
103
109
|
|
|
104
|
-
if RbConfig::CONFIG["host_os"]
|
|
110
|
+
if /mswin|mingw|cygwin/.match?(RbConfig::CONFIG["host_os"])
|
|
105
111
|
return true if ENV["ANSICON"]
|
|
106
112
|
return true if ENV["ConEmuANSI"] == "ON"
|
|
107
113
|
return true if ENV["TERM"] == "xterm"
|
|
@@ -109,7 +115,7 @@ module LocMods
|
|
|
109
115
|
|
|
110
116
|
return true if ENV["COLORTERM"]
|
|
111
117
|
|
|
112
|
-
term = ENV
|
|
118
|
+
term = ENV.fetch("TERM", nil)
|
|
113
119
|
return false if term.nil? || term.empty?
|
|
114
120
|
|
|
115
121
|
color_terms = %w[ansi color console cygwin gnome konsole kterm
|
data/lib/loc_mods/collection.rb
CHANGED
|
@@ -19,8 +19,8 @@ module LocMods
|
|
|
19
19
|
attribute :item_identifier, ItemIdentifier, collection: true
|
|
20
20
|
|
|
21
21
|
xml do
|
|
22
|
-
|
|
23
|
-
namespace
|
|
22
|
+
element "copyInformation"
|
|
23
|
+
namespace Namespace
|
|
24
24
|
|
|
25
25
|
map_element "form", to: :form
|
|
26
26
|
map_element "subLocation", to: :sub_location
|
data/lib/loc_mods/date.rb
CHANGED
|
@@ -5,18 +5,18 @@ require "lutaml/model"
|
|
|
5
5
|
module LocMods
|
|
6
6
|
class Date < Lutaml::Model::Serializable
|
|
7
7
|
attribute :content, :string
|
|
8
|
-
attribute :
|
|
8
|
+
attribute :encoding_code, :string
|
|
9
9
|
attribute :qualifier, :string
|
|
10
10
|
attribute :point, :string
|
|
11
11
|
attribute :key_date, :string
|
|
12
12
|
attribute :calendar, :string
|
|
13
13
|
|
|
14
14
|
xml do
|
|
15
|
-
|
|
16
|
-
namespace
|
|
15
|
+
element "recordChangeDate"
|
|
16
|
+
namespace Namespace
|
|
17
17
|
|
|
18
18
|
map_content to: :content
|
|
19
|
-
map_attribute "encoding", to: :
|
|
19
|
+
map_attribute "encoding", to: :encoding_code
|
|
20
20
|
map_attribute "qualifier", to: :qualifier
|
|
21
21
|
map_attribute "point", to: :point
|
|
22
22
|
map_attribute "keyDate", to: :key_date
|
data/lib/loc_mods/date_other.rb
CHANGED
data/lib/loc_mods/detail.rb
CHANGED
|
@@ -11,8 +11,8 @@ module LocMods
|
|
|
11
11
|
attribute :title, :string, collection: true
|
|
12
12
|
|
|
13
13
|
xml do
|
|
14
|
-
|
|
15
|
-
namespace
|
|
14
|
+
element "detail"
|
|
15
|
+
namespace Namespace
|
|
16
16
|
|
|
17
17
|
map_attribute "type", to: :type
|
|
18
18
|
map_attribute "level", to: :level
|
data/lib/loc_mods/edition.rb
CHANGED
|
@@ -8,8 +8,8 @@ module LocMods
|
|
|
8
8
|
attribute :unit_type, :string
|
|
9
9
|
|
|
10
10
|
xml do
|
|
11
|
-
|
|
12
|
-
namespace
|
|
11
|
+
element "enumerationAndChronology"
|
|
12
|
+
namespace Namespace
|
|
13
13
|
|
|
14
14
|
map_content to: :content
|
|
15
15
|
map_attribute "unitType", to: :unit_type
|
data/lib/loc_mods/extent.rb
CHANGED
data/lib/loc_mods/form.rb
CHANGED
data/lib/loc_mods/genre.rb
CHANGED
|
@@ -10,8 +10,8 @@ module LocMods
|
|
|
10
10
|
attribute :authority, :string
|
|
11
11
|
|
|
12
12
|
xml do
|
|
13
|
-
|
|
14
|
-
namespace
|
|
13
|
+
element "geographicCode"
|
|
14
|
+
namespace Namespace
|
|
15
15
|
|
|
16
16
|
map_content to: :content
|
|
17
17
|
map_attribute "authorityURI", to: :authority_uri
|
|
@@ -26,8 +26,8 @@ module LocMods
|
|
|
26
26
|
attribute :area, Area, collection: true
|
|
27
27
|
|
|
28
28
|
xml do
|
|
29
|
-
|
|
30
|
-
namespace
|
|
29
|
+
element "hierarchicalGeographic"
|
|
30
|
+
namespace Namespace
|
|
31
31
|
|
|
32
32
|
map_attribute "authority", to: :authority
|
|
33
33
|
map_attribute "authorityURI", to: :authority_uri
|
|
@@ -9,8 +9,8 @@ module LocMods
|
|
|
9
9
|
attribute :copy_information, CopyInformation, collection: true
|
|
10
10
|
|
|
11
11
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
12
|
+
element "holdingSimple"
|
|
13
|
+
namespace Namespace
|
|
14
14
|
|
|
15
15
|
map_element "copyInformation", to: :copy_information
|
|
16
16
|
end
|
data/lib/loc_mods/identifier.rb
CHANGED
|
@@ -12,8 +12,8 @@ module LocMods
|
|
|
12
12
|
attribute :alt_rep_group, :string
|
|
13
13
|
|
|
14
14
|
xml do
|
|
15
|
-
|
|
16
|
-
namespace
|
|
15
|
+
element "nameIdentifier"
|
|
16
|
+
namespace Namespace
|
|
17
17
|
|
|
18
18
|
map_content to: :content
|
|
19
19
|
map_attribute "displayLabel", to: :display_label
|
data/lib/loc_mods/language.rb
CHANGED
|
@@ -18,8 +18,8 @@ module LocMods
|
|
|
18
18
|
attribute :script_term, ScriptTerm, collection: true
|
|
19
19
|
|
|
20
20
|
xml do
|
|
21
|
-
|
|
22
|
-
namespace
|
|
21
|
+
element "languageOfCataloging"
|
|
22
|
+
namespace Namespace
|
|
23
23
|
|
|
24
24
|
map_attribute "objectPart", to: :object_part
|
|
25
25
|
map_attribute "lang", to: :lang
|
|
@@ -11,8 +11,8 @@ module LocMods
|
|
|
11
11
|
attribute :type, :string
|
|
12
12
|
|
|
13
13
|
xml do
|
|
14
|
-
|
|
15
|
-
namespace
|
|
14
|
+
element "languageTerm"
|
|
15
|
+
namespace Namespace
|
|
16
16
|
|
|
17
17
|
map_content to: :content
|
|
18
18
|
map_attribute "authorityURI", to: :authority_uri
|
data/lib/loc_mods/location.rb
CHANGED
|
@@ -21,8 +21,8 @@ module LocMods
|
|
|
21
21
|
attribute :holding_external, CartographicExtension
|
|
22
22
|
|
|
23
23
|
xml do
|
|
24
|
-
|
|
25
|
-
namespace
|
|
24
|
+
element "location"
|
|
25
|
+
namespace Namespace
|
|
26
26
|
|
|
27
27
|
map_attribute "lang", to: :lang
|
|
28
28
|
map_attribute "script", to: :script
|
data/lib/loc_mods/name.rb
CHANGED
|
@@ -29,15 +29,13 @@ module LocMods
|
|
|
29
29
|
attribute :name_identifier, Identifier, collection: true
|
|
30
30
|
attribute :alternative_name, AlternativeName, collection: true
|
|
31
31
|
attribute :etal, :string
|
|
32
|
-
attribute :href,
|
|
32
|
+
attribute :href, XlinkHref
|
|
33
33
|
|
|
34
34
|
xml do
|
|
35
|
-
|
|
36
|
-
namespace
|
|
35
|
+
element "name"
|
|
36
|
+
namespace Namespace
|
|
37
37
|
|
|
38
|
-
map_attribute "href", to: :href
|
|
39
|
-
namespace: "http://www.w3.org/1999/xlink",
|
|
40
|
-
prefix: "xlink"
|
|
38
|
+
map_attribute "href", to: :href
|
|
41
39
|
|
|
42
40
|
map_attribute "ID", to: :id
|
|
43
41
|
map_attribute "authority", to: :authority
|
data/lib/loc_mods/name_part.rb
CHANGED