Sha256: 68783b85e2dcabc68d75a81b50a474f92d915b6ae9e04a64b74f80454c2a68cd

Contents?: true

Size: 459 Bytes

Versions: 43

Compression:

Stored size: 459 Bytes

Contents

module Ddr
  module HasStructMetadata
    extend ActiveSupport::Concern

    included do
      attribute :struct_metadata, Ddr::File.optional
    end

    def structure
      if has_struct_metadata?
        file = Ddr.storage_adapter.find_by(id: struct_metadata.file_identifier)
        Ddr::Structure.new(Nokogiri::XML(file))
      end
    end

    #def multires_image_file_paths
    #  ::SolrDocument.find(pid).multires_image_file_paths
    #end

  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ddr-core-1.17.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.16.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.15.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.14.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.13.2 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.13.1 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.13.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.12.2 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.12.1 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.12.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.11.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.10.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.9.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.8.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.7.0 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.6.6 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.6.5 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.6.4 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.6.3 app/models/concerns/ddr/has_struct_metadata.rb
ddr-core-1.6.2 app/models/concerns/ddr/has_struct_metadata.rb