TEST SUITE FOR THE FORWARD INDEX MANAGEMENT-LOOKUP-UPDATER
-----------------------------------------------------------
-Authors
* Spyros Mpoutsis (s.mpoytsis@di.uoa.gr)
* Vasilis Verroios (v.verroios@di.uoa.gr)

-Build

Dependencies: gCore, org.gcube.indexmanagement.fulltextindexlookup.stubs, org.gcube.indexmanagement.fulltextindexmanagement.stubs, org.gcube.indexmanagement.fulltextindexupdater.stubs
Compile: javac FullTextIndexClient.java VOInfoManager.java, javac Col_2_ftRowsetRS.java VOInfoManager.java

-Define the properties file

For each scope a properties file must be defined with the information about the URIs of the involved services, and the IDs, schemas and languages of the collections.
An example for this properties file is given in this test suite for scope /gcube/devsec, with the file _gcube_devsec.properties(the convention is to replace '/' with '_' in the name of the scope) 

-Run
 
  FullTextIndexClient
  
  Syntax: 
 * 1) FullTextIndexClient [ -cred <credentialFile> ] <scope> -create "manager" | "lookup" | "all" <colName> <colSchema> <colLang> <indexTypeID>
 * 2) FullTextIndexClient [ -cred <credentialFile> ] <scope> -destroy "manager" | "lookup" | "all" <colName> <colSchema> <colLang>
 * 3) FullTextIndexClient [ -cred <credentialFile> ] <scope> -feed <colName> <colSchema> <colLang> <RS_epr>
 * 4) FullTextIndexClient [ -cred <credentialFile> ] <scope> -lookup <colName> <colSchema> <colLang> <query> 
 * 5) FullTextIndexClient [ -cred <credentialFile> ] <scope> -createStats <colName> <colSchema> <colLang>
 
 Example
 
 1) Create a FT Index Manager and a Lookup for 
 <scope> = /gcube/devsec 
 <colName> = "EM ESA special issues Living Planet Programme and Earth Observation Handbook" 
 <colSchema> = dc 
 <indexTypeID> = ft_dc_1.0 (Can be detected through the indextype generic resources in the monitoring portal and requires knowledge of each collection to be tested - 
 In any case you can contact the authors of this test suite, to provide you with information about each collection)
 
 java IndexManagement.FullTextIndexClient /gcube/devsec -create all "EM ESA special issues Living Planet Programme and Earth Observation Handbook" dc en ft_dc_1.0
  
 2) Use the metadata broker in order to build a Result Set that contains the data to be fed to the index. 
 This client outputs the epr of the constructed ResultSet
 (Note that the 2nd argument has no meaning and a random value can be placed there)
 
 java IndexManagement.Col_2_ftRowsetRS /gcube/devsec foo "EM ESA special issues Living Planet Programme and Earth Observation Handbook" dc en > ~/ft.epr
 
 4) Feed the index with the data of this collection. 
 
 java IndexManagement.FullTextIndexClient /gcube/devsec -feed "EM ESA special issues Living Planet Programme and Earth Observation Handbook" dc en ~/ft.epr
 
 5) Perform a lookup operation (the syntax of the query can be seen in the Developer's Guide 
 https://technical.wiki.d4science.research-infrastructures.eu/documentation/index.php/Index_Management_Framework#Query_language_2
 here we use a simple word "Earth").
 This operation will return the epr that contains the results for this lookup.
 
 java IndexManagement.FullTextIndexClient /gcube/devsec -lookup "EM ESA special issues Living Planet Programme and Earth Observation Handbook" dc en "Earth"
  
 6) Destroy all the FT Index resources for this collection in this scope
 
 java IndexManagement.FullTextIndexClient /gcube/devsec -destroy all "EM ESA special issues Living Planet Programme and Earth Observation Handbook" dc en
 
  