lib/cocina/models/file_set.rb in cocina-models-0.29.0 vs lib/cocina/models/file_set.rb in cocina-models-0.30.0

- old
+ new

@@ -1,27 +1,20 @@ # frozen_string_literal: true module Cocina module Models - # Metadata for a file set. - # See http://sul-dlss.github.io/cocina-models/maps/Fileset.json class FileSet < Struct include Checkable - TYPES = [ - Vocab.fileset - ].freeze + TYPES = ['http://cocina.sul.stanford.edu/models/fileset.jsonld'].freeze - class Identification < Struct - end - - # Structural sub-schema that contains File (unlike the one in RequestFileSet which contains RequestFile) - class Structural < Struct - attribute :contains, Types::Strict::Array.of(Cocina::Models::File).meta(omittable: true) - end - - include FileSetAttributes + # The content type of the Fileset. + attribute :type, Types::Strict::String.enum(*FileSet::TYPES) attribute :externalIdentifier, Types::Strict::String - attribute(:structural, Structural.default { Structural.new }) + # Primary processing label for a Fileset. + attribute :label, Types::Strict::String + # Version for the Fileset within SDR. + attribute :version, Types::Strict::Integer + attribute :structural, FileSetStructural.optional.meta(omittable: true) end end end