Class QueryTemplateManagement


  • public class QueryTemplateManagement
    extends EntityElementManagement<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate,​org.gcube.informationsystem.types.reference.entities.EntityType>
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Detail

      • params

        protected org.gcube.com.fasterxml.jackson.databind.JsonNode params
    • Constructor Detail

      • QueryTemplateManagement

        public QueryTemplateManagement()
      • QueryTemplateManagement

        public QueryTemplateManagement​(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument)
                                throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
    • Method Detail

      • checkERMatch

        protected void checkERMatch()
                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        checkERMatch in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • checkNameMatch

        protected void checkNameMatch()
                               throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • setName

        public void setName​(String name)
                     throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • checkJsonNode

        protected void checkJsonNode()
                              throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        checkJsonNode in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getName

        public String getName()
      • getWorkingContext

        protected SecurityContext getWorkingContext()
                                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        getWorkingContext in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • createCompleteJsonNode

        protected org.gcube.com.fasterxml.jackson.databind.JsonNode createCompleteJsonNode()
                                                                                    throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        createCompleteJsonNode in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • checkIfNameAlreadyExists

        protected void checkIfNameAlreadyExists()
                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException
      • retrieveElement

        public com.orientechnologies.orient.core.record.OVertex retrieveElement()
                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        retrieveElement in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • reallyCreate

        protected com.orientechnologies.orient.core.record.OVertex reallyCreate()
                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException,
                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException,
                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        reallyCreate in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • reallyUpdate

        protected com.orientechnologies.orient.core.record.OVertex reallyUpdate()
                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        reallyUpdate in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • reallyDelete

        protected void reallyDelete()
                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
                                    org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        reallyDelete in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getSpecificNotFoundException

        protected org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException getSpecificNotFoundException​(org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException e)
        Specified by:
        getSpecificNotFoundException in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
      • getSpecificAlreadyPresentException

        protected org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException getSpecificAlreadyPresentException​(String message)
        Specified by:
        getSpecificAlreadyPresentException in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
      • reallyGetAll

        public String reallyGetAll​(boolean polymorphic)
                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        reallyGetAll in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • setParams

        public void setParams​(String params)
                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • setParams

        public void setParams​(org.gcube.com.fasterxml.jackson.databind.JsonNode params)
                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public String run()
                   throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Run the query after having replaced query parameter with the provided values
        Returns:
        the result as JSON string
        Throws:
        Exception
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • sanityCheck

        public void sanityCheck()
                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException,
                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        sanityCheck in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,​org.gcube.informationsystem.types.reference.entities.EntityType>
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException