lib/hydra/works/services/characterization_service.rb
# Get proxy terms and values from the parser
Get proxy terms and values from the parser
Get proxy terms and values from the parser
def characterization_terms(omdoc)
        h = {}
        omdoc.class.terminology.terms.each_pair do |key, target|
          next unless target.respond_to? :proxied_term
          begin
            h[key] = omdoc.send(key)
          rescue NoMethodError
            next
          end
        end
        h.delete_if { |_k, v| v.empty? }
      end
def characterization_terms ( omdoc ) h = { } omdoc . class . terminology . terms . each_pair do | key , target | next unless target . respond_to? :proxied_term begin h [ key ] = omdoc . send ( key ) rescue NoMethodError next end end h . delete_if { | _k , v | v . empty? } end
Get proxy terms and values from the parser
Get proxy terms and values from the parser
# a key is a proxy if its target responds to proxied_term
omdoc
<not_specific>