Interface ResourceRegistryClient

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

public interface ResourceRegistryClient extends org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
Client interface for querying and reading Information System entities, relations, and metadata from the Resource Registry.

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
    boolean
    Checks if a context with the specified UUID (as string) exists in the system using internal cache.
    boolean
    Checks if a context with the specified UUID exists in the system using internal cache.
    <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
    boolean
    existInstance(Class<ERElem> clazz, UUID uuid)
    Checks if an Information System element instance exists in the Resource Registry using class and UUID.
    boolean
    existInstance(String type, UUID uuid)
    Checks if an Information System element instance exists in the Resource Registry using type name and UUID.
    boolean
    existQueryTemplate(String queryTemplateName)
    Checks if a query template exists in the Resource Registry using template name.
    boolean
    existQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Checks if a query template exists in the Resource Registry.
    <ME extends org.gcube.informationsystem.model.reference.ModelElement>
    boolean
    existType(Class<ME> clazz)
    Checks if a type definition exists in the Information System using a model element class.
    boolean
    existType(String typeName)
    Checks if a type definition exists in the Information System using the type name.
    List<org.gcube.informationsystem.contexts.reference.entities.Context>
    Retrieves all available contexts using internal cache.
    List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>
    Retrieves one configured page of global Query Templates.
    org.gcube.informationsystem.contexts.reference.entities.Context
    Retrieves a specific context by its UUID (as string) using internal cache.
    org.gcube.informationsystem.contexts.reference.entities.Context
    getContext(String uuid, int depth)
    String-UUID overload of getContext(UUID, int).
    org.gcube.informationsystem.contexts.reference.entities.Context
    Retrieves a specific context by its UUID using internal cache.
    org.gcube.informationsystem.contexts.reference.entities.Context
    getContext(UUID uuid, int depth)
    Retrieves the Context identified by the given UUID directly from the server, expanding its descendant subtree up to the given depth.
    org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
    Gets the context cache used for context-related operations.
    List<org.gcube.informationsystem.model.reference.properties.Event>
    String-UUID overload of getContextHistory(UUID).
    List<org.gcube.informationsystem.model.reference.properties.Event>
    Reads the event history/audit trail of the Context identified by the given UUID.
    org.gcube.informationsystem.contexts.reference.entities.Context
    Retrieves the current context associated with the client's authorization token using internal cache.
    org.gcube.informationsystem.contexts.reference.entities.Context
    getCurrentContext(int depth)
    Retrieves the context associated with the caller's current authorization token directly from the server, expanding its descendant subtree up to the given depth.
    <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
    ERElem
    getInstance(Class<ERElem> clazz, UUID uuid)
    Reads an existing instance from the Resource Registry by its type class and UUID.
    getInstance(String type, UUID uuid)
    Reads an existing instance from the Resource Registry by its type name and UUID.
    <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
    Map<UUID,String>
    getInstanceContexts(Class<ERElem> clazz, UUID uuid)
    Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.
    Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.
    <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
    List<ERElem>
    getInstances(Class<ERElem> clazz, Boolean polymorphic)
    Retrieves all instances of the specified type from the Resource Registry.
    getInstances(String type, Boolean polymorphic)
    Retrieves all instances of the specified type from the Resource Registry as JSON string.
    org.gcube.informationsystem.model.knowledge.ModelKnowledge<org.gcube.informationsystem.types.reference.Type,org.gcube.informationsystem.types.knowledge.SchemaTypeInformation>
    Retrieves the complete model knowledge containing type definitions and their information.
    <ME extends org.gcube.informationsystem.model.reference.ModelElement>
    List<org.gcube.informationsystem.types.reference.Type>
    getType(Class<ME> clazz, int level)
    Type-safe counterpart of getType(String, int) using the class-derived type name.
    <ME extends org.gcube.informationsystem.model.reference.ModelElement>
    List<org.gcube.informationsystem.types.reference.Type>
    getType(Class<ME> clazz, Boolean polymorphic)
    Type-safe counterpart of getType(String, Boolean) using the class-derived type name.
    getType(String typeName, int level)
    Reads a case-sensitive type from the local snapshot with breadth-first depth 0, a positive depth, or -1; values below -1 fall back to root-only depth 0.
    getType(String typeName, Boolean polymorphic)
    Reads a case-sensitive type from the local type snapshot; true includes every descendant, while false or null returns only the requested type.
    <ME extends org.gcube.informationsystem.model.reference.ModelElement>
    org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type>
    getTypeDagNode(Class<ME> clazz)
    Retrieves the type DAG node for a specific type identified by its model element class.
    org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type>
    Retrieves the type DAG node for a specific type identified by its name.
    Executes a JSON Query-By-Example payload against the Instances collection.
    <E extends org.gcube.informationsystem.model.reference.entities.Entity>
    List<E>
    jsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Typed overload of jsonQuery(String), deserializing the JSON query result into strongly-typed Entity instances.
    default <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
    List<ERElem>
    list(Class<ERElem> clazz, Boolean polymorphic)
    Alias for getInstances(Class, Boolean) matching ResourceRegistryPublisher.list(Class, Boolean).
    default String
    list(String type, Boolean polymorphic)
    Alias for getInstances(String, Boolean) matching ResourceRegistryPublisher.list(String, Boolean).
    default String
    query(String query)
    Alias for jsonQuery(String) matching ResourceRegistryPublisher.query(String, Boolean).
    default <E extends org.gcube.informationsystem.model.reference.entities.Entity>
    List<E>
    query(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    queryContexts(String jsonQuery)
    Executes a JSON Query-By-Example payload against the Contexts collection.
    Executes a paginated JSON Query-By-Example payload against the global Query Template definitions, forwarding the configured limit, offset, and metadata policy.
    queryTypes(String jsonQuery)
    Executes a read-only JSON Query-By-Example payload against the global Types collection.
    org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate
    readQueryTemplate(String queryTemplateName)
    Reads a global Query Template using its exact, case-sensitive name.
    org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate
    readQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Reads the global Query Template whose exact name is carried by the supplied object.
    readQueryTemplateAsString(String queryTemplateName)
    Reads a global Query Template as JSON.
    void
    Forces a renewal of the cached model knowledge by fetching the latest version from the Resource Registry.
    Executes a query template and returns results as JSON string (deprecated method).
    Executes a query template with string parameters and returns results as JSON string.
    runQueryTemplate(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Executes a query template with JsonNode parameters and returns results as JSON string.
    runQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
    Executes a query template using template object and returns results as JSON string.
    runQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Executes a query template using template object with JsonNode parameters and returns results as JSON string.

    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
    • getContextCache

      org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache getContextCache()
      Gets the context cache used for context-related operations.

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

      Returns:
      The context cache instance
    • getAllContexts

      List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves all available contexts using internal cache.

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

      Returns:
      List of all contexts accessible to the current user (from cache)
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If fails to retrieve contexts from cache or server
    • existContext

      boolean existContext(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a context with the specified UUID (as string) exists in the system using internal cache.

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

      Parameters:
      uuid - the UUID of the context (as string) to check for existence
      Returns:
      true if the context exists and is accessible to the current user, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If there are communication errors with the Resource Registry service
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
      IllegalArgumentException - If the provided string is not a valid UUID format
    • existContext

      boolean existContext(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a context with the specified UUID exists in the system using internal cache.

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

      Parameters:
      uuid - the UUID of the context to check for existence
      Returns:
      true if the context exists and is accessible to the current user, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the context is not found or not accessible
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • getContext

      org.gcube.informationsystem.contexts.reference.entities.Context getContext(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves a specific context by its UUID (as string) using internal cache.

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

      Parameters:
      uuid - the UUID of the context (as string) to retrieve
      Returns:
      the Context object with role-appropriate detail level (from cache)
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the context with the specified UUID is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during context retrieval or authorization issues
      IllegalArgumentException - If the provided string is not a valid UUID format
    • getContext

      org.gcube.informationsystem.contexts.reference.entities.Context getContext(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves a specific context by its UUID using internal cache.

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

      Parameters:
      uuid - the UUID of the context to retrieve
      Returns:
      the Context object with role-appropriate detail level (from cache)
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the context with the specified UUID is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during context retrieval or authorization issues
    • getCurrentContext

      org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the current context associated with the client's authorization token using internal cache.

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

      Returns:
      the Context object associated with the current authorization token (from cache)
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be found or resolved
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during context retrieval or authorization issues
    • getContext

      org.gcube.informationsystem.contexts.reference.entities.Context getContext(UUID uuid, int depth) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the Context identified by the given UUID directly from the server, expanding its descendant subtree up to the given depth. Bypasses the context cache, since a depth-expanded result is not a stable cacheable shape.

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

      Parameters:
      uuid - the UUID of the context to retrieve
      depth - 0 for the context alone, a positive N for N levels of descendants, -1 for the full subtree recursively
      Returns:
      the Context with its children populated up to the requested depth
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if no context with the specified UUID exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during retrieval
    • getContext

      org.gcube.informationsystem.contexts.reference.entities.Context getContext(String uuid, int depth) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      String-UUID overload of getContext(UUID, int).

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

      Parameters:
      uuid - the UUID (as string) of the context to retrieve
      depth - 0 for the context alone, a positive N for N levels of descendants, -1 for the full subtree recursively
      Returns:
      the Context with its children populated up to the requested depth
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if no context with the specified UUID exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during retrieval
      IllegalArgumentException - if the provided string is not a valid UUID format
    • getCurrentContext

      org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext(int depth) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the context associated with the caller's current authorization token directly from the server, expanding its descendant subtree up to the given depth. Bypasses the context cache, unlike getCurrentContext().

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

      Parameters:
      depth - 0 for the context alone, a positive N for N levels of descendants, -1 for the full subtree recursively
      Returns:
      the current Context with its children populated up to the requested depth
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current context cannot be resolved
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during retrieval
    • getContextHistory

      List<org.gcube.informationsystem.model.reference.properties.Event> getContextHistory(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads the event history/audit trail of the Context identified by the given UUID. Restricted to administrative roles server-side.

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

      Parameters:
      uuid - the UUID of the context whose history to read
      Returns:
      the history events
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if no context with the specified UUID exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during retrieval
    • getContextHistory

      List<org.gcube.informationsystem.model.reference.properties.Event> getContextHistory(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      String-UUID overload of getContextHistory(UUID).

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

      Parameters:
      uuid - the UUID (as string) of the context whose history to read
      Returns:
      the history events
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if no context with the specified UUID exists
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during retrieval
      IllegalArgumentException - if the provided string is not a valid UUID format
    • getModelKnowledge

      org.gcube.informationsystem.model.knowledge.ModelKnowledge<org.gcube.informationsystem.types.reference.Type,org.gcube.informationsystem.types.knowledge.SchemaTypeInformation> getModelKnowledge()
      Retrieves the complete model knowledge containing type definitions and their information. The model knowledge provides access to all registered types and their hierarchical relationships.

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

      Returns:
      the model knowledge containing type definitions and information
    • renewModelKnowledge

      void renewModelKnowledge()
      Forces a renewal of the cached model knowledge by fetching the latest version from the Resource Registry. This method should be called when the schema has been modified and the local cache needs to be updated.

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

    • existType

      boolean existType(String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a type definition exists in the Information System using the type name.

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

      Parameters:
      typeName - the name of the type to check for existence (case-sensitive)
      Returns:
      true if the type exists in the system, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during the existence check
    • existType

      <ME extends org.gcube.informationsystem.model.reference.ModelElement> boolean existType(Class<ME> clazz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if a type definition exists in the Information System using a model element class.

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

      Type Parameters:
      ME - the model element type parameter
      Parameters:
      clazz - the class of the model element type to check for existence
      Returns:
      true if the type corresponding to the class exists in the system, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during the existence check
    • getType

      String getType(String typeName, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads a case-sensitive type from the local type snapshot; true includes every descendant, while false or null returns only the requested type.

      Each type occurs once in breadth-first order. A fully cached call reports the CACHE origin through RequestInfo.serverResponses() and has no HTTP response metadata.

      Parameters:
      typeName - the exact type name
      polymorphic - whether to include all descendants; null means false
      Returns:
      a non-null JSON array containing the selected cached type definitions
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the requested type is absent from the snapshot
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if cache initialization, serialization, or retrieval fails
    • getType

      String getType(String typeName, int level) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads a case-sensitive type from the local snapshot with breadth-first depth 0, a positive depth, or -1; values below -1 fall back to root-only depth 0.
      Parameters:
      typeName - the exact type name
      level - 0 for the root, a positive descendant depth, or -1 for all descendants
      Returns:
      a non-null JSON array with each selected cached type exactly once
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the requested type is absent from the snapshot
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if cache initialization, serialization, or retrieval fails
    • getType

      <ME extends org.gcube.informationsystem.model.reference.ModelElement> List<org.gcube.informationsystem.types.reference.Type> getType(Class<ME> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Type-safe counterpart of getType(String, Boolean) using the class-derived type name.
      Type Parameters:
      ME - the model element type
      Parameters:
      clazz - the class whose exact type name is read
      polymorphic - whether to include all descendants; null means false
      Returns:
      a non-null breadth-first list with each cached type exactly once
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the class-derived type is absent from the snapshot
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if cache initialization or retrieval fails
    • getType

      <ME extends org.gcube.informationsystem.model.reference.ModelElement> List<org.gcube.informationsystem.types.reference.Type> getType(Class<ME> clazz, int level) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Type-safe counterpart of getType(String, int) using the class-derived type name.
      Type Parameters:
      ME - the model element type
      Parameters:
      clazz - the class whose exact type name is read
      level - 0 for the root, a positive descendant depth, or -1 for all descendants
      Returns:
      a non-null breadth-first list with each cached type exactly once
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the class-derived type is absent from the snapshot
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if cache initialization or retrieval fails
    • getTypeDagNode

      <ME extends org.gcube.informationsystem.model.reference.ModelElement> org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type> getTypeDagNode(Class<ME> clazz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the type DAG node for a specific type identified by its model element class. The DAG node contains the type definition and its hierarchical position within the type system.

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

      Type Parameters:
      ME - the model element type parameter
      Parameters:
      clazz - the class of the model element type to retrieve
      Returns:
      the DAG node containing the type and its hierarchical information
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the type corresponding to the specified class does not exist in the schema
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during the operation
    • getTypeDagNode

      org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type> getTypeDagNode(String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the type DAG node for a specific type identified by its name. The DAG node contains the type definition and its hierarchical position within the type system.

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

      Parameters:
      typeName - the name of the type to retrieve
      Returns:
      the DAG node containing the type and its hierarchical information
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException - if the specified type name does not exist in the schema
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during the operation
    • queryTypes

      String queryTypes(String jsonQuery) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a read-only JSON Query-By-Example payload against the global Types collection. The payload must be a non-null JSON object targeting ResourceSchema, FacetSchema, IsRelatedToSchema, ConsistsOfSchema, or PropertySchema. Every authenticated role may invoke the operation and no Context-scoped token is required.

      ResourceRegistryRequestOptions may override limit (default 10, maximum 50), offset (default 0), depth (default -1), and metadataPolicy (default none) for one invocation. Plain name, source, and target filters use depth. An _emit payload returns flat, native-typed aliases and supersedes metadata inclusion. Per-request options take precedence over this client's pagination and metadata defaults.

      The method has no local cache or mutation side effects. It returns [] when no definition matches. Pagination links and parameter/projection warnings are available through RequestInfo.serverResponses().

      Parameters:
      jsonQuery - non-null JSON object describing the Type definitions to search for
      Returns:
      JSON array string containing full Type definitions or flat projection rows; never null
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the payload is malformed, structurally invalid, or targets an unsupported Type category
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if request construction, transport, response processing, or server-side persistence fails
    • getInstances

      <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<ERElem> getInstances(Class<ERElem> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves all instances of the specified type from the Resource Registry.

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

      Type Parameters:
      ERElem - The specific type of Information System element to retrieve
      Parameters:
      clazz - The class representing the type of instances to retrieve
      polymorphic - Whether to include instances of subtypes (true) or only exact type instances (false). When true, includes all subtypes of the specified type; when false, returns only instances of the exact specified type. This parameter is automatically set in the polymorphic query parameter of the REST API call.
      Returns:
      List of instances of the specified type accessible in the current context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval or if the type is invalid
    • getInstances

      String getInstances(String type, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves all instances of the specified type from the Resource Registry as JSON string.

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

      Parameters:
      type - The name of the Information System type to retrieve (case-sensitive)
      polymorphic - Whether to include instances of subtypes (true) or only exact type instances (false). When true, includes all subtypes of the specified type; when false, returns only instances of the exact specified type. This parameter is automatically set in the polymorphic query parameter of the REST API call.
      Returns:
      JSON array string containing instances of the specified type accessible in the current context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval or if the type is invalid
    • list

      default <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<ERElem> list(Class<ERElem> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Alias for getInstances(Class, Boolean) matching ResourceRegistryPublisher.list(Class, Boolean).
      Type Parameters:
      ERElem - The specific type of Information System element to retrieve
      Parameters:
      clazz - The class representing the type of instances to retrieve
      polymorphic - Whether to include instances of subtypes (true) or only exact type instances (false)
      Returns:
      List of instances of the specified type accessible in the current context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
    • list

      default String list(String type, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Alias for getInstances(String, Boolean) matching ResourceRegistryPublisher.list(String, Boolean).
      Parameters:
      type - The name of the Information System type to retrieve (case-sensitive)
      polymorphic - Whether to include instances of subtypes (true) or only exact type instances (false)
      Returns:
      JSON array string containing instances of the specified type accessible in the current context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
    • existInstance

      <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean existInstance(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if an Information System element instance exists in the Resource Registry using class and UUID.

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

      Type Parameters:
      ERElem - The specific type of Information System element to check
      Parameters:
      clazz - The class representing the type of instance to check
      uuid - The UUID of the instance to check for existence
      Returns:
      true if the instance exists and is accessible in the current context, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • existInstance

      boolean existInstance(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Checks if an Information System element instance exists in the Resource Registry using type name and UUID.

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

      Parameters:
      type - The name of the Information System type to check
      uuid - The UUID of the instance to check for existence
      Returns:
      true if the instance exists and is accessible in the current context, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • getInstance

      <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem getInstance(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads an existing instance from the Resource Registry by its type class and UUID.

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

      Type Parameters:
      ERElem - The specific type of Entity or Relation to read
      Parameters:
      clazz - The class of the Entity or Relation type to read
      uuid - The unique identifier of the instance to read
      Returns:
      The complete instance from the Resource Registry
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If no instance is found with the specified UUID and type
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
    • getInstance

      String getInstance(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads an existing instance from the Resource Registry by its type name and UUID.

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

      Parameters:
      type - The name of the Information System type to read (case-sensitive)
      uuid - The unique identifier of the instance to read
      Returns:
      JSON string containing the complete instance from the Resource Registry
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If no instance is found with the specified UUID and type
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
    • getInstanceContexts

      <ERElem extends org.gcube.informationsystem.model.reference.ERElement> Map<UUID,String> getInstanceContexts(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.

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

      Type Parameters:
      ERElem - The type of Information System element (Resource, Facet, ConsistsOf, or IsRelatedTo)
      Parameters:
      clazz - The class of the Information System element whose contexts to retrieve
      uuid - The unique identifier of the element whose contexts to retrieve
      Returns:
      Map containing context UUID to context path mappings where the element is present
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If no element is found with the specified class and UUID
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the element exists but is not accessible for context listing
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during context retrieval
    • getInstanceContexts

      Map<UUID,String> getInstanceContexts(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.

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

      Parameters:
      type - The exact type name of the Information System element (e.g., "EService", "ContactFacet")
      uuid - The unique identifier of the element whose contexts to retrieve
      Returns:
      Map containing context UUID to context path mappings where the element is present
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If no element is found with the specified type and UUID
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the element exists but is not accessible for context listing
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during context retrieval
    • getAllQueryTemplates

      List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> getAllQueryTemplates() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves one configured page of global Query Templates. Pagination and metadata settings are forwarded in contract order. The token Context is not a visibility boundary, while metadata identity fields are redacted for non-privileged callers.

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

      Returns:
      the configured page of query templates
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template retrieval
    • existQueryTemplate

      boolean existQueryTemplate(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 have a valid name)
      Returns:
      true if the query template exists and is accessible, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • existQueryTemplate

      boolean existQueryTemplate(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
      Returns:
      true if the query template exists and is accessible, false if not found
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
    • readQueryTemplate

      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate readQueryTemplate(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 the global Query Template whose exact name is carried by the supplied object. Metadata inclusion follows the configured metadataPolicy; identity fields are redacted by the server for non-global roles.

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

      Parameters:
      queryTemplate - the object carrying the Query Template name
      Returns:
      the matching Query Template
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if the exact name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if retrieval fails
    • readQueryTemplate

      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate readQueryTemplate(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads a global Query Template using its exact, case-sensitive name. Metadata inclusion follows the configured policy; identity fields are redacted by the server for non-global roles.

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

      Parameters:
      queryTemplateName - the exact Query Template name
      Returns:
      the matching Query Template
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if the exact name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if retrieval fails
    • readQueryTemplateAsString

      String readQueryTemplateAsString(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads a global Query Template as JSON. The exact name and configured metadata policy are forwarded unchanged.

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

      Parameters:
      queryTemplateName - the exact Query Template name
      Returns:
      the matching Query Template JSON representation
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - if the exact name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if retrieval fails
    • runQueryTemplate

      String runQueryTemplate(String name) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a query template and returns results as JSON string (deprecated method).

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

      Parameters:
      name - The name of the query template to execute
      Returns:
      JSON array string containing query results
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If the query template with the specified name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template execution
    • runQueryTemplate

      String runQueryTemplate(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 a query template using template object and returns results as JSON string.

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

      Parameters:
      queryTemplate - The query template to execute (name is extracted from this object)
      Returns:
      JSON array string containing query results
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If the query template with the specified name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template execution
    • runQueryTemplate

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

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

      Parameters:
      name - The name of the query template to execute
      params - JSON string containing parameter values for template substitution
      Returns:
      JSON array string containing query results
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If the query template with the specified name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template execution
    • runQueryTemplate

      String runQueryTemplate(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 a query template with JsonNode parameters and returns results as JSON string.

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

      Parameters:
      name - The name of the query template to execute
      jsonNode - JsonNode containing parameter values for template substitution
      Returns:
      JSON array string containing query results
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If the query template with the specified name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template execution
    • runQueryTemplate

      String runQueryTemplate(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 a query template using template object with JsonNode parameters and returns results as JSON string.

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

      Parameters:
      queryTemplate - The query template to execute (name is extracted from this object)
      jsonNode - JsonNode containing parameter values for template substitution
      Returns:
      JSON array string containing query results
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException - If the query template with the specified name does not exist
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query template execution
    • queryContexts

      String queryContexts(String jsonQuery) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a JSON Query-By-Example payload against the Contexts collection.

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

      Parameters:
      jsonQuery - JSON object describing the Context structure to search for
      Returns:
      JSON array string containing the matching Contexts
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query syntax is invalid
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the database lookup fails
    • queryQueryTemplates

      String queryQueryTemplates(String jsonQuery) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Executes a paginated JSON Query-By-Example payload against the global Query Template definitions, forwarding the configured limit, offset, and metadata policy. This searches templates themselves; use runQueryTemplate(String, String) to run one.

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

      Parameters:
      jsonQuery - JSON object describing the Query Template structure to search for
      Returns:
      JSON array string containing the matching Query Template definitions
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query syntax is invalid
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the database lookup fails
    • 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-By-Example payload against the Instances collection.

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

      Parameters:
      query - JSON string describing the structure to search for
      Returns:
      JSON array string containing the matching instances
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - If the query structure is invalid or contains syntax errors
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query execution
    • jsonQuery

      <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> 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
      Typed overload of jsonQuery(String), deserializing the JSON query result into strongly-typed Entity instances.

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

      Type Parameters:
      E - the specific Entity type expected in results
      Parameters:
      jsonNode - JsonNode representing the query structure
      Returns:
      List of Entity instances matching the query criteria
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - If the query structure is invalid or contains syntax errors
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query execution
    • query

      default String query(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Alias for jsonQuery(String) matching ResourceRegistryPublisher.query(String, Boolean).
      Parameters:
      query - JSON string describing the structure to search for
      Returns:
      JSON array string containing the matching instances
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - If the query structure is invalid or contains syntax errors
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query execution
    • query

      default <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> query(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Type Parameters:
      E - the specific Entity type expected in results
      Parameters:
      jsonNode - JsonNode representing the query structure
      Returns:
      List of Entity instances matching the query criteria
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - If the query structure is invalid or contains syntax errors
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during query execution