<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.code4lib.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=128.220.159.25</id>
		<title>Code4Lib - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.code4lib.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=128.220.159.25"/>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/Special:Contributions/128.220.159.25"/>
		<updated>2026-06-25T12:24:32Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_URL_parameters&amp;diff=1206</id>
		<title>Umlaut URL parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_URL_parameters&amp;diff=1206"/>
				<updated>2008-10-27T17:31:55Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Umlaut]]&lt;br /&gt;
&lt;br /&gt;
Umlaut has a few custom URL parameters (can also be sent in a POST request) to control Umlaut behavior. All start with the prefix &amp;quot;umlaut.&amp;quot;. These are generally added onto an OpenURL GET request. &lt;br /&gt;
&lt;br /&gt;
===umlaut.request_id===&lt;br /&gt;
&lt;br /&gt;
Specify an already created OpenURL request to act upon.  Without this, Umlaut will still try to connect to an already created request *within the same session* based on a cache of OpenURLs seen in that session. But this process is not perfect. With umlaut.request_id, you can assure you are operating on the same request, and even if the client does not have cookies or a session. &lt;br /&gt;
&lt;br /&gt;
===umlaut.referent_id===&lt;br /&gt;
&lt;br /&gt;
Specify an Umlaut Referent object to re-use.  Umlaut referent object represents a particular citation. Unlike umlaut.request_id, won't re-use an entire request (with responses and state), but only the specified citation. &lt;br /&gt;
&lt;br /&gt;
===umlaut.skip_resolve_menu===&lt;br /&gt;
&lt;br /&gt;
Set to &amp;quot;false&amp;quot; to override umlaut's configuration for conditionally skipping the the resolve menu and going straight to content. umlaut.skip_resolve_menu=false forces display of full resolve menu. &lt;br /&gt;
&lt;br /&gt;
===umlaut.skip_resolve_menu_for_type===&lt;br /&gt;
&lt;br /&gt;
Set to the name(s) of [http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml Umlaut service types] (comma delimited), to force menu skipping (direct linking) for the first response found from any of the service types named. &lt;br /&gt;
&lt;br /&gt;
===umlaut.link_with_frameset===&lt;br /&gt;
&lt;br /&gt;
Set to &amp;quot;false&amp;quot; to force direct linking *without* the banner/frameset, just direct to vendor url. &lt;br /&gt;
&lt;br /&gt;
===umlaut.response_format===&lt;br /&gt;
&lt;br /&gt;
Generally used for API requests, value can be &amp;quot;xml&amp;quot;, &amp;quot;json&amp;quot;, or &amp;quot;jsonp&amp;quot;. In case of jsonp, umlaut.jsonp=jsFunctionName can be used to determine the js function name that will be generated with the [http://ajaxian.com/archives/jsonp-json-with-padding jsonp output]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut&amp;diff=1186</id>
		<title>Umlaut</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut&amp;diff=1186"/>
				<updated>2008-10-16T19:04:20Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: /* More information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Umlaut is OpenURL link resolving middleware that adds functions and services to commercial link resolving software such as SFX. &lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
[[About Umlaut]] - A gentle introduction to what Umlaut is and what it can do for you.&lt;br /&gt;
&lt;br /&gt;
[http://bibwild.wordpress.com/2008/10/16/umlaut-digital-book/ Digital Text Features] - A tour of some of the 'advanced' digital text features, with a demos pointing to JHU site, hosted on jrochkind's blog. &lt;br /&gt;
&lt;br /&gt;
[http://rubyforge.org/mail/?group_id=4382 Umlaut Listserv]&lt;br /&gt;
&lt;br /&gt;
[http://umlaut.rubyforge.org/ Rubyforge home page for developers]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut wishlist]]&lt;br /&gt;
&lt;br /&gt;
==Installation and Configuration==&lt;br /&gt;
&lt;br /&gt;
[[Umlaut Installation]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut Setup]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut_Deployment]]&lt;br /&gt;
&lt;br /&gt;
==Documentation==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
[http://umlaut.rubyforge.org/api/ Umlaut API Documentation]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut Technical Overview]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut_Deployment]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut Local Configuration Architecture]]&lt;br /&gt;
&lt;br /&gt;
===Specific Topics===&lt;br /&gt;
&lt;br /&gt;
[[Umlaut URL parameters]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut logging]]&lt;br /&gt;
&lt;br /&gt;
====APIs====&lt;br /&gt;
&lt;br /&gt;
[[Umlaut full API]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut partial html API]]&lt;br /&gt;
&lt;br /&gt;
[[Umlaut partial html API javascript helper]]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1164</id>
		<title>Umlaut partial html API javascript helper</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1164"/>
				<updated>2008-10-02T20:24:24Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to include Umlaut-generated HTML directly on a third party page via javascript, there is a javascript helper script to make that very easy. This helper uses the [[Umlaut partial html API]], but does everything for you.  The helper will update your divs, and keep polling Umlaut for new results, continuing to re-update your divs until Umlaut is finished.   How often it polls is configured by application config 'poll_wait_seconds', which defaults to 4 seconds. &lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
You need to specify your Umlaut base URL in a global javascript variable called umlaut_base. This is not your link resolver base url which for Umlaut ends in /resolve, but the actual Umlaut application base URL, which should be the same, without the /resolve.  At JHU, it's &amp;quot;http://findit.library.jhu.edu&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You also need to put a URL-formatted (KEV) OpenURL context object in a global js variable called umlaut_openurl_kev_co.&lt;br /&gt;
&lt;br /&gt;
You then specify mappings from Umlaut html sections to HTML divs on your page in global js variable called umlaut_section_map containing a hash. Umlaut html sections are configured in Umlaut in the &amp;quot;partial_html_map&amp;quot; configuration param, which by default is set to the &amp;quot;bg_update_map&amp;quot; config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section. &lt;br /&gt;
&lt;br /&gt;
You can also optionally use some javascript callbacks to perform behavior after or during loading. In the following example, we'll demo using a javascript callback to only show a div for search_inside functionality if there are search_inside tools provided. &lt;br /&gt;
&lt;br /&gt;
The umlaut_embed.js script will check if the javascript Prototype library is loaded into the host page, and load it if not. Among other things, this means you can use Prototype in your callbacks. &lt;br /&gt;
&lt;br /&gt;
The html loaded will sometimes include a &amp;quot;spinner&amp;quot; with a message &amp;quot;loading more&amp;quot;, if the content is not yet loaded. &lt;br /&gt;
&lt;br /&gt;
An example is best:&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;H1&amp;gt;Here is an article page. &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;We're looking up Cytoplasmic Control of nuclear behavior by Masui. Of course normally this&lt;br /&gt;
     would be dynamically generated, not in static html like this.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- umlaut full text will be loaded here. You might want to include some initial content&lt;br /&gt;
       here for browsers without javascript. For browsers with javascript, this will be overwritten.--&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_fulltext&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;a href=&amp;quot;http://umlaut.university.edu/resolve?url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui&amp;quot;&amp;gt;&lt;br /&gt;
        Link to umlaut&lt;br /&gt;
      &amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- we hide this div to start out with, our js callback later &lt;br /&gt;
       will show it there is full text. But we avoid a &amp;quot;spinner&amp;quot; showing up&lt;br /&gt;
       here before everything is fully loaded.  --&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_search_inside&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_cover&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_see_also&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_excerpts&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;!-- now the javascript to actually load content in those divs --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    // You have to generate an OpenURL context object somehow, and set it in a js global var. &lt;br /&gt;
    // Normally this would be generated dynamically, not static HTML like this, of course.&lt;br /&gt;
    // You may want to include a rfr_id to identify your application as a source, demo below. &lt;br /&gt;
&lt;br /&gt;
    umlaut_openurl_kev_co = 'url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui';&lt;br /&gt;
&lt;br /&gt;
    // set global js var to tell script where to find umlaut&lt;br /&gt;
    umlaut_base = 'http://umlaut.university.edu';&lt;br /&gt;
&lt;br /&gt;
    // Map of umlaut section id to: div id we want to put it on the page&lt;br /&gt;
    // Note the js call back for search_inside_wrapper, to only show the&lt;br /&gt;
    // div on our page if there are elements. Js callback function gets one&lt;br /&gt;
    // argument, which will be number of Umlaut responses in the section. &lt;br /&gt;
    // Note also that we can use Prototype in the callback. &lt;br /&gt;
&lt;br /&gt;
    umlaut_section_map = {&lt;br /&gt;
      'fulltext_wrapper': 'my_fulltext',&lt;br /&gt;
      'highlighted_links': 'my_see_also',&lt;br /&gt;
      'excerpts_wrapper': 'my_excerpts',&lt;br /&gt;
      'cover_image': 'my_cover',&lt;br /&gt;
      'search_inside_wrapper': {'host_div_id': 'my_search_inside', &lt;br /&gt;
                                'after_update':&lt;br /&gt;
                                  function(count) {&lt;br /&gt;
                                    if ( count &amp;gt; 0) {&lt;br /&gt;
                                        $('my_search_inside').show();&lt;br /&gt;
                                    }&lt;br /&gt;
                                  }&lt;br /&gt;
                              }&lt;br /&gt;
      };&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- now actually load the umlaut js helper, which will do the magic for you --&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://umlaut.university.edu/javascripts/embed/umlaut-embed.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1163</id>
		<title>Umlaut partial html API javascript helper</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1163"/>
				<updated>2008-10-02T20:23:19Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to include Umlaut-generated HTML directly on a third party page via javascript, there is a javascript helper script to make that very easy. This helper uses the [[Umlaut partial html API]], but does everything for you.  The helper will update your divs, and keep polling Umlaut for new results, continuing to re-update your divs until Umlaut is finished.   How often it polls is configured by application config 'poll_wait_seconds', which defaults to 4. &lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
You need to specify your Umlaut base URL in a global javascript variable called umlaut_base. This is not your link resolver base url which for Umlaut ends in /resolve, but the actual Umlaut application base URL, which should be the same, without the /resolve.  At JHU, it's &amp;quot;http://findit.library.jhu.edu&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You also need to put a URL-formatted (KEV) OpenURL context object in a global js variable called umlaut_openurl_kev_co.&lt;br /&gt;
&lt;br /&gt;
You then specify mappings from Umlaut html sections to HTML divs on your page in global js variable called umlaut_section_map containing a hash. Umlaut html sections are configured in Umlaut in the &amp;quot;partial_html_map&amp;quot; configuration param, which by default is set to the &amp;quot;bg_update_map&amp;quot; config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section. &lt;br /&gt;
&lt;br /&gt;
You can also optionally use some javascript callbacks to perform behavior after or during loading. In the following example, we'll demo using a javascript callback to only show a div for search_inside functionality if there are search_inside tools provided. &lt;br /&gt;
&lt;br /&gt;
The umlaut_embed.js script will check if the javascript Prototype library is loaded into the host page, and load it if not. Among other things, this means you can use Prototype in your callbacks. &lt;br /&gt;
&lt;br /&gt;
The html loaded will sometimes include a &amp;quot;spinner&amp;quot; with a message &amp;quot;loading more&amp;quot;, if the content is not yet loaded. &lt;br /&gt;
&lt;br /&gt;
An example is best:&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;H1&amp;gt;Here is an article page. &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;We're looking up Cytoplasmic Control of nuclear behavior by Masui. Of course normally this&lt;br /&gt;
     would be dynamically generated, not in static html like this.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- umlaut full text will be loaded here. You might want to include some initial content&lt;br /&gt;
       here for browsers without javascript. For browsers with javascript, this will be overwritten.--&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_fulltext&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;a href=&amp;quot;http://umlaut.university.edu/resolve?url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui&amp;quot;&amp;gt;&lt;br /&gt;
        Link to umlaut&lt;br /&gt;
      &amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- we hide this div to start out with, our js callback later &lt;br /&gt;
       will show it there is full text. But we avoid a &amp;quot;spinner&amp;quot; showing up&lt;br /&gt;
       here before everything is fully loaded.  --&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_search_inside&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_cover&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_see_also&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_excerpts&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;!-- now the javascript to actually load content in those divs --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    // You have to generate an OpenURL context object somehow, and set it in a js global var. &lt;br /&gt;
    // Normally this would be generated dynamically, not static HTML like this, of course.&lt;br /&gt;
    // You may want to include a rfr_id to identify your application as a source, demo below. &lt;br /&gt;
&lt;br /&gt;
    umlaut_openurl_kev_co = 'url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui';&lt;br /&gt;
&lt;br /&gt;
    // set global js var to tell script where to find umlaut&lt;br /&gt;
    umlaut_base = 'http://umlaut.university.edu';&lt;br /&gt;
&lt;br /&gt;
    // Map of umlaut section id to: div id we want to put it on the page&lt;br /&gt;
    // Note the js call back for search_inside_wrapper, to only show the&lt;br /&gt;
    // div on our page if there are elements. Js callback function gets one&lt;br /&gt;
    // argument, which will be number of Umlaut responses in the section. &lt;br /&gt;
    // Note also that we can use Prototype in the callback. &lt;br /&gt;
&lt;br /&gt;
    umlaut_section_map = {&lt;br /&gt;
      'fulltext_wrapper': 'my_fulltext',&lt;br /&gt;
      'highlighted_links': 'my_see_also',&lt;br /&gt;
      'excerpts_wrapper': 'my_excerpts',&lt;br /&gt;
      'cover_image': 'my_cover',&lt;br /&gt;
      'search_inside_wrapper': {'host_div_id': 'my_search_inside', &lt;br /&gt;
                                'after_update':&lt;br /&gt;
                                  function(count) {&lt;br /&gt;
                                    if ( count &amp;gt; 0) {&lt;br /&gt;
                                        $('my_search_inside').show();&lt;br /&gt;
                                    }&lt;br /&gt;
                                  }&lt;br /&gt;
                              }&lt;br /&gt;
      };&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- now actually load the umlaut js helper, which will do the magic for you --&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://umlaut.university.edu/javascripts/embed/umlaut-embed.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1162</id>
		<title>Umlaut partial html API javascript helper</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1162"/>
				<updated>2008-10-02T19:56:42Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to include Umlaut-generated HTML directly on a third party page via javascript, there is a javascript helper script to make that very easy. This helper uses the [[Umlaut partial HTML api]], but does everything for you.  The helper will update your divs, and keep polling Umlaut for new results, continuing to re-update your divs until Umlaut is finished.   How often it polls is configured by application config 'poll_wait_seconds', which defaults to 4. &lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
You need to specify your Umlaut base URL in a global javascript variable called umlaut_base. This is not your link resolver base url which for Umlaut ends in /resolve, but the actual Umlaut application base URL, which should be the same, without the /resolve.  At JHU, it's &amp;quot;http://findit.library.jhu.edu&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You also need to put a URL-formatted (KEV) OpenURL context object in a global js variable called umlaut_openurl_kev_co.&lt;br /&gt;
&lt;br /&gt;
You then specify mappings from Umlaut html sections to HTML divs on your page in global js variable called umlaut_section_map containing a hash. Umlaut html sections are configured in Umlaut in the &amp;quot;partial_html_map&amp;quot; configuration param, which by default is set to the &amp;quot;bg_update_map&amp;quot; config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section. &lt;br /&gt;
&lt;br /&gt;
You can also optionally use some javascript callbacks to perform behavior after or during loading. In the following example, we'll demo using a javascript callback to only show a div for search_inside functionality if there are search_inside tools provided. &lt;br /&gt;
&lt;br /&gt;
The umlaut_embed.js script will check if the javascript Prototype library is loaded into the host page, and load it if not. Among other things, this means you can use Prototype in your callbacks. &lt;br /&gt;
&lt;br /&gt;
The html loaded will sometimes include a &amp;quot;spinner&amp;quot; with a message &amp;quot;loading more&amp;quot;, if the content is not yet loaded. &lt;br /&gt;
&lt;br /&gt;
An example is best:&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;H1&amp;gt;Here is an article page. &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;We're looking up Cytoplasmic Control of nuclear behavior by Masui. Of course normally this&lt;br /&gt;
     would be dynamically generated, not in static html like this.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- umlaut full text will be loaded here. You might want to include some initial content&lt;br /&gt;
       here for browsers without javascript. For browsers with javascript, this will be overwritten.--&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_fulltext&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;a href=&amp;quot;http://umlaut.university.edu/resolve?url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui&amp;quot;&amp;gt;&lt;br /&gt;
        Link to umlaut&lt;br /&gt;
      &amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- we hide this div to start out with, our js callback later &lt;br /&gt;
       will show it there is full text. But we avoid a &amp;quot;spinner&amp;quot; showing up&lt;br /&gt;
       here before everything is fully loaded.  --&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_search_inside&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_cover&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_see_also&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div id=&amp;quot;my_excerpts&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;!-- now the javascript to actually load content in those divs --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    // You have to generate an OpenURL context object somehow, and set it in a js global var. &lt;br /&gt;
    // Normally this would be generated dynamically, not static HTML like this, of course.&lt;br /&gt;
    // You may want to include a rfr_id to identify your application as a source, demo below. &lt;br /&gt;
&lt;br /&gt;
    umlaut_openurl_kev_co = 'url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:journal&amp;amp;rft_id=info:doi/10.1002/jez.1401770202&amp;amp;rfr_id=info:sid/university.edu:myapplication&amp;amp;rft.genre=article&amp;amp;rft.jtitle=J.%20Exp.%20Zool&amp;amp;rft.date=1971&amp;amp;rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&amp;amp;rft.aulast=Masui';&lt;br /&gt;
&lt;br /&gt;
    // set global js var to tell script where to find umlaut&lt;br /&gt;
    umlaut_base = 'http://umlaut.university.edu';&lt;br /&gt;
&lt;br /&gt;
    // Map of umlaut section id to: div id we want to put it on the page&lt;br /&gt;
    // Note the js call back for search_inside_wrapper, to only show the&lt;br /&gt;
    // div on our page if there are elements. Js callback function gets one&lt;br /&gt;
    // argument, which will be number of Umlaut responses in the section. &lt;br /&gt;
    // Note also that we can use Prototype in the callback. &lt;br /&gt;
&lt;br /&gt;
    umlaut_section_map = {&lt;br /&gt;
      'fulltext_wrapper': 'my_fulltext',&lt;br /&gt;
      'highlighted_links': 'my_see_also',&lt;br /&gt;
      'excerpts_wrapper': 'my_excerpts',&lt;br /&gt;
      'cover_image': 'my_cover',&lt;br /&gt;
      'search_inside_wrapper': {'host_div_id': 'my_search_inside', &lt;br /&gt;
                                'after_update':&lt;br /&gt;
                                  function(count) {&lt;br /&gt;
                                    if ( count &amp;gt; 0) {&lt;br /&gt;
                                        $('my_search_inside').show();&lt;br /&gt;
                                    }&lt;br /&gt;
                                  }&lt;br /&gt;
                              }&lt;br /&gt;
      };&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- now actually load the umlaut js helper, which will do the magic for you --&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://umlaut.university.edu/javascripts/embed/umlaut-embed.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1161</id>
		<title>Umlaut partial html API javascript helper</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API_javascript_helper&amp;diff=1161"/>
				<updated>2008-10-02T19:32:55Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to include Umlaut-generated HTML directly on a third party page via javascript, there is a javascript helper script to make that very easy. This helper uses the [[Umlaut partial HTML api]], but does everything for you.  The helper will update your divs, and keep polling Umlaut for new results, continuing to re-update your divs until Umlaut is finished.   How often it polls is configured by application config 'poll_wait_seconds', which defaults to 4. &lt;br /&gt;
&lt;br /&gt;
You need to specify your Umlaut base URL in a global javascript variable. This is not your link resolver base url which for Umlaut ends in /resolve, but the actual Umlaut application base URL, which should be the same, without the /resolve.  At JHU, it's &amp;quot;http://findit.library.jhu.edu&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You then specify mappings from Umlaut html sections to HTML divs on your page. Umlaut html sections are configured in Umlaut in the &amp;quot;partial_html_map&amp;quot; configuration param, which by default is set to the &amp;quot;bg_update_map&amp;quot; config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section. &lt;br /&gt;
&lt;br /&gt;
You can also optionally use some javascript callbacks to perform behavior after or during loading. In the following example, we'll demo using a javascript callback to only show a div for search_inside functionality if there are search_inside tools provided. &lt;br /&gt;
&lt;br /&gt;
The umlaut_embed.js script will check if the javascript Prototype library is loaded into the host page, and load it if not. Among other things, this means you can use Prototype in your callbacks. &lt;br /&gt;
&lt;br /&gt;
An example is best:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_full_API&amp;diff=1160</id>
		<title>Umlaut full API</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_full_API&amp;diff=1160"/>
				<updated>2008-10-02T19:28:33Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: /* &amp;lt;in_progress&amp;gt; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Umlaut has a complete api for resolve actions, which can be delivered in XML or json. For simple uses of embedding Umlaut content on a page, you may find the [[Umlaut partial html API]] or [[Umlaut partial html API javascript helper]] easier to use. &lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;br /&gt;
&lt;br /&gt;
= Accessing the API =&lt;br /&gt;
&lt;br /&gt;
The api can be accessed at the resolve/api action. For instance, if your umlaut is at umlaut.somewhere.edu/, http://umlaut.somewhere.edu/resolve/api?&lt;br /&gt;
&lt;br /&gt;
Append an OpenURL context object to that URL. POST is also supported, including XML formatted context objects. You can also include the usual umlaut directive parameters. &lt;br /&gt;
&lt;br /&gt;
This is exactly what you'd send to the ordinary Umlaut link resolver base url for link resolver service in html; you are just replacing /resolve? with /resolve/api? &lt;br /&gt;
&lt;br /&gt;
By default, the API returns XML. To return json instead, include:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=json&lt;br /&gt;
&lt;br /&gt;
To return jsonp, wrapped in a javascript procedure call:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=jsonp&amp;amp;umlaut.jsonp=desiredJavascriptFunctionName&lt;br /&gt;
&lt;br /&gt;
= API Response =&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;request_id&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;request_id&amp;gt;701544&amp;lt;/request_id&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Umlaut's internal request id. API clients usually don't need this, but can be useful if you want a unique identifier for this OpenURL request. May also be useful if you want to call other Umlaut actions on this same OpenURL request, ensuring that Umlaut matches to the same request, by including &amp;amp;umlaut.request_id in your request.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;context_object_xml&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Contains an OpenURL context object in XML serialization. May include enhanced citation metadata from Umlaut.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;complete&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
When accessing Umlaut over an API, it's important to realize that the initial response from Umlaut may not include all Umlaut information. Umlaut continues to run services in the background that can generate responses and enhance metadata. &amp;lt;complete&amp;gt; will contain 'true' or 'false' depending on whether background services are still executing. Further elements in the response provide information on what is still executing, and how to retrieve further information. &lt;br /&gt;
&lt;br /&gt;
== &amp;lt;in_progress&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
'''example''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;in_progress&amp;gt;&lt;br /&gt;
    &amp;lt;refresh_url&amp;gt;http://findit.library.jhu.edu/resolve/api?umlaut.request_id=701544&amp;amp;amp;.....&amp;lt;/refresh_url&amp;gt;    &lt;br /&gt;
    &amp;lt;refresh_url_path&amp;gt;/resolve/api?umlaut.request_id=701544&amp;amp;amp;.....&amp;lt;/refresh_url_path&amp;gt;&lt;br /&gt;
    &amp;lt;requested_wait_seconds&amp;gt;4&amp;lt;/requested_wait_seconds&amp;gt;&lt;br /&gt;
    &amp;lt;services_in_progress&amp;gt;       &lt;br /&gt;
          &amp;lt;service name=&amp;quot;fulltext&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;holding&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;table_of_contents&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;highlighted_link&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;audio&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;holding_search&amp;quot; /&amp;gt;        &lt;br /&gt;
    &amp;lt;/services_in_progress&amp;gt;&lt;br /&gt;
  &amp;lt;/in_progress&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This block will only be present when &amp;lt;complete&amp;gt; is 'false'. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;refresh_url&amp;gt; provides a url the client can request again to see further results. If the client user agent does not support cookies, then this refresh_url must be used to continue retrieving results from the same Umlaut request, instead of accidentally creating a new request. Even if your client does support cookies, using the &amp;lt;refresh_url&amp;gt; is safest--simply refreshing the URL you loaded initially may accidentally create a new request. (The refresh_url given includes an umlaut.request_id parameter to ensure connection to the proper request). '''note well:''' The URL, like any other data in XML, is XML-escaped, and needs to be un-escaped before using. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;requested_wait_seconds&amp;gt;   is a request from Umlaut for the client to wait this many seconds before asking for more results.  Umlaut has no way to enforce this, it's only a request. Please wait a reasonable amount of time to avoid overloading Umlaut however. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;services_in_progress&amp;gt;  lists the ServiceTypeValues that may still have responses coming, that may not be complete.  A list of all possible ServiceTypeValues in a default Umlaut installation can be found in the [[http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml Umlaut code]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;service_statuses&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
This block provides information on the internal service plug-ins involved in this Umlaut request, and what their status is. In most cases, an API client will not need this information. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;status&amp;gt; can be one of:&lt;br /&gt;
* in_progress : Currently executing&lt;br /&gt;
* queued : Background service which is queued up, but not yet running. &lt;br /&gt;
* succesful : completed succesfully (may or may not have generated any responses)&lt;br /&gt;
* failed_fatal:  A fatal error condition was encountered, for instance a bug in Umlaut code. &lt;br /&gt;
* failed_temporary: An error condition was encountered, but Umlaut ''may'' try to run the service again, the error was not fatal, for instance an external service timed out. &lt;br /&gt;
&lt;br /&gt;
These constants are defined in [http://umlaut.rubyforge.org/svn/trunk/app/models/dispatched_service.rb dispatched_service.rb]&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;status&amp;gt; is failed_fatal or failed_temporary, there may be error information in an &amp;lt;exception_info&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;responses&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The meat, the actual response or 'target' data generated by Umlaut. These responses are grouped by ServiceTypeValues. A given ServiceTypeValue identifies a certain type of service, like full text, or library holdings. The list of possible ServiceTypeValues in a default Umlaut installation can be found in the relevant Umlaut distribution data file  [http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml service_type_values.yml]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;responses&amp;gt; block contains 0 or more &amp;lt;type_group&amp;gt; blocks. Each type_group has a name attribute identifiying the ServiceTypeValue, also provides you with user-displayable label for this type, and tells you if all services that generate this type are complete or not. A type_group will only be present if it contains responses. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;type_group name=&amp;quot;abstract&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display_name&amp;gt;Abstract&amp;lt;/display_name&amp;gt;&lt;br /&gt;
  &amp;lt;display_name_plural&amp;gt;Abstracts&amp;lt;/display_name_plural&amp;gt;&lt;br /&gt;
  &amp;lt;complete&amp;gt;true&amp;lt;/complete&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  [...]&lt;br /&gt;
&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;response&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Each type_group will have one or more &amp;lt;response&amp;gt; blocks in it. A &amp;lt;response&amp;gt; represents an individual piece of data generated by umlaut. This is what most clients will be most interested in, but it's tricky to deal with because the contents of a &amp;lt;response&amp;gt; are quite variable. They can vary between responses for different ServiceTypeValues, and there can even be specialized data only in responses belong to a particular Service plug-in.  All the data that Umlaut has is included here, including some really intended for internal use only. &lt;br /&gt;
&lt;br /&gt;
However, don't despair, there are a few things you can count on. The &amp;lt;display_text&amp;gt; element will always include the label or heading that is to be used for the response. A &amp;lt;notes&amp;gt; element may be present with additional explanatory text. These alone, plus a linking url, will be enough for many clients. &lt;br /&gt;
&lt;br /&gt;
Standard internal metadata includes a &amp;lt;service&amp;gt; element which will contain the name of the service plug-in that generated this response. (Match to services listed in &amp;lt;service_statuses&amp;gt; above). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Linking url: &amp;lt;umlaut_passthrough_url&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
You may see the &amp;lt;url&amp;gt; element in the response and be tempted to use it to send the user to this response. '''You are strongly cautioned not to do so.'''  In the Umlaut architecture, urls can be generated on-demand when the user clicks on an element, not at time of original response (this is because even generating the url is sometimes an expensive operation). This means that the &amp;lt;url&amp;gt; element is not guaranteed to be there, and when it is there is not guaranteed to be accurate. On top of all that, the application of a proxy pass through won't be applied yet to the url found here. &lt;br /&gt;
&lt;br /&gt;
You should instead use the &amp;lt;umlaut_passthrough_url&amp;gt; element. This will contain a URL pointing to your umlaut installation, of the form: http://umlaut.university.edu/link_router/index/7447333&lt;br /&gt;
&lt;br /&gt;
When this URL is accessed, Umlaut will '''redirect''' the user to the actual destination--after calculating that destination, and applying any proxy or other filters, etc. In some cases it may end up redirecting to the same destination as &amp;lt;url&amp;gt;, but in other cases it may be somewhat different, or may work even if &amp;lt;url&amp;gt; was not present.&lt;br /&gt;
&lt;br /&gt;
'''Please use the umlaut_passthrough_url for linking.'''&lt;br /&gt;
&lt;br /&gt;
==== Other Conventions ====&lt;br /&gt;
&lt;br /&gt;
Each ServiceTypeValue has other conventions for elements that will be present in that ServiceTypeValue. These are documented in [http://umlaut.rubyforge.org/api/classes/ServiceResponse.html ServiceResponse] in the Conventional Keys section.&lt;br /&gt;
&lt;br /&gt;
==== example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;response id=&amp;quot;7447899&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;service&amp;gt;JH_SFX&amp;lt;/service&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Attributes really vary depending on particular service, this makes it kind of tricky to deal with in an API. See documentation in ServiceResponse for conventions. Reccommend that you use umlaut_passthrough_url for url. Final destination url isis calculated on-demand by umlaut. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;display_text&amp;gt;Free E- Journals&amp;lt;/display_text&amp;gt;&lt;br /&gt;
        &amp;lt;url&amp;gt;http://dl.lib.brown.edu/radicalamerica/shelf.html&amp;lt;/url&amp;gt;&lt;br /&gt;
        &amp;lt;notes&amp;gt;&amp;lt;/notes&amp;gt;&lt;br /&gt;
        &amp;lt;coverage&amp;gt;&lt;br /&gt;
Available from 1967 volume: 1 issue: 2  until 1987 volume: 21 issue: 6.&lt;br /&gt;
        &amp;lt;/coverage&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_name&amp;gt;MISCELLANEOUS_FREE_EJOURNALS&amp;lt;/sfx_target_name&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_base_url&amp;gt;http://sfx.library.jhu.edu:8000/sfxlcl3&amp;lt;/sfx_base_url&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_obj_index&amp;gt;1&amp;lt;/sfx_obj_index&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_index&amp;gt;1&amp;lt;/sfx_target_index&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;SFX/FT::NO_FILL_IN&amp;lt;/source&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_request_id&amp;gt;2688845&amp;lt;/sfx_request_id&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_service_id&amp;gt;&lt;br /&gt;
110976638852341        &amp;lt;/sfx_target_service_id&amp;gt;&lt;br /&gt;
        &amp;lt;umlaut_passthrough_url&amp;gt;http://findit.library.jhu.edu/link_router/index/7447899&amp;lt;/umlaut_passthrough_url&amp;gt;&lt;br /&gt;
      &amp;lt;/response&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API&amp;diff=1159</id>
		<title>Umlaut partial html API</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_partial_html_API&amp;diff=1159"/>
				<updated>2008-10-02T19:07:00Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Umlaut partial HTML API is meant for when you want Umlaut to generate HTML, but you want to embed that HTML on an external page. The API will deliver sections of generated HTML, that you can include elsewhere. &lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;br /&gt;
&lt;br /&gt;
If you plan to include it via javascript, you will likely find it even more convenient to use the [Umlaut partial html API javascript helper], saving you even more work. The javascript helper uses the API behind the scenes. &lt;br /&gt;
&lt;br /&gt;
= Accessing the API =&lt;br /&gt;
&lt;br /&gt;
Supplied via the resolve/partial_html_sections actions. Instead of accessing the ordinary resolver base URL, you replace &amp;quot;resolve?&amp;quot; in your query with &amp;quot;resolve/partial_html&amp;quot;, eg http://umlaut.university.edu/resolve/partial_html? .  You send the OpenURL context object the same as you would for an ordinary resolve action, in URL or POST XML, etc.  &lt;br /&gt;
&lt;br /&gt;
By default, the API returns XML. To return json instead, include:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=json&lt;br /&gt;
&lt;br /&gt;
To return jsonp, wrapped in a javascript procedure call:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=jsonp&amp;amp;umlaut.jsonp=desiredJavascriptFunctionName&lt;br /&gt;
&lt;br /&gt;
= Response = &lt;br /&gt;
&lt;br /&gt;
== &amp;lt;complete&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
When accessing Umlaut over an API, it's important to realize that the initial response from Umlaut may not include all Umlaut information. Umlaut continues to run services in the background that can generate responses and enhance metadata. &amp;lt;complete&amp;gt; will contain 'true' or 'false' depending on whether background services are still executing. Further elements in the response provide information on what is still executing, and how to retrieve further information.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;in_progress&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This block will only be present when &amp;lt;complete&amp;gt; is 'false'.  It provides information on completion status, and how to refresh the response for more information prepared in the background. For more information, see the documentation in [[Umlaut full API#&amp;lt;in_progress&amp;gt;]], the block is the same here.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;html_section&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
What you really want is contained in 0 or more html_section blocks. Each one contains some generated HTML, along with some metadata about it. The id attribute of &amp;lt;html_section&amp;gt; tells you which section it is. What sections exist is configured in Umlaut in the &amp;quot;partial_html_map&amp;quot; configuration param, which by default is set to the &amp;quot;bg_update_map&amp;quot; config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section. &lt;br /&gt;
&lt;br /&gt;
The sections and their contents can be customized by the Umlaut administrator by changing the partial_html_map config (and/or the bg_update_map config). &lt;br /&gt;
&lt;br /&gt;
Inside an html_section in the response there is a bit of metadata for you:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;included_services&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
What ServiceTypeValues are included in this html section. This specifies what type of data is in this block. For a list of possible ServiceTypeValues in a default Umlaut configuration, see [http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml service_type_values.yml] in umlaut SVN. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;service_load_complete&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
true or false. False if this html_section might change as more background services run, true if this html_section is completely finished. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;response_count&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
How many Umlaut response objects were used to generate this block?  Can be useful if you want to do something different with 0 (no content) vs. non-0 (content). &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;html_content&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The actual html content. It is of course standardly XML-escaped in XML, or json-escaped in json.&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	<entry>
		<id>https://wiki.code4lib.org/index.php?title=Umlaut_full_API&amp;diff=1158</id>
		<title>Umlaut full API</title>
		<link rel="alternate" type="text/html" href="https://wiki.code4lib.org/index.php?title=Umlaut_full_API&amp;diff=1158"/>
				<updated>2008-10-02T19:06:35Z</updated>
		
		<summary type="html">&lt;p&gt;128.220.159.25: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Umlaut has a complete api for resolve actions, which can be delivered in XML or json. For simple uses of embedding Umlaut content on a page, you may find the [[Umlaut partial html API]] or [[Umlaut partial html API javascript helper]] easier to use. &lt;br /&gt;
&lt;br /&gt;
[[Category:Umlaut]]&lt;br /&gt;
&lt;br /&gt;
= Accessing the API =&lt;br /&gt;
&lt;br /&gt;
The api can be accessed at the resolve/api action. For instance, if your umlaut is at umlaut.somewhere.edu/, http://umlaut.somewhere.edu/resolve/api?&lt;br /&gt;
&lt;br /&gt;
Append an OpenURL context object to that URL. POST is also supported, including XML formatted context objects. You can also include the usual umlaut directive parameters. &lt;br /&gt;
&lt;br /&gt;
This is exactly what you'd send to the ordinary Umlaut link resolver base url for link resolver service in html; you are just replacing /resolve? with /resolve/api? &lt;br /&gt;
&lt;br /&gt;
By default, the API returns XML. To return json instead, include:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=json&lt;br /&gt;
&lt;br /&gt;
To return jsonp, wrapped in a javascript procedure call:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;umlaut.response_format=jsonp&amp;amp;umlaut.jsonp=desiredJavascriptFunctionName&lt;br /&gt;
&lt;br /&gt;
= API Response =&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;request_id&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;request_id&amp;gt;701544&amp;lt;/request_id&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Umlaut's internal request id. API clients usually don't need this, but can be useful if you want a unique identifier for this OpenURL request. May also be useful if you want to call other Umlaut actions on this same OpenURL request, ensuring that Umlaut matches to the same request, by including &amp;amp;umlaut.request_id in your request.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;context_object_xml&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Contains an OpenURL context object in XML serialization. May include enhanced citation metadata from Umlaut.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;complete&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
When accessing Umlaut over an API, it's important to realize that the initial response from Umlaut may not include all Umlaut information. Umlaut continues to run services in the background that can generate responses and enhance metadata. &amp;lt;complete&amp;gt; will contain 'true' or 'false' depending on whether background services are still executing. Further elements in the response provide information on what is still executing, and how to retrieve further information. &lt;br /&gt;
&lt;br /&gt;
== &amp;lt;in_progress&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
'''example''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;in_progress&amp;gt;&lt;br /&gt;
    &amp;lt;refresh_url&amp;gt;http://findit.library.jhu.edu/resolve/api?umlaut.request_id=701544&amp;amp;amp;.....&amp;lt;/refresh_url&amp;gt;    &lt;br /&gt;
    &amp;lt;refresh_url_path&amp;gt;/resolve/api?umlaut.request_id=701544&amp;amp;amp;.....&amp;lt;/refresh_url_path&amp;gt;&lt;br /&gt;
    &amp;lt;requested_wait_seconds&amp;gt;4&amp;lt;/requested_wait_seconds&amp;gt;&lt;br /&gt;
    &amp;lt;services_in_progress&amp;gt;       &lt;br /&gt;
          &amp;lt;service name=&amp;quot;fulltext&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;holding&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;table_of_contents&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;highlighted_link&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;audio&amp;quot; /&amp;gt;         &lt;br /&gt;
          &amp;lt;service name=&amp;quot;holding_search&amp;quot; /&amp;gt;        &lt;br /&gt;
    &amp;lt;/services_in_progress&amp;gt;&lt;br /&gt;
  &amp;lt;/in_progress&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This block will only be present when &amp;lt;complete&amp;gt; is 'false'. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;refresh_url&amp;gt; provides a url the client can request again to see further results. If the client user agent does not support cookies, then this refresh_url must be used to continue retrieving results from the same Umlaut request, instead of accidentally creating a new request. Even if your client does support cookies, using the &amp;lt;refresh_url&amp;gt; is safest--simply refreshing the URL you loaded initially may accidentally create a new request. (The refresh_url given includes an umlaut.request_id parameter to ensure connection to the proper request). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;requested_wait_seconds&amp;gt;   is a request from Umlaut for the client to wait this many seconds before asking for more results.  Umlaut has no way to enforce this, it's only a request. Please wait a reasonable amount of time to avoid overloading Umlaut however. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;services_in_progress&amp;gt;  lists the ServiceTypeValues that may still have responses coming, that may not be complete.  A list of all possible ServiceTypeValues in a default Umlaut installation can be found in the [[http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml Umlaut code]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;service_statuses&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
This block provides information on the internal service plug-ins involved in this Umlaut request, and what their status is. In most cases, an API client will not need this information. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;status&amp;gt; can be one of:&lt;br /&gt;
* in_progress : Currently executing&lt;br /&gt;
* queued : Background service which is queued up, but not yet running. &lt;br /&gt;
* succesful : completed succesfully (may or may not have generated any responses)&lt;br /&gt;
* failed_fatal:  A fatal error condition was encountered, for instance a bug in Umlaut code. &lt;br /&gt;
* failed_temporary: An error condition was encountered, but Umlaut ''may'' try to run the service again, the error was not fatal, for instance an external service timed out. &lt;br /&gt;
&lt;br /&gt;
These constants are defined in [http://umlaut.rubyforge.org/svn/trunk/app/models/dispatched_service.rb dispatched_service.rb]&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;status&amp;gt; is failed_fatal or failed_temporary, there may be error information in an &amp;lt;exception_info&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;responses&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The meat, the actual response or 'target' data generated by Umlaut. These responses are grouped by ServiceTypeValues. A given ServiceTypeValue identifies a certain type of service, like full text, or library holdings. The list of possible ServiceTypeValues in a default Umlaut installation can be found in the relevant Umlaut distribution data file  [http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml service_type_values.yml]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;responses&amp;gt; block contains 0 or more &amp;lt;type_group&amp;gt; blocks. Each type_group has a name attribute identifiying the ServiceTypeValue, also provides you with user-displayable label for this type, and tells you if all services that generate this type are complete or not. A type_group will only be present if it contains responses. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;type_group name=&amp;quot;abstract&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display_name&amp;gt;Abstract&amp;lt;/display_name&amp;gt;&lt;br /&gt;
  &amp;lt;display_name_plural&amp;gt;Abstracts&amp;lt;/display_name_plural&amp;gt;&lt;br /&gt;
  &amp;lt;complete&amp;gt;true&amp;lt;/complete&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  [...]&lt;br /&gt;
&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;response&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Each type_group will have one or more &amp;lt;response&amp;gt; blocks in it. A &amp;lt;response&amp;gt; represents an individual piece of data generated by umlaut. This is what most clients will be most interested in, but it's tricky to deal with because the contents of a &amp;lt;response&amp;gt; are quite variable. They can vary between responses for different ServiceTypeValues, and there can even be specialized data only in responses belong to a particular Service plug-in.  All the data that Umlaut has is included here, including some really intended for internal use only. &lt;br /&gt;
&lt;br /&gt;
However, don't despair, there are a few things you can count on. The &amp;lt;display_text&amp;gt; element will always include the label or heading that is to be used for the response. A &amp;lt;notes&amp;gt; element may be present with additional explanatory text. These alone, plus a linking url, will be enough for many clients. &lt;br /&gt;
&lt;br /&gt;
Standard internal metadata includes a &amp;lt;service&amp;gt; element which will contain the name of the service plug-in that generated this response. (Match to services listed in &amp;lt;service_statuses&amp;gt; above). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Linking url: &amp;lt;umlaut_passthrough_url&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
You may see the &amp;lt;url&amp;gt; element in the response and be tempted to use it to send the user to this response. '''You are strongly cautioned not to do so.'''  In the Umlaut architecture, urls can be generated on-demand when the user clicks on an element, not at time of original response (this is because even generating the url is sometimes an expensive operation). This means that the &amp;lt;url&amp;gt; element is not guaranteed to be there, and when it is there is not guaranteed to be accurate. On top of all that, the application of a proxy pass through won't be applied yet to the url found here. &lt;br /&gt;
&lt;br /&gt;
You should instead use the &amp;lt;umlaut_passthrough_url&amp;gt; element. This will contain a URL pointing to your umlaut installation, of the form: http://umlaut.university.edu/link_router/index/7447333&lt;br /&gt;
&lt;br /&gt;
When this URL is accessed, Umlaut will '''redirect''' the user to the actual destination--after calculating that destination, and applying any proxy or other filters, etc. In some cases it may end up redirecting to the same destination as &amp;lt;url&amp;gt;, but in other cases it may be somewhat different, or may work even if &amp;lt;url&amp;gt; was not present.&lt;br /&gt;
&lt;br /&gt;
'''Please use the umlaut_passthrough_url for linking.'''&lt;br /&gt;
&lt;br /&gt;
==== Other Conventions ====&lt;br /&gt;
&lt;br /&gt;
Each ServiceTypeValue has other conventions for elements that will be present in that ServiceTypeValue. These are documented in [http://umlaut.rubyforge.org/api/classes/ServiceResponse.html ServiceResponse] in the Conventional Keys section.&lt;br /&gt;
&lt;br /&gt;
==== example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;response id=&amp;quot;7447899&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;service&amp;gt;JH_SFX&amp;lt;/service&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Attributes really vary depending on particular service, this makes it kind of tricky to deal with in an API. See documentation in ServiceResponse for conventions. Reccommend that you use umlaut_passthrough_url for url. Final destination url isis calculated on-demand by umlaut. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;display_text&amp;gt;Free E- Journals&amp;lt;/display_text&amp;gt;&lt;br /&gt;
        &amp;lt;url&amp;gt;http://dl.lib.brown.edu/radicalamerica/shelf.html&amp;lt;/url&amp;gt;&lt;br /&gt;
        &amp;lt;notes&amp;gt;&amp;lt;/notes&amp;gt;&lt;br /&gt;
        &amp;lt;coverage&amp;gt;&lt;br /&gt;
Available from 1967 volume: 1 issue: 2  until 1987 volume: 21 issue: 6.&lt;br /&gt;
        &amp;lt;/coverage&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_name&amp;gt;MISCELLANEOUS_FREE_EJOURNALS&amp;lt;/sfx_target_name&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_base_url&amp;gt;http://sfx.library.jhu.edu:8000/sfxlcl3&amp;lt;/sfx_base_url&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_obj_index&amp;gt;1&amp;lt;/sfx_obj_index&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_index&amp;gt;1&amp;lt;/sfx_target_index&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;SFX/FT::NO_FILL_IN&amp;lt;/source&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_request_id&amp;gt;2688845&amp;lt;/sfx_request_id&amp;gt;&lt;br /&gt;
        &amp;lt;sfx_target_service_id&amp;gt;&lt;br /&gt;
110976638852341        &amp;lt;/sfx_target_service_id&amp;gt;&lt;br /&gt;
        &amp;lt;umlaut_passthrough_url&amp;gt;http://findit.library.jhu.edu/link_router/index/7447899&amp;lt;/umlaut_passthrough_url&amp;gt;&lt;br /&gt;
      &amp;lt;/response&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.220.159.25</name></author>	</entry>

	</feed>