app/searchers/quick_search/world_cat_discovery_api_article_searcher.rb
def item_link(bib)
      doi_link = doi_generator(bib)

      # Return DOI link, in one exists
      return doi_link if doi_link

      # Query OpenURL resolve service for results
      open_url_links = open_url_generator(bib)
      if open_url_links.size.positive?
        # If there is only one result, return it
        return open_url_links[0] if open_url_links.size == 1

        # If there are multiple results, return a "Citation Finder" link
        return citation_generator(bib)
      end

      # Default -- return link to the catalog detail page
      catalog_generator(bib)
    end
# Returns the link to use for the given item.
Returns the link to use for the given item.
Returns the link to use for the given item .
def item_link(bib)
      doi_link = doi_generator(bib)
      return doi_link if doi_link
      open_url_links = open_url_generator(bib)
      if open_url_links.size.positive?
        return open_url_links[0] if open_url_links.size == 1
        return citation_generator(bib)
      end
      catalog_generator(bib)
    end
def item_link ( bib ) doi_link = doi_generator ( bib ) return doi_link if doi_link open_url_links = open_url_generator ( bib ) if open_url_links . size . positive? return open_url_links [ 0 ] if open_url_links . size == 1 return citation_generator ( bib ) end catalog_generator ( bib ) end
Returns the link to use for the given item.
Returns the link to use for the given item .
# Return DOI link, in one exists # Query OpenURL resolve service for results # If there is only one result, return it # If there are multiple results, return a "Citation Finder" link # Default -- return link to the catalog detail page
bib