Class CatalogueResolver


  • @Path("{entityContext:ctlg(-(o|g|p|d))?}")
    public class CatalogueResolver
    extends Object
    The CatalogueResolver is able to get/resolve a link to a "Catalogue Entity" stored in one of the D4Science Catalogue's instances. A Catalogue Entity is either a "group" or an "organization" or a "product" of D4Science Data Catalogue. See more at https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#CATALOGUE_Resolver
    Author:
    Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) Nov 16, 2018
    • Constructor Detail

      • CatalogueResolver

        public CatalogueResolver()
    • Method Detail

      • resolveCatalogue

        @GET
        @Path("/{vreName}/{entityName}")
        public javax.ws.rs.core.Response resolveCatalogue​(@Context
                                                          javax.servlet.http.HttpServletRequest req,
                                                          @PathParam("entityName")
                                                          String entityName,
                                                          @PathParam("vreName")
                                                          String vreName,
                                                          @PathParam("entityContext")
                                                          String entityContext)
                                                   throws javax.ws.rs.WebApplicationException
        Resolve an entity of the Catalogue
        Parameters:
        req - the req
        entityName - the entity name
        vreName - the vre name
        entityContext - the entity context
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • postCatalogue

        @POST
        @Path("")
        @Consumes("application/json")
        @Produces("text/plain")
        public javax.ws.rs.core.Response postCatalogue​(@Context
                                                       javax.servlet.http.HttpServletRequest req,
                                                       CatalogueRequest jsonRequest)
                                                throws javax.ws.rs.WebApplicationException
        Create a Catalogue Link
        Parameters:
        req - the req
        jsonRequest - the json request
        Returns:
        the response
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • getItemCatalogueURLs

        protected static ItemCatalogueURLs getItemCatalogueURLs​(javax.servlet.http.HttpServletRequest req,
                                                                String scopeName,
                                                                String entityContext,
                                                                String entityName)
                                                         throws Exception
        Gets the item catalogue UR ls.
        Parameters:
        req - the req
        scopeName - the scope name
        entityContext - the entity context
        entityName - the entity name
        Returns:
        the item catalogue UR ls
        Throws:
        Exception - the exception