Class ResourceRegistryClientImpl
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientImpl
-
- All Implemented Interfaces:
ResourceRegistryClient
public class ResourceRegistryClientImpl extends Object implements ResourceRegistryClient
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringaddressprotected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCachecontextCacheprotected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCacheRenewalcontextCacheRenewalprotected Map<String,String>headersprotected booleanhierarchicalModeprotected booleanincludeContextsInHeader
-
Constructor Summary
Constructors Constructor Description ResourceRegistryClientImpl(String address)ResourceRegistryClientImpl(String address, boolean sharedContextCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String name, String value)booleanexistContext(String uuid)booleanexistContext(UUID uuid)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleanexistInstance(Class<ERElem> clazz, UUID uuid)booleanexistInstance(String type, UUID uuid)booleanexistQueryTemplate(String queryTemplateName)booleanexistQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleanexistType(Class<ERElem> clazz)booleanexistType(String typeName)List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContext()List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContextFromServer()List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate>getAllQueryTemplates()org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(String uuid)org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(UUID uuid)protected org.gcube.informationsystem.contexts.reference.entities.ContextgetContextFromServer(String uuid)org.gcube.informationsystem.contexts.reference.entities.ContextgetCurrentContext()<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> facetConstraints)StringgetFilteredResources(String resourceType, String consistsOfType, String facetType, boolean polymorphic, Map<String,String> facetConstraints)protected org.gcube.common.gxhttp.request.GXHTTPStringRequestgetGXHTTPStringRequest()<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemgetInstance(Class<ERElem> clazz, UUID uuid)StringgetInstance(String type, UUID uuid)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
Map<UUID,String>getInstanceContexts(Class<ERElem> clazz, UUID uuid)Map<UUID,String>getInstanceContexts(String type, UUID uuid)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
List<ERElem>getInstances(Class<ERElem> clazz, Boolean polymorphic)StringgetInstances(String type, Boolean polymorphic)protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, UUID referenceEntityUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic, Map<String,String> map)protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, RE referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)protected StringgetRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)protected StringgetRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, Boolean polymorphic, Map<String,String> facetConstraints)protected StringgetRelated(String entityType, String relationType, String referenceEntityType, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic, Map<String,String> facetConstraints)<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)StringgetRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)<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)<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)StringgetRelatedResourcesFromReferenceResource(String resourceType, String isRelatedToType, String referenceResourceType, UUID referenceResourceUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)<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)<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)StringgetResourcesFromReferenceFacet(String resourceType, String consistsOfType, String facetType, UUID facetUUID, boolean polymorphic)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
List<org.gcube.informationsystem.types.reference.Type>getType(Class<ERElem> clazz, Boolean polymorphic)StringgetType(String typeName, Boolean polymorphic)booleanisHierarchicalMode()booleanisIncludeContextsInHeader()StringjsonQuery(String query)<E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>jsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)StringrawQuery(String query)StringrawQuery(String query, boolean raw)org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplatereadQueryTemplate(String queryTemplateName)org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplatereadQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)StringreadQueryTemplateAsString(String queryTemplateName)<E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>runQueryTemplate(String name)StringrunQueryTemplate(String name, String params)<E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>runQueryTemplate(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)<E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>runQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)<E extends org.gcube.informationsystem.model.reference.entities.Entity>
List<E>runQueryTemplate(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)StringrunQueryTemplateGetString(String name)voidsetHierarchicalMode(boolean hierarchicalMode)voidsetIncludeContextsInHeader(boolean includeContextsInHeader)
-
-
-
Field Detail
-
address
protected final String address
-
hierarchicalMode
protected boolean hierarchicalMode
-
includeContextsInHeader
protected boolean includeContextsInHeader
-
contextCache
protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache contextCache
-
contextCacheRenewal
protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCacheRenewal contextCacheRenewal
-
-
Method Detail
-
isHierarchicalMode
public boolean isHierarchicalMode()
- Specified by:
isHierarchicalModein interfaceResourceRegistryClient
-
setHierarchicalMode
public void setHierarchicalMode(boolean hierarchicalMode)
- Specified by:
setHierarchicalModein interfaceResourceRegistryClient
-
isIncludeContextsInHeader
public boolean isIncludeContextsInHeader()
- Specified by:
isIncludeContextsInHeaderin interfaceResourceRegistryClient
-
setIncludeContextsInHeader
public void setIncludeContextsInHeader(boolean includeContextsInHeader)
- Specified by:
setIncludeContextsInHeaderin interfaceResourceRegistryClient
-
addHeader
public void addHeader(String name, String value)
- Specified by:
addHeaderin interfaceResourceRegistryClient
-
getGXHTTPStringRequest
protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()
-
getAllContextFromServer
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContextFromServer() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getAllContext
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getAllContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getContextFromServer
protected org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existContext
public boolean existContext(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existContext
public boolean existContext(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getContext
public 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
- Specified by:
getContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getContext
public 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
- Specified by:
getContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getCurrentContext
public org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Specified by:
getCurrentContextin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existType
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean existType(Class<ERElem> clazz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existTypein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existType
public boolean existType(String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existTypein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getType
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<org.gcube.informationsystem.types.reference.Type> getType(Class<ERElem> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getTypein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getType
public String getType(String typeName, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getTypein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstances
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<ERElem> getInstances(Class<ERElem> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstancesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstances
public String getInstances(String type, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstancesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existInstance
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean existInstance(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existInstancein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existInstance
public boolean existInstance(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existInstancein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstance
public <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.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstancein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstance
public String getInstance(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstancein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
rawQuery
public String rawQuery(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
rawQueryin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
rawQuery
public String rawQuery(String query, boolean raw) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
rawQueryin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected String getRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, Boolean polymorphic, Map<String,String> facetConstraints) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getResourcesFromReferenceFacet
public <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
- Specified by:
getResourcesFromReferenceFacetin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getResourcesFromReferenceFacet
public <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
- Specified by:
getResourcesFromReferenceFacetin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getResourcesFromReferenceFacet
public String getResourcesFromReferenceFacet(String resourceType, String consistsOfType, String facetType, UUID facetUUID, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getResourcesFromReferenceFacetin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getFilteredResources
public <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> facetConstraints) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getFilteredResourcesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getFilteredResources
public String getFilteredResources(String resourceType, String consistsOfType, String facetType, boolean polymorphic, Map<String,String> facetConstraints) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getFilteredResourcesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelatedResourcesFromReferenceResource
public <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
- Specified by:
getRelatedResourcesFromReferenceResourcein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelatedResourcesFromReferenceResource
public <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
- Specified by:
getRelatedResourcesFromReferenceResourcein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelatedResourcesFromReferenceResource
public 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
- Specified by:
getRelatedResourcesFromReferenceResourcein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelatedResources
public <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
- Specified by:
getRelatedResourcesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelatedResources
public 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
- Specified by:
getRelatedResourcesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic, Map<String,String> map) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected String getRelated(String entityType, String relationType, String referenceEntityType, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic, Map<String,String> facetConstraints) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, RE referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected <E extends org.gcube.informationsystem.model.reference.entities.Entity,R extends org.gcube.informationsystem.model.reference.relations.Relation<?,?>,RE extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> getRelated(Class<E> entityClass, Class<R> relationClass, Class<RE> referenceEntityClass, UUID referenceEntityUUID, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getRelated
protected String getRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstanceContexts
public <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.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstanceContextsin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getInstanceContexts
public Map<UUID,String> getInstanceContexts(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getInstanceContextsin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getAllQueryTemplates
public List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> getAllQueryTemplates() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
getAllQueryTemplatesin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existQueryTemplate
public boolean existQueryTemplate(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- Specified by:
existQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
existQueryTemplate
public boolean existQueryTemplate(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
readQueryTemplate
public 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- Specified by:
readQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
readQueryTemplate
public 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
- Specified by:
readQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
readQueryTemplateAsString
public String readQueryTemplateAsString(String queryTemplateName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
readQueryTemplateAsStringin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplateGetString
public String runQueryTemplateGetString(String name) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
runQueryTemplateGetStringin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplate
public <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> runQueryTemplate(String name) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
runQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplate
public <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> 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
- Specified by:
runQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplate
public String runQueryTemplate(String name, String params) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
runQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplate
public <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> 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
- Specified by:
runQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
runQueryTemplate
public <E extends org.gcube.informationsystem.model.reference.entities.Entity> List<E> 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
- Specified by:
runQueryTemplatein interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
jsonQuery
public String jsonQuery(String query) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
jsonQueryin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
jsonQuery
public <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
- Specified by:
jsonQueryin interfaceResourceRegistryClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
-