org.gcube.common.core.informationsystem.client
Interface ISClient

All Known Implementing Classes:
AbstractClient

public interface ISClient

Defines the local interface to query an Information System in a gCube infrastructure. Clients obtain the Queries supported by the underlying implementation from their standard interfaces. These queries are scoped and may return results either by-value or by-reference.

Author:
Andrea Manzi (CNR), Fabio Simeoni (University of Strathclyde)

Nested Class Summary
static class ISClient.ISMalformedQueryException
          Exception raised when the query expression is not well-formed with respect to the language supported by the underlying implementation of ISClient.
static class ISClient.ISMalformedResultException
          Exception raised when the results of a query cannot be parsed by the implementation underlying ISClient.
static class ISClient.ISUnsupportedQueryException
          Exception raised when the implementation ISClient does not support a given query.
 
Method Summary
<RESULT> List<RESULT>
execute(ISQuery<RESULT> query, GCUBEScope scope)
          Evaluates a query in a given scope and returns its results a local list.
<RESULT> ISInputStream<RESULT>
executeByRef(ISQuery<RESULT> query, GCUBEScope scope)
          Evaluates a query in a given scope and returns the ISInputStream which contains its results.
<RESULT,QUERY extends ISQuery<RESULT>>
QUERY
getQuery(Class<QUERY> type)
          Returns a query from the interface or class which defines its type.
 GCUBEGenericQuery getQuery(String name)
          Returns a GCUBEGenericQuery from its implementation-defined name.
 

Method Detail

execute

<RESULT> List<RESULT> execute(ISQuery<RESULT> query,
                              GCUBEScope scope)
                     throws ISClient.ISMalformedQueryException,
                            ISClient.ISUnsupportedQueryException,
                            ISException
Evaluates a query in a given scope and returns its results a local list.

Type Parameters:
RESULT - The type of the query results.
Parameters:
query - the query.
scope - the scope.
Returns:
the results.
Throws:
ISClient.ISMalformedQueryException - if the query is incorrectly formulated and cannot produce results.
ISException - if the evaluation could not be completed.
ISClient.ISUnsupportedQueryException

executeByRef

<RESULT> ISInputStream<RESULT> executeByRef(ISQuery<RESULT> query,
                                            GCUBEScope scope)
                                   throws ISClient.ISMalformedQueryException,
                                          ISClient.ISUnsupportedQueryException,
                                          ISException
Evaluates a query in a given scope and returns the ISInputStream which contains its results.

Type Parameters:
RESULT - The type of the query results.
Parameters:
query - the query.
scope - the scope.
Returns:
the reader.
Throws:
ISClient.ISMalformedQueryException - if the query is incorrectly formulated and cannot produce results.
ISException - if the evaluation could not be completed.
ISClient.ISUnsupportedQueryException

getQuery

<RESULT,QUERY extends ISQuery<RESULT>> QUERY getQuery(Class<QUERY> type)
                                       throws ISClient.ISUnsupportedQueryException,
                                              InstantiationException,
                                              IllegalAccessException
Returns a query from the interface or class which defines its type. The method is intended as a means to bind query interfaces to concrete implementations provided along with implementations of this interface.

Type Parameters:
RESULT - the type of the query results.
QUERY - the type of the query which produces results of type RESULT.
Parameters:
type - the query interface or class.
Returns:
the query.
Throws:
ISClient.ISUnsupportedQueryException
InstantiationException
IllegalAccessException

getQuery

GCUBEGenericQuery getQuery(String name)
                           throws ISClient.ISUnsupportedQueryException
Returns a GCUBEGenericQuery from its implementation-defined name. The method is intended as a means to lookup generic queries pre-defined by implementations of this interface.

Parameters:
name - the query name
Returns:
the query.
Throws:
ISClient.ISUnsupportedQueryException


Copyright © 2013. All Rights Reserved.