org.gcube.opensearch.opensearchdatasource
Class OpenSearchDataSource
java.lang.Object
org.gcube.opensearch.opensearchdatasource.OpenSearchDataSource
public class OpenSearchDataSource
- extends Object
OpenSearchDataSource implements the functionality needed to query the underlying OpenSearch providers using the OpenSearchOp OpenSearch operator
Each OpenSearchDataSourceResource of this stateful service handles a number of OpenSearch providers. Each provider is associated with
a collection and an OpenSearchResource generic resource containing information for the provider.
A OpenSearchDataSourceResource published a set field information, which specifies which search fields are searchable and presentable on a collection.
While querying, all generic resources and description documents retrieved are stored in a cache contained in each OpenSearchDataSourceResource
The cache can be refreshed either on demand or periodically, or through both ways to allow the service to update its state in the event of generic resource update
or modifications in the description documents of providers.
The cache purging time interval as well as whether the service should clear the cache on startup are configurable parameters
- Version:
- 1.2
- Author:
- Vassilis Verroios, NKUA, gerasimos.farantatos, NKUA
|
Constructor Summary |
OpenSearchDataSource()
Constructor - sets up some variables and creates a logging instance |
|
Method Summary |
org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersResponse |
addProviders(org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersParams req)
|
String |
query(String cqlQuery)
Performs a query on the OpenSearch provider associated with the WS resource used and described by the corresponding generic resource |
static void |
ready()
|
org.gcube.opensearch.opensearchdatasource.stubs.RefreshCacheResponse |
refreshCache(org.gcube.opensearch.opensearchdatasource.stubs.RefreshCache req)
Forced cache refresh operation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
supportedRelations
public String[] supportedRelations
OpenSearchDataSource
public OpenSearchDataSource()
throws RemoteException
- Constructor - sets up some variables and creates a logging instance
- Throws:
RemoteException
query
public String query(String cqlQuery)
throws RemoteException
- Performs a query on the OpenSearch provider associated with the WS resource used and described by the corresponding generic resource
- Parameters:
cqlQuery - String - the gCQL query to be translated a set of queries with the syntax of the OpenSearch operator -
space separated <(URLEncodedParameterNamespace|config):parameterName> strings)
- Returns:
String - a gRS2 locator which holds the results of the query.
- Throws:
RemoteException - In case of error
refreshCache
public org.gcube.opensearch.opensearchdatasource.stubs.RefreshCacheResponse refreshCache(org.gcube.opensearch.opensearchdatasource.stubs.RefreshCache req)
throws RemoteException
- Forced cache refresh operation
- Parameters:
req - An empty RefreshCache request
- Returns:
- An empty
RefreshCacheResponse
- Throws:
RemoteException - In case of error- See Also:
CacheRefresher#forceRefresh()}
addProviders
public org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersResponse addProviders(org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersParams req)
throws RemoteException
- Throws:
RemoteException
ready
public static void ready()
Copyright © 2013. All Rights Reserved.