# File lib/openurl/context_object_entity.rb, line 130
    def to_hash
      co_hash = {}
      
      @metadata.each do |k,v|
        co_hash["#{@abbr}.#{k}"]=v if v
      end
      
      co_hash["#{@abbr}_val_fmt"]="info:ofi/fmt:xml:xsd:#{@format}" if @format              

      if @reference["format"] 
        co_hash["#{@abbr}_ref_fmt"]=@reference["format"]
        co_hash["#{@abbr}_ref"]=@reference["location"]
      end
      
      @identifiers.each do |id|
        # Put em in a list. 
        co_hash["#{@abbr}_id"] ||= Array.new
        co_hash["#{@abbr}_id"].push( id )
      end
      co_hash["#{@abbr}_dat"]=@private_data if @private_data
              
      return co_hash    
    end