%META:TOPICPARENT{name="VirtSpongerCartridgeSupportedDataSourcesVendorNonRDF"}%
---+Hotels.com
%TOC%
In order to maximize the amount and quality of data extracted, the Sponger's
support for Hotels.com comes in three forms: as a regular extractor cartridge,
as a query-language cartridge and as a metacartridge.
---++Extractor Cartridge
This is used for modelling a single identified hotel object as RDF. Typical URL
patterns take the form
<http://www.hotels.com/hotel/details.html?hotelId=nnnnn>.
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.
---++Query-Language cartridge
The Sponger'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.
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.
---++Metacartridge
The Sponger'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.
---++Configuration
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's
configuration page in the Virtuoso Conductor.
Example:
Go to https://developer.ean.com/ and click `sign up' or sign in if already
registered.
*
Click on `[[https://developer.ean.com/apps/mykeys][my account]]' and you should
see an overview of your applications and their keys and secrets.
*
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'll see the extractor
cartridges.
*
Ensure the Hotels.com extractor cartridge is enabled and apply. Then scroll
down and select it, to change its settings:
*
Copy and paste the API Key from EAN into the cartridge configuration and update.
*
Next, in the sponger menu, go to the Metacartridges tab and similarly enable
the cartridge and paste the key in its setings also.
*
*
---++See Also
* [[VirtSpongerCartridgeSupportedDataSourcesVendorNonRDF][Vendor-specific supported data sources]]
* [[VirtSpongerCartridgeSupportedDataSourcesQueryLanguages][Query-Language Cartridges]]
* [[VirtSponger][Virtuoso Sponger]]