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.
- 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
@@ -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
|
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,8 +26,8 @@ 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
33
|
root "originInfo"
|
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,23 +1,23 @@
|
|
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
|
@@ -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"
|