lib/cocina/models/dro.rb in cocina-models-0.22.1 vs lib/cocina/models/dro.rb in cocina-models-0.22.2
- old
+ new
@@ -32,10 +32,12 @@
attribute :access, Types::String.default('dark')
.enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
end
attribute :embargo, Embargo.optional.meta(omittable: true)
+ attribute :access, Types::String.default('dark')
+ .enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
end
# Subschema for administrative concerns
class Administrative < Struct
attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true).default([].freeze)
@@ -52,20 +54,21 @@
# Structural sub-schema for the DRO
class Structural < Struct
attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true)
attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
+ attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
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.default(nil)
+ attribute :description, Description.optional.meta(omittable: true)
attribute(:identification, Identification.default { Identification.new })
attribute(:structural, Structural.default { Structural.new })
def self.from_dynamic(dyn)
DRO.new(dyn)