# File lib/openurl/context_object.rb, line 360
    def translate_abbr(abbr)
      if @@defined_entities.has_key?abbr
        ent = @@defined_entities[abbr]
        if ent == "service-type"
          ent = "serviceType[0]"
        elsif ent == "resolver"
          ent = "resolver[0]"
        elsif ent == "referring-entity"      
          ent = "referringEntity"
        end
      else
        idx = self.search_custom_entities("abbr", abbr)
        if idx.length == 0
          self.add_custom_entity(abbr)
          idx = self.search_custom_entities("abbr", abbr)
        end
        ent = "custom["+idx[0].to_s+"]"
      end
      return ent
    end