# File lib/openurl/context_object.rb, line 104
    def to_hash
      co_hash = {"url_ver"=>"Z39.88-2004"}           
      
      @admin.each_key do |k|
        co_hash[k]=@admin[k]["value"] if @admin[k]["value"]
      end

      [@referent, @referringEntity, @requestor, @referrer].each do | ent |
        co_hash.merge!(ent.to_hash) unless ent.empty?
      end
      
      [@serviceType, @resolver, @custom].each do |entCont|
        entCont.each do |ent|
          co_hash.merge!(ent.to_hash) unless ent.empty?
        end
      end        
      return co_hash
    end