Changes

Jump to: navigation, search

Umlaut full API

2,083 bytes added, 23:17, 1 October 2008
<responses>
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]
The <responses> block contains 0 or more <type_group> 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.
<pre>
</pre>
==== <response> ==== Each type_group will have one or more <response> blocks in it. A <response> represents an individual piece of data generated by umlaut. The trick here This is that individual elements inside what most clients will be most interested in, but it's tricky to deal with because the contents of a <response> are quite variable. They can very vary between differnet service typesresponses 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.  However, don't despair, there are a few things you can count on. The <display_text> element will always include the label or heading that is to be used for the response. A <notes> element may be present with additional explanatory text. These alone, plus a linking url, will be enough for many clients.  ===== linking url: ===== You may see the <url> 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 between generating the url is sometimes an expensive operation). This means that the <url> 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.  You should instead use the <umlaut_passthrough_url> element. This will contain a URL pointing to your umlaut installation, of the form: http://umlaut.university.edu/link_router/index/7447333 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 <url>, but in other cases it may be somewhat different, or may work even if <url> was not present.  ===== other conventions ===== 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.
Anonymous user

Navigation menu