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.RequestInfoClient 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)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddHeader(String name, boolean value)Deprecated.use per-request custom headers fromResourceRegistryRequestOptionsvoidaddHeader(String name, String value)Deprecated.use per-request custom headers fromResourceRegistryRequestOptionsbooleanexistContext(String uuid)Checks if a context with the specified UUID (as string) exists in the system using internal cache.booleanexistContext(UUID uuid)Checks if a context with the specified UUID exists in the system using internal cache.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleanexistInstance(Class<ERElem> clazz, UUID uuid)Checks if an Information System element instance exists in the Resource Registry using class and UUID.booleanexistInstance(String type, UUID uuid)Checks if an Information System element instance exists in the Resource Registry using type name and UUID.booleanexistQueryTemplate(String queryTemplateName)Checks if a query template exists in the Resource Registry using template name.booleanexistQueryTemplate(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>
booleanexistType(Class<ME> clazz)Checks if a type definition exists in the Information System using a model element class.booleanexistType(String typeName)Checks if a type definition exists in the Information System using the type name.List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContexts()Retrieves all available contexts using internal cache.List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>getAllQueryTemplates()Retrieves one configured page of global Query Templates.org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(String uuid)Retrieves a specific context by its UUID (as string) using internal cache.org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(String uuid, int depth)String-UUID overload ofgetContext(UUID, int).org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(UUID uuid)Retrieves a specific context by its UUID using internal cache.org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(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.ContextCachegetContextCache()Gets the context cache used for context-related operations.List<org.gcube.informationsystem.model.reference.properties.Event>getContextHistory(String uuid)String-UUID overload ofgetContextHistory(UUID).List<org.gcube.informationsystem.model.reference.properties.Event>getContextHistory(UUID uuid)Reads the event history/audit trail of the Context identified by the given UUID.org.gcube.informationsystem.contexts.reference.entities.ContextgetCurrentContext()Retrieves the current context associated with the client's authorization token using internal cache.org.gcube.informationsystem.contexts.reference.entities.ContextgetCurrentContext(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.<R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<R>getFilteredResources(Class<R> resourceClass, Class<C> consistsOfClass, Class<F> facetClass, boolean polymorphic, Map<String,String> facetConstraint)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))StringgetFilteredResources(String resourceType, String consistsOfType, String facetType, boolean polymorphic, Map<String,String> facetConstraint)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemgetInstance(Class<ERElem> clazz, UUID uuid)Reads an existing instance from the Resource Registry by its type class and UUID.StringgetInstance(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.Map<UUID,String>getInstanceContexts(String type, UUID uuid)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.StringgetInstances(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>getModelKnowledge()Retrieves the complete model knowledge containing type definitions and their information.<R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource>
List<R>getRelatedResources(Class<R> resourceClass, Class<I> isRelatedToClass, Class<RR> referenceResourceClass, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))StringgetRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource>
List<R>getRelatedResourcesFromReferenceResource(Class<R> resourceClass, Class<I> isRelatedToClass, Class<RR> referenceResourceClass, UUID referenceResourceUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource>
List<R>getRelatedResourcesFromReferenceResource(Class<R> resourceClass, Class<I> isRelatedToClass, RR referenceResource, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))StringgetRelatedResourcesFromReferenceResource(String resourceType, String isRelatedToType, String referenceResourceType, UUID referenceResourceUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<R>getResourcesFromReferenceFacet(Class<R> resourceClass, Class<C> consistsOfClass, F referenceFacet, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<R>getResourcesFromReferenceFacet(Class<R> resourceClass, Class<C> consistsOfClass, Class<F> facetClass, UUID referenceFacetUUID, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))StringgetResourcesFromReferenceFacet(String resourceType, String consistsOfType, String facetType, UUID referenceFacetUUID, boolean polymorphic)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))<ME extends org.gcube.informationsystem.model.reference.ModelElement>
List<org.gcube.informationsystem.types.reference.Type>getType(Class<ME> clazz, int level)Type-safe counterpart ofgetType(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 ofgetType(String, Boolean)using the class-derived type name.StringgetType(String typeName, int level)Reads a case-sensitive type from the local snapshot with breadth-first depth0, a positive depth, or-1; values below-1fall back to root-only depth0.StringgetType(String typeName, Boolean polymorphic)Reads a case-sensitive type from the local type snapshot;trueincludes every descendant, whilefalseornullreturns 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>getTypeDagNode(String typeName)Retrieves the type DAG node for a specific type identified by its name.<ME extends org.gcube.informationsystem.model.reference.ModelElement>
org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type>getTypeTreeNode(Class<ME> clazz)Deprecated.the type hierarchy is a DAG: usegetTypeDagNode(Class)org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type>getTypeTreeNode(String typeName)Deprecated.the type hierarchy is a DAG: usegetTypeDagNode(String)StringjsonQuery(String query)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 ofjsonQuery(String), deserializing the JSON query result into strongly-typedEntityinstances.default <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
List<ERElem>list(Class<ERElem> clazz, Boolean polymorphic)Alias forgetInstances(Class, Boolean)matchingResourceRegistryPublisher.list(Class, Boolean).default Stringlist(String type, Boolean polymorphic)Alias forgetInstances(String, Boolean)matchingResourceRegistryPublisher.list(String, Boolean).default Stringquery(String query)Alias forjsonQuery(String)matchingResourceRegistryPublisher.query(String, Boolean).default <E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>query(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)Alias forjsonQuery(JsonNode).StringqueryContexts(String jsonQuery)Executes a JSON Query-By-Example payload against the Contexts collection.StringqueryQueryTemplates(String jsonQuery)Executes a paginated JSON Query-By-Example payload against the global Query Template definitions, forwarding the configuredlimit,offset, and metadata policy.StringqueryTypes(String jsonQuery)Executes a read-only JSON Query-By-Example payload against the global Types collection.StringrawQuery(String query)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))StringrawQuery(String query, boolean raw)Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplatereadQueryTemplate(String queryTemplateName)Reads a global Query Template using its exact, case-sensitive name.org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplatereadQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)Reads the global Query Template whose exact name is carried by the supplied object.StringreadQueryTemplateAsString(String queryTemplateName)Reads a global Query Template as JSON.voidrenewModelKnowledge()Forces a renewal of the cached model knowledge by fetching the latest version from the Resource Registry.StringrunQueryTemplate(String name)Executes a query template and returns results as JSON string (deprecated method).StringrunQueryTemplate(String name, String params)Executes a query template with string parameters and returns results as JSON string.StringrunQueryTemplate(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)Executes a query template with JsonNode parameters and returns results as JSON string.StringrunQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)Executes a query template using template object and returns results as JSON string.StringrunQueryTemplate(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, getContextsPolicy, getLimit, getMembershipScope, getOffset, includeMeta, isHierarchicalMode, serverResponses, setAllMeta, setContextsPolicy, setHierarchicalMode, setIncludeMeta, setLimit, setMembershipScope, setOffset
-
-
-
-
Method Detail
-
addHeader
@Deprecated void addHeader(String name, String value)
Deprecated.use per-request custom headers fromResourceRegistryRequestOptionsAdds a custom HTTP header to be included in requests.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Parameters:
name- Header namevalue- Header value
-
addHeader
@Deprecated void addHeader(String name, boolean value)
Deprecated.use per-request custom headers fromResourceRegistryRequestOptionsAdds a custom HTTP header to be included in requests.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Parameters:
name- Header namevalue- 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 serviceorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the existence checkIllegalArgumentException- 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 accessibleorg.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 foundorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval or authorization issuesIllegalArgumentException- 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 foundorg.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.ResourceRegistryExceptionRetrieves 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 resolvedorg.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 retrievedepth-0for the context alone, a positiveNforNlevels of descendants,-1for the full subtree recursively- Returns:
- the Context with its
childrenpopulated up to the requested depth - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if no context with the specified UUID existsorg.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 ofgetContext(UUID, int).Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Parameters:
uuid- the UUID (as string) of the context to retrievedepth-0for the context alone, a positiveNforNlevels of descendants,-1for the full subtree recursively- Returns:
- the Context with its
childrenpopulated up to the requested depth - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if no context with the specified UUID existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during retrievalIllegalArgumentException- 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.ResourceRegistryExceptionRetrieves 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, unlikegetCurrentContext().Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Parameters:
depth-0for the context alone, a positiveNforNlevels of descendants,-1for the full subtree recursively- Returns:
- the current Context with its
childrenpopulated up to the requested depth - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current context cannot be resolvedorg.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 existsorg.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 ofgetContextHistory(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 existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during retrievalIllegalArgumentException- 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;trueincludes every descendant, whilefalseornullreturns only the requested type.Each type occurs once in breadth-first order. A fully cached call reports the
CACHEorigin throughRequestInfo.serverResponses()and has no HTTP response metadata.- Parameters:
typeName- the exact type namepolymorphic- whether to include all descendants;nullmeansfalse- 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 snapshotorg.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 depth0, a positive depth, or-1; values below-1fall back to root-only depth0.- Parameters:
typeName- the exact type namelevel-0for the root, a positive descendant depth, or-1for 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 snapshotorg.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 ofgetType(String, Boolean)using the class-derived type name.- Type Parameters:
ME- the model element type- Parameters:
clazz- the class whose exact type name is readpolymorphic- whether to include all descendants;nullmeansfalse- 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 snapshotorg.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 ofgetType(String, int)using the class-derived type name.- Type Parameters:
ME- the model element type- Parameters:
clazz- the class whose exact type name is readlevel-0for the root, a positive descendant depth, or-1for 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 snapshotorg.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 schemaorg.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 schemaorg.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 targetingResourceSchema,FacetSchema,IsRelatedToSchema,ConsistsOfSchema, orPropertySchema. Every authenticated role may invoke the operation and no Context-scoped token is required.ResourceRegistryRequestOptionsmay overridelimit(default 10, maximum 50),offset(default 0),depth(default -1), andmetadataPolicy(default none) for one invocation. Plainname,source, andtargetfilters usedepth. An_emitpayload 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 throughRequestInfo.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 categoryorg.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 retrievepolymorphic- 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 thepolymorphicquery 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 thepolymorphicquery 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 forgetInstances(Class, Boolean)matchingResourceRegistryPublisher.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 retrievepolymorphic- 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 forgetInstances(String, Boolean)matchingResourceRegistryPublisher.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 checkuuid- 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 contextorg.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 checkuuid- 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 contextorg.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 readuuid- 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 typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.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 typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.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.The element is looked up as by
getInstance: it must be present in the token Context, or in one of its descendants when hierarchical mode is enabled. The returned memberships are bounded by the configured membership scope: the token Context subtree by default, every membership withglobal(restricted to IS-Manager, Infrastructure-Manager and IS-Admin).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 retrieveuuid- 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 UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the element exists but is not accessible for context listingorg.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.The element is looked up as by
getInstance: it must be present in the token Context, or in one of its descendants when hierarchical mode is enabled. The returned memberships are bounded by the configured membership scope: the token Context subtree by default, every membership withglobal(restricted to IS-Manager, Infrastructure-Manager and IS-Admin).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 UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the element exists but is not accessible for context listingorg.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.ResourceRegistryExceptionChecks 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.ResourceRegistryExceptionReads the global Query Template whose exact name is carried by the supplied object. Metadata inclusion follows the configuredmetadataPolicy; 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 existorg.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 existorg.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 existorg.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 existorg.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 existorg.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 executeparams- 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 existorg.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 executejsonNode- 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 existorg.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 existorg.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 invalidorg.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 configuredlimit,offset, and metadata policy. This searches templates themselves; userunQueryTemplate(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 invalidorg.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 errorsorg.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 ofjsonQuery(String), deserializing the JSON query result into strongly-typedEntityinstances.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 errorsorg.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 forjsonQuery(String)matchingResourceRegistryPublisher.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 errorsorg.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
Alias forjsonQuery(JsonNode).- 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 errorsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during query execution
-
getTypeTreeNode
@Deprecated <ME extends org.gcube.informationsystem.model.reference.ModelElement> org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type> getTypeTreeNode(Class<ME> clazz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.the type hierarchy is a DAG: usegetTypeDagNode(Class)Retrieves the type node for the given model element class.- 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 schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
getTypeTreeNode
@Deprecated org.gcube.informationsystem.dag.Node<org.gcube.informationsystem.types.reference.Type> getTypeTreeNode(String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.the type hierarchy is a DAG: usegetTypeDagNode(String)Retrieves the type node for the given type name.- 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 schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
rawQuery
@Deprecated String rawQuery(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the raw query endpoint of the Resource Registry is an administrative operation (QUERY /admin/raw-query) that this client does not expose.- Parameters:
query- the raw query- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException- never thrownorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
rawQuery
@Deprecated String rawQuery(String query, boolean raw) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the raw query endpoint of the Resource Registry is an administrative operation (QUERY /admin/raw-query) that this client does not expose.- Parameters:
query- the raw queryraw- whether the raw result is requested- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException- never thrownorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getResourcesFromReferenceFacet
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet> List<R> getResourcesFromReferenceFacet(Class<R> resourceClass, Class<C> consistsOfClass, F referenceFacet, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeC- the ConsistsOf typeF- the facet type- Parameters:
resourceClass- the resource classconsistsOfClass- the ConsistsOf classreferenceFacet- the reference facetpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getResourcesFromReferenceFacet
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet> List<R> getResourcesFromReferenceFacet(Class<R> resourceClass, Class<C> consistsOfClass, Class<F> facetClass, UUID referenceFacetUUID, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeC- the ConsistsOf typeF- the facet type- Parameters:
resourceClass- the resource classconsistsOfClass- the ConsistsOf classfacetClass- the facet classreferenceFacetUUID- the UUID of the reference facetpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getResourcesFromReferenceFacet
@Deprecated String getResourcesFromReferenceFacet(String resourceType, String consistsOfType, String facetType, UUID referenceFacetUUID, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Parameters:
resourceType- the resource type nameconsistsOfType- the ConsistsOf type namefacetType- the facet type namereferenceFacetUUID- the UUID of the reference facetpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getFilteredResources
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<?,?>,F extends org.gcube.informationsystem.model.reference.entities.Facet> List<R> getFilteredResources(Class<R> resourceClass, Class<C> consistsOfClass, Class<F> facetClass, boolean polymorphic, Map<String,String> facetConstraint) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeC- the ConsistsOf typeF- the facet type- Parameters:
resourceClass- the resource classconsistsOfClass- the ConsistsOf classfacetClass- the facet classpolymorphic- whether subtypes are includedfacetConstraint- the constraints on the facet properties- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getFilteredResources
@Deprecated String getFilteredResources(String resourceType, String consistsOfType, String facetType, boolean polymorphic, Map<String,String> facetConstraint) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Parameters:
resourceType- the resource type nameconsistsOfType- the ConsistsOf type namefacetType- the facet type namepolymorphic- whether subtypes are includedfacetConstraint- the constraints on the facet properties- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getRelatedResourcesFromReferenceResource
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource> List<R> getRelatedResourcesFromReferenceResource(Class<R> resourceClass, Class<I> isRelatedToClass, RR referenceResource, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeI- the IsRelatedTo typeRR- the reference resource type- Parameters:
resourceClass- the resource classisRelatedToClass- the IsRelatedTo classreferenceResource- the reference resourcedirection- the direction of the relationpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getRelatedResourcesFromReferenceResource
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource> List<R> getRelatedResourcesFromReferenceResource(Class<R> resourceClass, Class<I> isRelatedToClass, Class<RR> referenceResourceClass, UUID referenceResourceUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeI- the IsRelatedTo typeRR- the reference resource type- Parameters:
resourceClass- the resource classisRelatedToClass- the IsRelatedTo classreferenceResourceClass- the reference resource classreferenceResourceUUID- the UUID of the reference resourcedirection- the direction of the relationpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getRelatedResourcesFromReferenceResource
@Deprecated String getRelatedResourcesFromReferenceResource(String resourceType, String isRelatedToType, String referenceResourceType, UUID referenceResourceUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Parameters:
resourceType- the resource type nameisRelatedToType- the IsRelatedTo type namereferenceResourceType- the reference resource type namereferenceResourceUUID- the UUID of the reference resourcedirection- the direction of the relationpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getRelatedResources
@Deprecated <R extends org.gcube.informationsystem.model.reference.entities.Resource,I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<?,?>,RR extends org.gcube.informationsystem.model.reference.entities.Resource> List<R> getRelatedResources(Class<R> resourceClass, Class<I> isRelatedToClass, Class<RR> referenceResourceClass, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Type Parameters:
R- the resource typeI- the IsRelatedTo typeRR- the reference resource type- Parameters:
resourceClass- the resource classisRelatedToClass- the IsRelatedTo classreferenceResourceClass- the reference resource classdirection- the direction of the relationpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
getRelatedResources
@Deprecated String getRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.use a JSON query (jsonQuery(String)) or a Query Template (runQueryTemplate(String, String))Not available: the prepared query endpoint (GET /access/query/{resource-type}/{relation-type}/{reference-type}) no longer exists in the Resource Registry and has no replacement.- Parameters:
resourceType- the resource type nameisRelatedToType- the IsRelatedTo type namereferenceResourceType- the reference resource type namedirection- the direction of the relationpolymorphic- whether subtypes are included- Returns:
- never returns
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- never thrownUnsupportedOperationException- always
-
-