app/models/bplmodels/mods_desc_metadata.rb
#include Hydra::Datastream::CommonModsIndexMethods
# MODS XML constants.
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
def insert_physical_location(location=nil, sublocation=nil,shelf_locator=nil, location_type=nil)
      location_index = self.mods(0).item_location.count
      for index in 0..self.mods(0).item_location.count-1
        if self.mods(0).item_location(index).url.blank?
          location_index = index
        end
      end
      physical_location_index = 0
      self.mods(0).item_location(location_index).physical_location(physical_location_index, location) unless location.blank?
      self.mods(0).item_location(location_index).physical_location(physical_location_index).type = location_type unless location.blank?
      self.mods(0).item_location(location_index).holding_simple(0).copy_information(0).sub_location = sublocation unless sublocation.blank?
      self.mods(0).item_location(location_index).holding_simple(0).copy_information(0).shelf_locator = shelf_locator unless shelf_locator.blank?
    end
def insert_physical_location ( location = nil , sublocation = nil , shelf_locator = nil , location_type = nil ) location_index = self . mods ( 0 ) . item_location . count for index in 0 .. self . mods ( 0 ) . item_location . count - 1 if self . mods ( 0 ) . item_location ( index ) . url . blank? location_index = index end end physical_location_index = 0 self . mods ( 0 ) . item_location ( location_index ) . physical_location ( physical_location_index , location ) unless location . blank? self . mods ( 0 ) . item_location ( location_index ) . physical_location ( physical_location_index ) . type = location_type unless location . blank? self . mods ( 0 ) . item_location ( location_index ) . holding_simple ( 0 ) . copy_information ( 0 ) . sub_location = sublocation unless sublocation . blank? self . mods ( 0 ) . item_location ( location_index ) . holding_simple ( 0 ) . copy_information ( 0 ) . shelf_locator = shelf_locator unless shelf_locator . blank? end
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
#Create a new tag unless there is a non-url tag already...
location
sublocation
shelf_locator
location_type