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
data/lib/loc_mods/identifier.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 Identifier <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
10
|
-
attribute :type_uri,
|
11
|
-
attribute :invalid,
|
12
|
-
attribute :alt_rep_group,
|
6
|
+
class Identifier < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :display_label, :string
|
9
|
+
attribute :type, :string
|
10
|
+
attribute :type_uri, :string
|
11
|
+
attribute :invalid, :string
|
12
|
+
attribute :alt_rep_group, :string
|
13
13
|
|
14
14
|
xml do
|
15
15
|
root "nameIdentifier"
|
@@ -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 ItemIdentifier <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
6
|
+
class ItemIdentifier < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :type, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "itemIdentifier"
|
data/lib/loc_mods/language.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "language_term"
|
6
6
|
require_relative "script_term"
|
7
7
|
|
8
8
|
module LocMods
|
9
|
-
class Language <
|
10
|
-
attribute :object_part,
|
11
|
-
attribute :lang,
|
12
|
-
attribute :script,
|
13
|
-
attribute :transliteration,
|
14
|
-
attribute :display_label,
|
15
|
-
attribute :alt_rep_group,
|
16
|
-
attribute :usage,
|
9
|
+
class Language < Lutaml::Model::Serializable
|
10
|
+
attribute :object_part, :string
|
11
|
+
attribute :lang, :string
|
12
|
+
attribute :script, :string
|
13
|
+
attribute :transliteration, :string
|
14
|
+
attribute :display_label, :string
|
15
|
+
attribute :alt_rep_group, :string
|
16
|
+
attribute :usage, :string
|
17
17
|
attribute :language_term, LanguageTerm, collection: true
|
18
18
|
attribute :script_term, ScriptTerm, collection: true
|
19
19
|
|
@@ -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 LanguageTerm <
|
7
|
-
attribute :content,
|
8
|
-
attribute :authority_uri,
|
9
|
-
attribute :value_uri,
|
10
|
-
attribute :authority,
|
11
|
-
attribute :type,
|
6
|
+
class LanguageTerm < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :authority_uri, :string
|
9
|
+
attribute :value_uri, :string
|
10
|
+
attribute :authority, :string
|
11
|
+
attribute :type, :string
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "languageTerm"
|
data/lib/loc_mods/location.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 "cartographic_extension"
|
6
6
|
require_relative "holding_simple"
|
@@ -8,14 +8,14 @@ require_relative "physical_location"
|
|
8
8
|
require_relative "url"
|
9
9
|
|
10
10
|
module LocMods
|
11
|
-
class Location <
|
12
|
-
attribute :lang,
|
13
|
-
attribute :script,
|
14
|
-
attribute :transliteration,
|
15
|
-
attribute :display_label,
|
16
|
-
attribute :alt_rep_group,
|
11
|
+
class Location < Lutaml::Model::Serializable
|
12
|
+
attribute :lang, :string
|
13
|
+
attribute :script, :string
|
14
|
+
attribute :transliteration, :string
|
15
|
+
attribute :display_label, :string
|
16
|
+
attribute :alt_rep_group, :string
|
17
17
|
attribute :physical_location, PhysicalLocation, collection: true
|
18
|
-
attribute :shelf_locator,
|
18
|
+
attribute :shelf_locator, :string, collection: true
|
19
19
|
attribute :url, Url, collection: true
|
20
20
|
attribute :holding_simple, HoldingSimple
|
21
21
|
attribute :holding_external, CartographicExtension
|
data/lib/loc_mods/name.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 "alternative_name"
|
6
6
|
require_relative "identifier"
|
@@ -8,28 +8,28 @@ require_relative "name_part"
|
|
8
8
|
require_relative "role"
|
9
9
|
|
10
10
|
module LocMods
|
11
|
-
class Name <
|
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,
|
20
|
-
attribute :alt_rep_group,
|
21
|
-
attribute :name_title_group,
|
22
|
-
attribute :usage,
|
23
|
-
attribute :type,
|
11
|
+
class Name < Lutaml::Model::Serializable
|
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
|
+
attribute :alt_rep_group, :string
|
21
|
+
attribute :name_title_group, :string
|
22
|
+
attribute :usage, :string
|
23
|
+
attribute :type, :string
|
24
24
|
attribute :name_part, NamePart, collection: true
|
25
|
-
attribute :display_form,
|
26
|
-
attribute :affiliation,
|
25
|
+
attribute :display_form, :string, collection: true
|
26
|
+
attribute :affiliation, :string, collection: true
|
27
27
|
attribute :role, Role, collection: true
|
28
|
-
attribute :description,
|
28
|
+
attribute :description, :string, collection: true
|
29
29
|
attribute :name_identifier, Identifier, collection: true
|
30
30
|
attribute :alternative_name, AlternativeName, collection: true
|
31
|
-
attribute :etal,
|
32
|
-
attribute :href,
|
31
|
+
attribute :etal, :string
|
32
|
+
attribute :href, :string
|
33
33
|
|
34
34
|
xml do
|
35
35
|
root "name"
|
data/lib/loc_mods/name_part.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 NamePart <
|
7
|
-
attribute :content,
|
8
|
-
attribute :type,
|
6
|
+
class NamePart < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :type, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "namePart"
|
data/lib/loc_mods/non_sort.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 NonSort <
|
7
|
-
attribute :content,
|
8
|
-
attribute :space,
|
6
|
+
class NonSort < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :space, :string
|
9
9
|
|
10
10
|
xml do
|
11
11
|
root "nonSort"
|
data/lib/loc_mods/note.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 Note <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
10
|
-
attribute :id,
|
11
|
-
attribute :script,
|
6
|
+
class Note < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :display_label, :string
|
9
|
+
attribute :type, :string
|
10
|
+
attribute :id, :string
|
11
|
+
attribute :script, :string
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "note"
|
data/lib/loc_mods/occupation.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
6
|
# LocMods::StringPlusLanguagePlusAuthority
|
7
|
-
class Occupation <
|
8
|
-
attribute :content,
|
9
|
-
attribute :authority,
|
10
|
-
attribute :authority_uri,
|
11
|
-
attribute :value_uri,
|
7
|
+
class Occupation < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
attribute :authority, :string
|
10
|
+
attribute :authority_uri, :string
|
11
|
+
attribute :value_uri, :string
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "occupation"
|
data/lib/loc_mods/origin_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 "date_other"
|
@@ -9,13 +9,13 @@ require_relative "publisher"
|
|
9
9
|
require_relative "edition"
|
10
10
|
|
11
11
|
module LocMods
|
12
|
-
class OriginInfo <
|
13
|
-
attribute :lang,
|
14
|
-
attribute :script,
|
15
|
-
attribute :transliteration,
|
16
|
-
attribute :display_label,
|
17
|
-
attribute :alt_rep_group,
|
18
|
-
attribute :event_type,
|
12
|
+
class OriginInfo < 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
|
+
attribute :event_type, :string
|
19
19
|
attribute :place, Place, collection: true
|
20
20
|
attribute :publisher, Publisher, collection: true
|
21
21
|
attribute :date_issued, Date, collection: true
|
@@ -26,11 +26,11 @@ module LocMods
|
|
26
26
|
attribute :copyright_date, Date, collection: true
|
27
27
|
attribute :date_other, DateOther, collection: true
|
28
28
|
attribute :edition, Edition, collection: true
|
29
|
-
attribute :issuance,
|
30
|
-
attribute :frequency,
|
29
|
+
attribute :issuance, :string, collection: true
|
30
|
+
attribute :frequency, :string, collection: true
|
31
31
|
|
32
32
|
xml do
|
33
|
-
root "originInfo"
|
33
|
+
root "originInfo", ordered: true
|
34
34
|
namespace "http://www.loc.gov/mods/v3", nil
|
35
35
|
|
36
36
|
map_attribute "lang", to: :lang
|
data/lib/loc_mods/part.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 "detail"
|
@@ -8,15 +8,15 @@ require_relative "extent_definition"
|
|
8
8
|
require_relative "text"
|
9
9
|
|
10
10
|
module LocMods
|
11
|
-
class Part <
|
12
|
-
attribute :id,
|
13
|
-
attribute :type,
|
14
|
-
attribute :order,
|
15
|
-
attribute :lang,
|
16
|
-
attribute :script,
|
17
|
-
attribute :transliteration,
|
18
|
-
attribute :display_label,
|
19
|
-
attribute :alt_rep_group,
|
11
|
+
class Part < Lutaml::Model::Serializable
|
12
|
+
attribute :id, :string
|
13
|
+
attribute :type, :string
|
14
|
+
attribute :order, :integer
|
15
|
+
attribute :lang, :string
|
16
|
+
attribute :script, :string
|
17
|
+
attribute :transliteration, :string
|
18
|
+
attribute :display_label, :string
|
19
|
+
attribute :alt_rep_group, :string
|
20
20
|
attribute :detail, Detail, collection: true
|
21
21
|
attribute :extent, ExtentDefinition, collection: true
|
22
22
|
attribute :date, Date, collection: true
|
@@ -1,27 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "extent"
|
6
6
|
require_relative "form"
|
7
7
|
require_relative "physical_description_note"
|
8
8
|
|
9
9
|
module LocMods
|
10
|
-
class PhysicalDescription <
|
11
|
-
attribute :lang,
|
12
|
-
attribute :script,
|
13
|
-
attribute :transliteration,
|
14
|
-
attribute :display_label,
|
15
|
-
attribute :alt_rep_group,
|
10
|
+
class PhysicalDescription < Lutaml::Model::Serializable
|
11
|
+
attribute :lang, :string
|
12
|
+
attribute :script, :string
|
13
|
+
attribute :transliteration, :string
|
14
|
+
attribute :display_label, :string
|
15
|
+
attribute :alt_rep_group, :string
|
16
16
|
attribute :form, Form, collection: true
|
17
|
-
attribute :reformatting_quality,
|
18
|
-
attribute :internet_media_type,
|
17
|
+
attribute :reformatting_quality, :string, collection: true
|
18
|
+
attribute :internet_media_type, :string, collection: true
|
19
19
|
attribute :extent, Extent, collection: true
|
20
|
-
attribute :digital_origin,
|
20
|
+
attribute :digital_origin, :string, collection: true
|
21
21
|
attribute :note, PhysicalDescriptionNote, collection: true
|
22
22
|
|
23
23
|
xml do
|
24
|
-
root "physicalDescription"
|
24
|
+
root "physicalDescription", ordered: true
|
25
25
|
namespace "http://www.loc.gov/mods/v3", nil
|
26
26
|
|
27
27
|
map_attribute "lang", to: :lang
|
@@ -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 PhysicalDescriptionNote <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
10
|
-
attribute :type_uri,
|
11
|
-
attribute :id,
|
6
|
+
class PhysicalDescriptionNote < 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
12
|
|
13
13
|
xml do
|
14
14
|
root "physicalDescriptionNote"
|
@@ -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 PhysicalLocation <
|
7
|
-
attribute :content,
|
8
|
-
attribute :display_label,
|
9
|
-
attribute :type,
|
6
|
+
class PhysicalLocation < 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 "physicalLocation"
|
data/lib/loc_mods/place.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require "lutaml/model"
|
4
4
|
|
5
5
|
require_relative "place_term"
|
6
6
|
|
7
7
|
module LocMods
|
8
|
-
class Place <
|
9
|
-
attribute :supplied,
|
8
|
+
class Place < Lutaml::Model::Serializable
|
9
|
+
attribute :supplied, :string
|
10
10
|
attribute :place_term, PlaceTerm, collection: true
|
11
11
|
|
12
12
|
xml do
|
data/lib/loc_mods/place_term.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 PlaceTerm <
|
7
|
-
attribute :content,
|
8
|
-
attribute :authority_uri,
|
9
|
-
attribute :value_uri,
|
10
|
-
attribute :authority,
|
11
|
-
attribute :type,
|
6
|
+
class PlaceTerm < Lutaml::Model::Serializable
|
7
|
+
attribute :content, :string
|
8
|
+
attribute :authority_uri, :string
|
9
|
+
attribute :value_uri, :string
|
10
|
+
attribute :authority, :string
|
11
|
+
attribute :type, :string
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "placeTerm"
|
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
|
@@ -49,7 +49,7 @@ module LocMods
|
|
49
49
|
attribute :type_of_resource, TypeOfResource, collection: true
|
50
50
|
|
51
51
|
xml do
|
52
|
-
root "mods"
|
52
|
+
root "mods", ordered: true
|
53
53
|
namespace "http://www.loc.gov/mods/v3", nil
|
54
54
|
|
55
55
|
map_attribute "ID", to: :id
|
@@ -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"
|