Class GeoportalResolver


  • @Path("/geo")
    public class GeoportalResolver
    extends Object
    The GeoportalResolver is able to get/resolve a link to "Geoportal Viewer" or "Geoportal Entry" Application. See more at https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Geoportal_Resolver
    Author:
    Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Mar 23, 2023
    • Constructor Detail

      • GeoportalResolver

        public GeoportalResolver()
    • Method Detail

      • resolveGeoportalNoAppDef

        @GET
        @Path("/{vre_name}/{usecase_id}/{project_id}")
        public javax.ws.rs.core.Response resolveGeoportalNoAppDef​(@Context
                                                                  javax.servlet.http.HttpServletRequest req,
                                                                  @PathParam("vre_name")
                                                                  String vreName,
                                                                  @PathParam("usecase_id")
                                                                  String ucdID,
                                                                  @PathParam("project_id")
                                                                  String projectID,
                                                                  @QueryParam("res")
                                                                  String resolveAs)
                                                           throws javax.ws.rs.WebApplicationException
        Resolve geoportal. Resolve a Geoportal Link to "Data-Viewer" App
        Parameters:
        req - the req
        vreName - the vre name
        ucdID - the ucd ID
        projectID - the project ID
        resolveAs - the resolve as
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • resolveGeoportal

        @GET
        @Path("/{targetAppId}/{vre_name}/{usecase_id}/{project_id}")
        public javax.ws.rs.core.Response resolveGeoportal​(@Context
                                                          javax.servlet.http.HttpServletRequest req,
                                                          @PathParam("targetAppId")
                                                          String targetAppId,
                                                          @PathParam("vre_name")
                                                          String vreName,
                                                          @PathParam("usecase_id")
                                                          String ucdID,
                                                          @PathParam("project_id")
                                                          String projectID,
                                                          @QueryParam("res")
                                                          String resolveAs)
                                                   throws javax.ws.rs.WebApplicationException
        Resolve geoportal. Resolve a Geoportal Link to "Data-Viewer" or "Data-Entry" App
        Parameters:
        req - the req
        targetAppId - the target app id
        vreName - the vre name
        ucdID - the ucd ID
        projectID - the project ID
        resolveAs - the resolve as
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • resolveDataViewerLink

        @GET
        @Path("/")
        public javax.ws.rs.core.Response resolveDataViewerLink​(@Context
                                                               javax.servlet.http.HttpServletRequest req,
                                                               @QueryParam("gcube_scope")
                                                               String gcubeScope,
                                                               @QueryParam("item_id")
                                                               String itemId,
                                                               @QueryParam("item_type")
                                                               String itemType,
                                                               @QueryParam("res")
                                                               String resolveAs)
                                                        throws javax.ws.rs.WebApplicationException
        Resolve data viewer link.
        Parameters:
        req - the req
        gcubeScope - the gcube scope
        itemId - the item id
        itemType - the item type
        resolveAs - the resolve as
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • postGeoportalNoAppDef

        @POST
        @Path("")
        @Consumes("application/json")
        @Produces("text/plain")
        public javax.ws.rs.core.Response postGeoportalNoAppDef​(@Context
                                                               javax.servlet.http.HttpServletRequest req,
                                                               GeoportalRequest jsonRequest)
                                                        throws javax.ws.rs.WebApplicationException
        Post geoportal. Create a Geoportal Link to "Data-Viewer" App
        Parameters:
        req - the req
        jsonRequest - the json request
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • postGeoportal

        @POST
        @Path("/{targetAppId}")
        @Consumes("application/json")
        @Produces("text/plain")
        public javax.ws.rs.core.Response postGeoportal​(@Context
                                                       javax.servlet.http.HttpServletRequest req,
                                                       @PathParam("targetAppId")
                                                       String targetAppId,
                                                       GeoportalRequest jsonRequest)
                                                throws javax.ws.rs.WebApplicationException
        Post geoportal. Create a Geoportal Link to "Data-Viewer" or "Data-Entry" App
        Parameters:
        req - the req
        targetAppId - the target app id
        jsonRequest - the json request
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • genericResolveLink

        public javax.ws.rs.core.Response genericResolveLink​(@Context
                                                            javax.servlet.http.HttpServletRequest req,
                                                            TargetAppGeoportalCodes resoruceGeoportalCodes,
                                                            @PathParam("vre_name")
                                                            String vreName,
                                                            @PathParam("usecase_id")
                                                            String ucdID,
                                                            @PathParam("project_id")
                                                            String projectID,
                                                            @QueryParam("res")
                                                            String resolveAs)
                                                     throws javax.ws.rs.WebApplicationException
        Generic resolve link.
        Parameters:
        req - the req
        resoruceGeoportalCodes - the resoruce geoportal codes
        vreName - the vre name
        ucdID - the ucd ID
        projectID - the project ID
        resolveAs - the resolve as
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • genericCreateLink

        protected String genericCreateLink​(@Context
                                           javax.servlet.http.HttpServletRequest req,
                                           GeoportalRequest jsonRequest,
                                           TargetAppGeoportalCodes targetAppGeoportalCodes)
        Generic create link.
        Parameters:
        req - the req
        jsonRequest - the json request
        targetAppGeoportalCodes - the target app geoportal codes
        Returns:
        the URL