lib/cocina/models/dro.rb in cocina-models-0.24.0 vs lib/cocina/models/dro.rb in cocina-models-0.25.0

- old
+ new

@@ -53,22 +53,29 @@ end # Structural sub-schema for the DRO class Structural < Struct attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true) + attribute :hasAgreement, Types::Strict::String.meta(omittable: true) attribute :isMemberOf, Types::Strict::String.meta(omittable: true) attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true) end + # Geographic sub-schema for the DRO + class Geographic < Struct + attribute :iso19139, Types::Strict::String + end + attribute :externalIdentifier, Types::Strict::String attribute :type, Types::String.enum(*TYPES) attribute :label, Types::Strict::String attribute :version, Types::Coercible::Integer attribute(:access, Access.default { Access.new }) attribute(:administrative, Administrative.default { Administrative.new }) # Allowing description to be omittable for now (until rolled out to consumers), # but I think it's actually required for every DRO attribute :description, Description.optional.meta(omittable: true) + attribute :geographic, Geographic.optional.meta(omittable: true) attribute(:identification, Identification.default { Identification.new }) attribute(:structural, Structural.default { Structural.new }) def self.from_dynamic(dyn) DRO.new(dyn)