Module: Ddr::Models::HasStructMetadata
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ddr/models/has_struct_metadata.rb
Instance Method Summary collapse
- #build_default_structure ⇒ Object
- #multires_image_file_paths(type = 'default') ⇒ Object
- #structure ⇒ Object
Instance Method Details
#build_default_structure ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/ddr/models/has_struct_metadata.rb', line 20 def build_default_structure structure = Ddr::Models::Structure.new(Ddr::Models::Structure.template) children = find_children children.each do |child| add_to_struct_map(structure, child) end structure end |
#multires_image_file_paths(type = 'default') ⇒ Object
29 30 31 |
# File 'lib/ddr/models/has_struct_metadata.rb', line 29 def multires_image_file_paths(type='default') ::SolrDocument.find(id).multires_image_file_paths(type) end |
#structure ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/ddr/models/has_struct_metadata.rb', line 11 def structure unless @structure if attached_files[Ddr::Models::File::STRUCT_METADATA].content @structure = Ddr::Models::Structure.new(Nokogiri::XML(attached_files[Ddr::Models::File::STRUCT_METADATA].content)) end end @structure end |