Class GeonetworkResolver


  • @Path("geonetwork")
    public class GeonetworkResolver
    extends Object
    The GeonetworkResolver is a "middle tier" to perform queries to D4Science's Geonetwork services. See more at https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Geonetwork_Resolver
    Author:
    Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) Oct 23, 2018
    • Constructor Detail

      • GeonetworkResolver

        public GeonetworkResolver()
    • Method Detail

      • submitGet

        @GET
        @Path("/{scope}/{mode}/{visibility}/{filterKey}/{filterValue}/$${remainPath:(/[^?$]+)?}")
        public javax.ws.rs.core.Response submitGet​(@Context
                                                   javax.servlet.http.HttpServletRequest req,
                                                   @PathParam("scope") @Nullable
                                                   String scope,
                                                   @PathParam("mode") @Nullable
                                                   String mode,
                                                   @PathParam("visibility") @Nullable
                                                   String visibility,
                                                   @PathParam("filterKey") @Nullable
                                                   String filterKey,
                                                   @PathParam("filterValue") @Nullable
                                                   String filterValue,
                                                   @PathParam("remainPath") @Nullable
                                                   String remainPath,
                                                   @QueryParam("resetcache") @Nullable
                                                   String resetCache,
                                                   @QueryParam("resetcachedscope") @Nullable
                                                   String resetScope)
                                            throws javax.ws.rs.WebApplicationException
        Gets the geonetwork request criteria. Creates a request criteria from input parameter pathWithoutGN. The parameter pathWithoutGN should be an ordered string (like REST request): SCOPE/MODE/VISIBILITY/OWNER/$$ SCOPE must be: ROOT|VO|VRE MODE must be: GeonetworkRequestFilterParameters.MODE VISIBILITY must be: GeonetworkRequestFilterParameters.VISIBILITY OWNER (is optional): filter by owner
        Parameters:
        req - the req
        scope - the scope
        mode - the mode
        visibility - the visibility
        filterKey - the filter key
        filterValue - the filter value
        remainPath - the remain path
        resetCache - the reset cache
        resetScope - the reset scope
        Returns:
        the geonetwork request criteria
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • submitPost

        @POST
        @Path("/{scope}/{mode}/{visibility}/{filterKey}/{filterValue}/$${remainPath:(/[^?$]+)?}")
        public javax.ws.rs.core.Response submitPost​(@Context
                                                    javax.servlet.http.HttpServletRequest req,
                                                    @PathParam("scope") @Nullable
                                                    String scope,
                                                    @PathParam("mode") @Nullable
                                                    String mode,
                                                    @PathParam("visibility") @Nullable
                                                    String visibility,
                                                    @PathParam("filterKey") @Nullable
                                                    String filterKey,
                                                    @PathParam("filterValue") @Nullable
                                                    String filterValue,
                                                    @PathParam("remainPath") @Nullable
                                                    String remainPath,
                                                    @QueryParam("resetcache") @Nullable
                                                    String resetCache,
                                                    @QueryParam("resetcachedscope") @Nullable
                                                    String resetScope)
                                             throws javax.ws.rs.WebApplicationException
        The post request
        Parameters:
        req - the req
        scope - the scope
        mode - the mode
        visibility - the visibility
        filterKey - the filter key
        filterValue - the filter value
        remainPath - the remain path
        resetCache - the reset cache
        resetScope - the reset scope
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • getGeonetworkInstanceForScope

        protected GeonetworkInstance getGeonetworkInstanceForScope​(String scope)
                                                            throws Exception
        Gets the geonetwork instance for scope.
        Parameters:
        scope - the scope
        Returns:
        the geonetwork instance for scope
        Throws:
        Exception - the exception