Interface ResourceRegistryQueryTemplateClient

All Superinterfaces:
org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
All Known Implementing Classes:
ResourceRegistryQueryTemplateClientImpl

public interface ResourceRegistryQueryTemplateClient extends org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
Client interface for managing query templates in the Resource Registry system.

The interface is the authoritative caller-facing contract. Stable invocation options are represented by immutable request options, while HTTP metadata is available through the opt-in response executor without changing ordinary domain-oriented return values.

Author:
Luca Frosini (ISTI - CNR)
  • Field Summary

    Fields inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

    DEFAULT_LIMIT, DEFAULT_OFFSET, UNBOUNDED_LIMIT
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHeader(String name, boolean value)
    Deprecated.
    use per-request custom headers from ResourceRegistryRequestOptions
    void
    addHeader(String name, String value)
    Deprecated.
    use per-request custom headers from ResourceRegistryRequestOptions
    List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>
    all()
    Retrieves all query templates from the Resource Registry.
    createOrUpdate(String queryTemplate)
    Creates a new query template, or updates the existing one with the same name (upsert), from its JSON representation.
    org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate
    createOrUpdate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Creates a new query template, or updates the existing one with the same name (upsert).
    boolean
    delete(String queryTemplateName)
    Deletes an existing query template from the Resource Registry by its name.
    boolean
    delete(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Deletes an existing query template from the Resource Registry.
    boolean
    exist(String queryTemplateName)
    Checks if a query template exists in the Resource Registry using template name.
    boolean
    exist(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Checks if a query template exists in the Resource Registry.
    boolean
    Whether run(java.lang.String) executes a query template's underlying query polymorphically (including subtypes).
    Executes a JSON Query against the Query Template collection itself (e.g. by name), as opposed to run(String), which executes a named template's own stored query.
    List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>
    jsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Executes a JSON Query against the Query Template collection itself and deserializes the matching definitions.
    default List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>
    Alias for all().
    List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>
    query(String query)
    Executes a JSON Query against the Query Template collection itself and returns the matching definitions.
    org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate
    read(String queryTemplateName)
    Reads an existing query template from the Resource Registry by its name.
    org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate
    read(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Reads an existing query template from the Resource Registry using a provided template object.
    readAsString(String queryTemplateName)
    Reads an existing query template from the Resource Registry as JSON string.
    <E extends org.gcube.informationsystem.model.reference.ERElement>
    List<E>
    run(String name)
    Executes the named query template with no parameters.
    run(String name, String params)
    Executes the named query template, substituting the given JSON parameter values into its template variables.
    <E extends org.gcube.informationsystem.model.reference.ERElement>
    List<E>
    run(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Executes the named query template, substituting the given parameter values.
    <E extends org.gcube.informationsystem.model.reference.ERElement>
    List<E>
    run(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Executes the query template with no parameters; the name is taken from the given QueryTemplate.
    <E extends org.gcube.informationsystem.model.reference.ERElement>
    List<E>
    run(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Executes the query template, substituting the given parameter values; the name is taken from the given QueryTemplate.
    Executes the named query template with no parameters and returns the results as a JSON array string.
    void
    setPolymorphic(boolean polymorphic)
    Configures whether run(java.lang.String) executes a query template's underlying query polymorphically (including subtypes).

    Methods inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

    allMeta, getLimit, getOffset, includeContexts, includeMeta, isHierarchicalMode, serverResponses, setAllMeta, setHierarchicalMode, setIncludeContexts, setIncludeMeta, setLimit, setOffset
  • Method Details

    • addHeader

      @Deprecated void addHeader(String name, String value)
      Deprecated.
      use per-request custom headers from ResourceRegistryRequestOptions
      Adds a custom HTTP header to be included in requests.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      name - Header name
      value - Header value
    • addHeader

      @Deprecated void addHeader(String name, boolean value)
      Deprecated.
      use per-request custom headers from ResourceRegistryRequestOptions
      Adds a custom HTTP header to be included in requests.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      name - Header name
      value - boolean value
    • all

      List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> all() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves all query templates from the Resource Registry.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(), including RFC 8288 pagination Link headers and X-Warning. Request options configured via ResourceRegistryRequestOptions may specify pagination (limit, offset) and metadataPolicy.

      Returns:
      List of all query templates accessible to the current user, or an empty list if none exist
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template retrieval
    • list

      default List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> list() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Alias for all().
      Returns:
      List of all query templates accessible to the current user, or an empty list if none exist
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template retrieval
    • createOrUpdate

      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate createOrUpdate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Creates a new query template, or updates the existing one with the same name (upsert). The name is taken from the given QueryTemplate.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify metadataPolicy.

      Parameters:
      queryTemplate - the query template to create or update; must not be null and must have a non-blank name
      Returns:
      the created/updated query template, as returned by the server
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the template definition is invalid or the operation fails
    • createOrUpdate

      String createOrUpdate(String queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Creates a new query template, or updates the existing one with the same name (upsert), from its JSON representation. The name is taken from the JSON name property.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify metadataPolicy.

      Parameters:
      queryTemplate - JSON representation of the query template to create or update; must not be null or blank
      Returns:
      JSON representation of the created/updated query template, as returned by the server
      Throws:
      IllegalArgumentException - if queryTemplate is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the template definition is invalid or the operation fails
    • exist

      boolean exist(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a query template exists in the Resource Registry.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      queryTemplate - The query template to check for existence; must not be null and must have a valid name
      Returns:
      true if the query template exists and is accessible, false if not found
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • exist

      boolean exist(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a query template exists in the Resource Registry using template name.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      queryTemplateName - The name of the query template to check for existence; must not be null or blank
      Returns:
      true if the query template exists and is accessible, false if not found
      Throws:
      IllegalArgumentException - if queryTemplateName is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • read

      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads an existing query template from the Resource Registry using a provided template object.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify metadataPolicy.

      Parameters:
      queryTemplate - Template object containing at least the name; must not be null
      Returns:
      The complete query template from the Resource Registry
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If no query template is found with the specified name
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during template retrieval
    • read

      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads an existing query template from the Resource Registry by its name.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(), including canonical Content-Location, Link: rel="collection", and X-Warning. Request options configured via ResourceRegistryRequestOptions may specify metadataPolicy.

      Parameters:
      queryTemplateName - The name of the query template to read; must not be null or blank
      Returns:
      The complete query template from the Resource Registry
      Throws:
      IllegalArgumentException - if queryTemplateName is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If no query template is found with the specified name
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during template retrieval
    • readAsString

      String readAsString(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads an existing query template from the Resource Registry as JSON string.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(), including canonical Content-Location, Link: rel="collection", and X-Warning. Request options configured via ResourceRegistryRequestOptions may specify metadataPolicy.

      Parameters:
      queryTemplateName - The name of the query template to read; must not be null or blank
      Returns:
      JSON representation of the complete query template from the Resource Registry
      Throws:
      IllegalArgumentException - if queryTemplateName is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If no query template is found with the specified name
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during template retrieval
    • runGetString

      String runGetString(String name) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the named query template with no parameters and returns the results as a JSON array string.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Parameters:
      name - the name of the query template to execute; must not be null or blank
      Returns:
      JSON array string containing the query results, or empty array string "[]" if no results match
      Throws:
      IllegalArgumentException - if name is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • run

      <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run(String name) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the named query template with no parameters. See runGetString(String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Type Parameters:
      E - the expected Information System element type
      Parameters:
      name - the name of the query template to execute; must not be null or blank
      Returns:
      the query results, deserialized, or an empty list if no results match
      Throws:
      IllegalArgumentException - if name is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • run

      <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the query template with no parameters; the name is taken from the given QueryTemplate. See runGetString(String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Type Parameters:
      E - the expected Information System element type
      Parameters:
      queryTemplate - the query template to execute (only its name is used); must not be null
      Returns:
      the query results, deserialized, or an empty list if no results match
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • run

      String run(String name, String params) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the named query template, substituting the given JSON parameter values into its template variables. See runGetString(String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Parameters:
      name - the name of the query template to execute; must not be null or blank
      params - JSON object with parameter values for template substitution, or null/empty for defaults; parameters omitted fall back to their declared default value, if any
      Returns:
      JSON array string containing the query results, or empty array string "[]" if no results match
      Throws:
      IllegalArgumentException - if name is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • run

      <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the named query template, substituting the given parameter values. See run(String, String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Type Parameters:
      E - the expected Information System element type
      Parameters:
      name - the name of the query template to execute; must not be null or blank
      jsonNode - parameter values for template substitution, or null for defaults
      Returns:
      the query results, deserialized, or an empty list if no results match
      Throws:
      IllegalArgumentException - if name is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • run

      <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes the query template, substituting the given parameter values; the name is taken from the given QueryTemplate. See run(String, String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Client options and ResourceRegistryRequestOptions configure polymorphic, hierarchicalMode, includeContexts, metadataPolicy, limit, and offset.

      Type Parameters:
      E - the expected Information System element type
      Parameters:
      queryTemplate - the query template to execute (only its name is used); must not be null
      jsonNode - parameter values for template substitution, or null for defaults
      Returns:
      the query results, deserialized, or an empty list if no results match
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if no query template with the given name exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the execution fails
    • delete

      boolean delete(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Deletes an existing query template from the Resource Registry.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      queryTemplate - The query template to delete (must have a valid name); must not be null
      Returns:
      true if the query template was successfully deleted
      Throws:
      IllegalArgumentException - if queryTemplate is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If no query template is found with the specified name
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during template deletion
    • delete

      boolean delete(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Deletes an existing query template from the Resource Registry by its name.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      queryTemplateName - The name of the query template to delete; must not be null or blank
      Returns:
      true if the query template was successfully deleted
      Throws:
      IllegalArgumentException - if queryTemplateName is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If no query template is found with the specified name
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during template deletion
    • isPolymorphic

      boolean isPolymorphic()
      Whether run(java.lang.String) executes a query template's underlying query polymorphically (including subtypes). Default: true.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Returns:
      the currently configured polymorphic flag
    • setPolymorphic

      void setPolymorphic(boolean polymorphic)
      Configures whether run(java.lang.String) executes a query template's underlying query polymorphically (including subtypes).

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

      Parameters:
      polymorphic - true to include subtypes (default), false for exact type match only
    • jsonQuery

      String jsonQuery(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a JSON Query against the Query Template collection itself (e.g. by name), as opposed to run(String), which executes a named template's own stored query.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify pagination (limit, offset) and metadataPolicy.

      Parameters:
      query - JSON object describing the Query Template structure to search for; must not be null or blank
      Returns:
      JSON array string of matching query template definitions, or empty array string "[]" if none match
      Throws:
      IllegalArgumentException - if query is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query syntax is invalid
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the lookup fails
    • jsonQuery

      List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> jsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a JSON Query against the Query Template collection itself and deserializes the matching definitions. See jsonQuery(String) for the underlying contract.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify pagination (limit, offset) and metadataPolicy.

      Parameters:
      jsonNode - JsonNode describing the Query Template structure to search for; must not be null
      Returns:
      the matching query template definitions, or an empty list if none match
      Throws:
      IllegalArgumentException - if jsonNode is null
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query syntax is invalid
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the lookup fails
    • query

      List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> query(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a JSON Query against the Query Template collection itself and returns the matching definitions.

      Convenience alias delegating to jsonQuery(String) followed by deserialization to a list of QueryTemplate entities.

      Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses(). Request options configured via ResourceRegistryRequestOptions may specify pagination (limit, offset) and metadataPolicy.

      Parameters:
      query - JSON Query-By-Example string describing the Query Template structure to search for; must not be null or blank
      Returns:
      a list of matching query templates, or an empty list if no query templates match
      Throws:
      IllegalArgumentException - if query is null or blank
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query syntax is invalid
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the lookup fails or an error occurs during retrieval