Class ResourceRegistryClientImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeader​(String name, String value)  
      boolean existContext​(String uuid)  
      boolean existContext​(UUID uuid)  
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      boolean
      existInstance​(Class<ERElem> clazz, UUID uuid)  
      boolean existInstance​(String type, UUID uuid)  
      boolean existQueryTemplate​(String queryTemplateName)  
      boolean existQueryTemplate​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      boolean
      existType​(Class<ERElem> clazz)  
      boolean existType​(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.Context getContext​(String uuid)  
      org.gcube.informationsystem.contexts.reference.entities.Context getContext​(UUID uuid)  
      protected org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer​(String uuid)  
      org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext()  
      <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)  
      String getFilteredResources​(String resourceType, String consistsOfType, String facetType, boolean polymorphic, Map<String,​String> facetConstraints)  
      protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()  
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      ERElem
      getInstance​(Class<ERElem> clazz, UUID uuid)  
      String getInstance​(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)  
      String getInstances​(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 String getRelated​(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, boolean polymorphic)  
      protected String getRelated​(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, org.gcube.informationsystem.base.reference.Direction direction, Boolean polymorphic, Map<String,​String> facetConstraints)  
      protected String getRelated​(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)  
      String getRelatedResources​(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)  
      String getRelatedResourcesFromReferenceResource​(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)  
      String getResourcesFromReferenceFacet​(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)  
      String getType​(String typeName, Boolean polymorphic)  
      boolean isHierarchicalMode()  
      boolean isIncludeContextsInHeader()  
      String jsonQuery​(String query)  
      <E extends org.gcube.informationsystem.model.reference.entities.Entity>
      List<E>
      jsonQuery​(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)  
      String rawQuery​(String query)  
      String rawQuery​(String query, boolean raw)  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate readQueryTemplate​(String queryTemplateName)  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate readQueryTemplate​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      String readQueryTemplateAsString​(String queryTemplateName)  
      <E extends org.gcube.informationsystem.model.reference.entities.Entity>
      List<E>
      runQueryTemplate​(String name)  
      String runQueryTemplate​(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)  
      String runQueryTemplateGetString​(String name)  
      void setHierarchicalMode​(boolean hierarchicalMode)  
      void setIncludeContextsInHeader​(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
    • Constructor Detail

      • ResourceRegistryClientImpl

        public ResourceRegistryClientImpl​(String address)
      • ResourceRegistryClientImpl

        public ResourceRegistryClientImpl​(String address,
                                          boolean sharedContextCache)
    • Method Detail

      • 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:
        getAllContext in interface ResourceRegistryClient
        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.ContextNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • existContext

        public boolean existContext​(String uuid)
                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        existContext in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • existContext

        public boolean existContext​(UUID uuid)
                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        existContext in interface ResourceRegistryClient
        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:
        getContext in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException
        org.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:
        getContext in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException
        org.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:
        getCurrentContext in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException
        org.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:
        existType in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • existType

        public boolean existType​(String typeName)
                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        existType in interface ResourceRegistryClient
        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:
        getType in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.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:
        getType in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.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:
        getInstances in interface ResourceRegistryClient
        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:
        getInstances in interface ResourceRegistryClient
        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:
        existInstance in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        existInstance in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        getInstance in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        getInstance in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        rawQuery in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
        org.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:
        rawQuery in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
        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,
                                    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:
        getResourcesFromReferenceFacet in interface ResourceRegistryClient
        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:
        getResourcesFromReferenceFacet in interface ResourceRegistryClient
        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:
        getResourcesFromReferenceFacet in interface ResourceRegistryClient
        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:
        getFilteredResources in interface ResourceRegistryClient
        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:
        getFilteredResources in interface ResourceRegistryClient
        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:
        getRelatedResourcesFromReferenceResource in interface ResourceRegistryClient
        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:
        getRelatedResourcesFromReferenceResource in interface ResourceRegistryClient
        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:
        getRelatedResourcesFromReferenceResource in interface ResourceRegistryClient
        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:
        getRelatedResources in interface ResourceRegistryClient
        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:
        getRelatedResources in interface ResourceRegistryClient
        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:
        getInstanceContexts in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        getInstanceContexts in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.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:
        getAllQueryTemplates in interface ResourceRegistryClient
        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:
        existQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        existQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        readQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        readQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        readQueryTemplateAsString in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplateGetString in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        runQueryTemplate in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.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:
        jsonQuery in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
        org.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:
        jsonQuery in interface ResourceRegistryClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException