# File lib/openurl/context_object.rb, line 384
    def import_context_object(context_object)
        @admin.each_key { |k|
                self.set_administration_key(k, context_object.admin[k]["value"])
        }  
      [context_object.referent, context_object.referringEntity, context_object.requestor, context_object.referrer].each {| ent |
        unless ent.empty?
          ['identifier', 'format', 'private_data'].each { |var|
            unless ent.send(var).nil?
              unless ent.kind_of?(OpenURL::ReferringEntity)
                eval("@"+ent.label.downcase).send('set_'+var,ent.send(var))
              else
                @referringEntity.send('set_'+var,ent.send(var))
              end
            end
          }
          unless ent.reference["format"].nil? or ent.reference["format"].nil?
            unless ent.kind_of?(OpenURL::ReferringEntity)          
              eval("@"+ent.label.downcase).set_reference(ent.reference["location"], ent.reference["format"])
            else
              @referringEntity.set_referent(ent.reference["location"], ent.reference["format"])
            end
          end
          ent.metadata.each_key { |k|
            unless ent.metadata[k].nil?
              unless ent.kind_of?(OpenURL::ReferringEntity)          
                eval("@"+ent.label.downcase).set_metadata(k, ent.metadata[k])
              else
                @referringEntity.set_metadata(k, ent.metadata[k])
              end
            end
          }
        end
      }
      context_object.serviceType.each { |svc|
        if @serviceType[0].empty?
          @serviceType[0] = svc
        else
          idx = self.add_service_type_entity
          @serviceType[idx] = svc
        end
          
      }
      context_object.resolver.each { |res|
        if @resolver[0].empty?
          @resolver[0] = res
        else
          idx = self.add_resolver_entity
          @resolver[idx] = res
        end
          
      }
      context_object.custom.each { |cus|
        idx = self.add_custom_entity(cus.abbr, cus.label)
        @custom[idx] = cus
      }         
    end