= Semantic Query Resolver = The Semantic Query Resolver (SQR) acts as a single entry point for Resource Users into the SENSEI system. The SQR provides the Semantic Query Interface (SQI) to Resource Users which offers convenience methods for Resource lookups as well as information and actuation requests. The implementation features a Web GUI that allows users to access the SQI interface. For developpers, the latter is also directly accessible through REST calls. In what follows, we describe these features and specify the installation procedure of the corresponding software. [[PageOutline(2-3,Table of Contents,inline)]] ---- == Implementation == The SQR has been implemented within a REST container RESTlet to offer RESTful APIs. As a result, the buisness logic of the component has been embedded within so-called RESTlet Resources that provide the API to manage the access to the SQR operations in a RESTful fashion. One of the key features of the RESTlet framework is also the integration within its API of a template engine, Freemarker that allows to build Web pages on top of the framework RESTful API. This makes the SQR accesible through both standard RESTful calls but also through a simple Web site. Given the complexity of the SQI we decided to bind each operation to a particular Resource so that maintenance is made easier. The implementation features the following path structure: * http://hostname:port/sqr/ : SQR index page * http://hostname:port/sqr/requestBinding : Browse bindings on the ED, simple queries * http://hostname:port/sqr/requestBindingIOPP : Browse bindings on the ED, template queries * http://hostname:port/sqr/requestResDesc : Browse resource descriptions on the RD, simple and selector queries * http://hostname:port/sqr/requestInformation : Request information ---- == Requirements == * Windows or Linux operating system * [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java SDK], version 6.0 or higher * [http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr1 Eclipse IDE for Java EE Developers] * [http://modis.ispras.ru/sedna/download.html SEDNA server] * [https://svn-batch.grid.pub.ro/svn/Sensei-WP5/SQRv3/ Semantic Query Resolver version 3] (checkout the ED Eclipse project from SENSEI SVN) ---- == Using the REST API == The implementation contains a client API for developpers to access the standard REST API of the SQR. The API is available in the package com.sap.research.sensei.sqr.api of the software. We refer the reader to the code JavaDoc for a description of the methods part of the client implementation. The com.sap.research.sensei.sqr.test package features test cases for each usage scenario. Please refer to the JavaDoc of each test for details. ---- == Web Interface == The Web Interface is depicted in the User Guide at [https://ncit-cluster.grid.pub.ro/trac/Sensei-Cookbook/wiki/RuSqr#WebInterface] . ---- == Installation == You need to download the SEDNA Database from [http://modis.ispras.ru/sedna/download.html] and dezip it. Run SEDNA : SEDNA_PATH/bin/se_gov.exe and create the eoidb database (do it once :)) : SEDNA_PATH/bin/se_cdb.exe sqrdb. Then start the eoidb database : SEDNA_PATH/bin/se_sm.exe sqrdb. To stop the sqrdb database : SEDNA_PATH/bin/se_smsd.exe sqrdb To stop SEDNA : se_stop.exe The software can be started from the Main class in the package com.sap.research.sensei.sqr.startup . Fill in the SQR.properties file based on your own configuration: {{{ #SERVER CONFIGURATION #----------------------- #Path to the server index page SQR_DIRECTORY_BASE_URI = http://localhost:8186/sqr #Server port SERVER_PORT = 8186 #EOI, RD CONFIGURATION #----------------------- #RLI interface of the RD URI (no SPARQL) RESSOURCE_DIRECTORY_RLI_URI_NO_SPARQL = http://sensei-dev1.grid.pub.ro:8184/rli #RLI interface of the RD URI (with SPARQL) RESSOURCE_DIRECTORY_RLI_URI = http://sensei-dev1.grid.pub.ro:8184/rli/mix/lookup #Resource Directory base URI RESSOURCE_DIRECTORY_BASE = http://sensei-dev1.grid.pub.ro:8184/rd #Entity Directory base URI EOI_DIRECTORY_BASE_URI = http://localhost:8182/eoi #Entity Directory ELI URI EOI_DIRECTORY_ELI_URI = http://localhost:8182/eoi/eli #SEDNA CONFIGURATION #----------------------- #DB USERNAME DB_USERNAME = SYSTEM #DB PASSWORD DB_PASSWORD = MANAGER #DB BASE URI DB_URI_BASE = xmldb:sedna://localhost/sqrdb #DB SUBSCRIPTIONS COLLECTION URI DB_URI_SUBSCRIPTION = xmldb:sedna://localhost/sqrdb/subscriptions #VISUALIZATION TOOL CONFIGURATION (Not used in this version, left here in case this changes) #----------------------- #Activate visu tool VISU = NO #Time to let the GUI refresh SLEEP = 1500 #Paths the the visualization tool VISUARCHIPATH = http://localhost:8080/SVGMonitor/setstate.jsp }}}