Class GeonetworkResolver
- java.lang.Object
-
- org.gcube.datatransfer.resolver.services.GeonetworkResolver
-
@Path("geonetwork") public class GeonetworkResolver extends ObjectThe 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
-
-
Field Summary
Fields Modifier and Type Field Description static StringCSW_SERVERstatic StringPATH_PARAM_MODEstatic StringPATH_PARAM_REMAINPATHstatic StringPATH_PARAM_REQUEST_DELIMITERstatic StringQUERY_PARAM_RESET_CACHE_PARAMstatic StringQUERY_PARAM_RESET_CACHED_SCOPE_PARAMstatic StringREPLACED_A_PUBLIC_UUID_PLEASE_IGNOREstatic StringREPLACED_UUID_BY_FILTER_PLEASE_IGNOREstatic StringSCOPE_SEPARATORstatic StringSRV_EN_MEF_EXPORTstatic StringUUIDstatic StringVALUE_OF_REQUEST_DELIMITIER
-
Constructor Summary
Constructors Constructor Description GeonetworkResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GeonetworkInstancegetGeonetworkInstanceForScope(String scope)Gets the geonetwork instance for scope.javax.ws.rs.core.ResponsesubmitGet(javax.servlet.http.HttpServletRequest req, String scope, String mode, String visibility, String filterKey, String filterValue, String remainPath, String resetCache, String resetScope)Gets the geonetwork request criteria.javax.ws.rs.core.ResponsesubmitPost(javax.servlet.http.HttpServletRequest req, String scope, String mode, String visibility, String filterKey, String filterValue, String remainPath, String resetCache, String resetScope)The post request
-
-
-
Field Detail
-
REPLACED_A_PUBLIC_UUID_PLEASE_IGNORE
public static final String REPLACED_A_PUBLIC_UUID_PLEASE_IGNORE
- See Also:
- Constant Field Values
-
REPLACED_UUID_BY_FILTER_PLEASE_IGNORE
public static final String REPLACED_UUID_BY_FILTER_PLEASE_IGNORE
-
PATH_PARAM_MODE
public static final String PATH_PARAM_MODE
- See Also:
- Constant Field Values
-
PATH_PARAM_REQUEST_DELIMITER
public static final String PATH_PARAM_REQUEST_DELIMITER
- See Also:
- Constant Field Values
-
CSW_SERVER
public static final String CSW_SERVER
- See Also:
- Constant Field Values
-
VALUE_OF_REQUEST_DELIMITIER
public static final String VALUE_OF_REQUEST_DELIMITIER
- See Also:
- Constant Field Values
-
PATH_PARAM_REMAINPATH
public static final String PATH_PARAM_REMAINPATH
- See Also:
- Constant Field Values
-
QUERY_PARAM_RESET_CACHE_PARAM
public static final String QUERY_PARAM_RESET_CACHE_PARAM
- See Also:
- Constant Field Values
-
QUERY_PARAM_RESET_CACHED_SCOPE_PARAM
public static final String QUERY_PARAM_RESET_CACHED_SCOPE_PARAM
- See Also:
- Constant Field Values
-
SRV_EN_MEF_EXPORT
public static final String SRV_EN_MEF_EXPORT
- See Also:
- Constant Field Values
-
UUID
public static final String UUID
- See Also:
- Constant Field Values
-
SCOPE_SEPARATOR
public static final String SCOPE_SEPARATOR
- See Also:
- Constant Field Values
-
-
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.WebApplicationExceptionGets 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.MODEVISIBILITY must be:GeonetworkRequestFilterParameters.VISIBILITYOWNER (is optional): filter by owner- Parameters:
req- the reqscope- the scopemode- the modevisibility- the visibilityfilterKey- the filter keyfilterValue- the filter valueremainPath- the remain pathresetCache- the reset cacheresetScope- 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.WebApplicationExceptionThe post request- Parameters:
req- the reqscope- the scopemode- the modevisibility- the visibilityfilterKey- the filter keyfilterValue- the filter valueremainPath- the remain pathresetCache- the reset cacheresetScope- 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
-
-