app/models/bplmodels/mods_desc_metadata.rb
def insert_subject_topic(topic=nil, valueURI=nil, authority=nil)
      if topic.present? && !self.mods(0).subject.topic.any?{ |top| top == topic }
        subject_index = self.mods(0).subject.count
        self.mods(0).subject(subject_index).topic = topic unless topic.blank?
        self.mods(0).subject(subject_index).valueURI = valueURI unless valueURI.blank?
        unless authority.blank?
          self.mods(0).subject(subject_index).authority = authority
          self.mods(0).subject(subject_index).authorityURI = BplEnrich::Authorities.authority_uri(authority)
        end
      end
    end
#include Hydra::Datastream::CommonModsIndexMethods
# MODS XML constants.
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
def insert_subject_topic(topic=nil, valueURI=nil, authority=nil)
      if topic.present? && !self.mods(0).subject.topic.any?{ |top| top == topic }
        subject_index = self.mods(0).subject.count
        self.mods(0).subject(subject_index).topic = topic unless topic.blank?
        self.mods(0).subject(subject_index).valueURI = valueURI unless valueURI.blank?
        unless authority.blank?
          self.mods(0).subject(subject_index).authority = authority
          self.mods(0).subject(subject_index).authorityURI = BplEnrich::Authorities.authority_uri(authority)
        end
      end
    end
def insert_subject_topic ( topic = nil , valueURI = nil , authority = nil ) if topic . present? && ! self . mods ( 0 ) . subject . topic . any? { | top | top == topic } subject_index = self . mods ( 0 ) . subject . count self . mods ( 0 ) . subject ( subject_index ) . topic = topic unless topic . blank? self . mods ( 0 ) . subject ( subject_index ) . valueURI = valueURI unless valueURI . blank? unless authority . blank? self . mods ( 0 ) . subject ( subject_index ) . authority = authority self . mods ( 0 ) . subject ( subject_index ) . authorityURI = BplEnrich :: Authorities . authority_uri ( authority ) end end end
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
topic
valueURI
authority