Class ResourceRegistrySchemaClientImpl

    • Field Detail

      • address

        protected final String address
      • typesKnowledge

        protected org.gcube.informationsystem.types.knowledge.TypesKnowledge typesKnowledge
      • includeMeta

        protected boolean includeMeta
        Track if the client must request to include Metadata
    • Constructor Detail

      • ResourceRegistrySchemaClientImpl

        public ResourceRegistrySchemaClientImpl​(String address)
      • ResourceRegistrySchemaClientImpl

        public ResourceRegistrySchemaClientImpl​(String address,
                                                boolean sharedModelKnowledge)
    • Method Detail

      • includeMeta

        public boolean includeMeta()
      • setIncludeMeta

        public void setIncludeMeta​(boolean includeMeta)
      • getGXHTTPStringRequest

        protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()
      • getModelKnowledge

        public org.gcube.informationsystem.model.knowledge.ModelKnowledge<org.gcube.informationsystem.types.reference.Type,​org.gcube.informationsystem.types.knowledge.TypeInformation> getModelKnowledge()
        Specified by:
        getModelKnowledge in interface ResourceRegistrySchemaClient
      • create

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> org.gcube.informationsystem.types.reference.Type create​(Class<ME> clz)
                                                                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException,
                                                                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        create in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • create

        public String create​(String typeDefinitition)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException,
                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        create in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • exist

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> boolean exist​(Class<ME> clazz)
                                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        exist in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • exist

        public boolean exist​(String typeName)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        exist in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeFromTypesKnowledge

        public List<org.gcube.informationsystem.types.reference.Type> getTypeFromTypesKnowledge​(String typeName,
                                                                                                Boolean polymorphic)
                                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeFromTypesKnowledge

        public List<org.gcube.informationsystem.types.reference.Type> getTypeFromTypesKnowledge​(String typeName,
                                                                                                int level)
                                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • addChildren

        protected List<org.gcube.informationsystem.types.reference.Type> addChildren​(org.gcube.informationsystem.tree.Node<org.gcube.informationsystem.types.reference.Type> node,
                                                                                     List<org.gcube.informationsystem.types.reference.Type> types,
                                                                                     int currentLevel,
                                                                                     int maxLevel)
      • getTypeFromTypesKnowledge

        public List<org.gcube.informationsystem.types.reference.Type> getTypeFromTypesKnowledge​(String typeName,
                                                                                                Boolean polymorphic,
                                                                                                int level)
                                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public String read​(String typeName,
                           Boolean polymorphic)
                    throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                           org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> List<org.gcube.informationsystem.types.reference.Type> read​(Class<ME> clazz,
                                                                                                                                                 Boolean polymorphic)
                                                                                                                                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                                                                 org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public String read​(String typeName,
                           int level)
                    throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                           org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> List<org.gcube.informationsystem.types.reference.Type> read​(Class<ME> clazz,
                                                                                                                                                 int level)
                                                                                                                                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                                                                 org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeTreeNode

        public org.gcube.informationsystem.tree.Node<org.gcube.informationsystem.types.reference.Type> getTypeTreeNode​(String typeName)
                                                                                                                throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                                       org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        getTypeTreeNode in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeTreeNode

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> org.gcube.informationsystem.tree.Node<org.gcube.informationsystem.types.reference.Type> getTypeTreeNode​(Class<ME> clazz)
                                                                                                                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        getTypeTreeNode in interface ResourceRegistrySchemaClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • existTypeFromServer

        public boolean existTypeFromServer​(String typeName)
                                    throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeFromServer

        public <ME extends org.gcube.informationsystem.model.reference.ModelElement> List<org.gcube.informationsystem.types.reference.Type> getTypeFromServer​(Class<ME> clz,
                                                                                                                                                              Boolean polymorphic)
                                                                                                                                                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
                                                                                                                                                              org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getTypeFromServer

        public String getTypeFromServer​(String typeName,
                                        Boolean polymorphic)
                                 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