<docbook><section><title>VirtCartConfigHotels</title><para> </para>
<title>Hotels.com</title>Hotels.com
<para>In order to maximize the amount and quality of data extracted, the Sponger&#39;s support for Hotels.com comes in three forms: as a regular extractor cartridge, as a query-language cartridge and as a metacartridge.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Extractor Cartridge</bridgehead>
<para>This is used for modelling a single identified hotel object as RDF.
 Typical URL patterns take the form &lt;http://www.hotels.com/hotel/details.html?hotelId=nnnnn&gt;.
In practice, such URLs rarely exist in the wild so we regard this as the canonical URL for a hotel and identify the pattern ?hotelId=nnnnn in other URLs accordingly.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Query-Language cartridge</bridgehead>
<para>The Sponger&#39;s Query-language cartridges are a subset of the extractor cartridges, defined as working against resources that are themselves queries.
In this case, the hotels.com website allows a user to enter some free-form text to locate a hotel; we treat the URL as identifying a resultset and model that as a container linking to individual hotels.</para>
<para>Features differentiating this from other modes: if a new hotel is built tomorrow and matches the search, responging the same page will show new data dynamically; there is no hotelId in the URL to restrict the query to one hotel.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Metacartridge</bridgehead>
<para>The Sponger&#39;s metacartridges enhance data already present in a graph.
 In this case, the Hotels.com metacartridge searches for triples identifying a location in the graph and adds links showing hotels in the vicinity.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Configuration</bridgehead>
<para>The hotels.com cartridges are implemented using the Expedia Affiliate Network (EAN) API.
 To use them, you need to sign up with EAN, register a new application and put the API key in the API key field in the sponger cartridge&#39;s configuration page in the Virtuoso Conductor.</para>
<para>Example:</para>
<para>Go to <ulink url="https://developer.ean.com/">https://developer.ean.com/</ulink> and click `sign up&#39; or sign in if already registered.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/ean-hotels-1.png" /></figure></listitem>
</itemizedlist><para>Click on `<ulink url="https://developer.ean.com/apps/mykeys">my account</ulink>&#39; and you should see an overview of your applications and their keys and secrets.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/ean-hotels-2.png" /></figure></listitem>
</itemizedlist><para>Go to the Virtuoso Conductor, e.g.
http://localhost:8889/conductor/ (adjust host and port) and log in.
 In the menus, click Linked Data / Sponger and you&#39;ll see the extractor cartridges.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/conductor-3.png" /></figure></listitem>
</itemizedlist><para>Ensure the Hotels.com extractor cartridge is enabled and apply.
 Then scroll down and select it, to change its settings:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/conductor-4.png" /></figure></listitem>
</itemizedlist><para>Copy and paste the API Key from EAN into the cartridge configuration and update.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/conductor-5.png" /></figure></listitem>
</itemizedlist><para>Next, in the sponger menu, go to the Metacartridges tab and similarly enable the cartridge and paste the key in its setings also.</para>
<para> </para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtCartConfigHotels/conductor-6.png" /></figure> </listitem>
<listitem><figure><graphic fileref="VirtCartConfigHotels/conductor-7.png" /></figure></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">See Also</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesVendorNonRDF">Vendor-specific supported data sources</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesQueryLanguages">Query-Language Cartridges</ulink> </listitem>
<listitem><ulink url="VirtSponger">Virtuoso Sponger</ulink> </listitem>
</itemizedlist></section></docbook>