|
|
|
@ -49,9 +49,9 @@ import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
|
|
|
|
@Path("/geo")
|
|
|
|
|
public class GeoportalResolver {
|
|
|
|
|
|
|
|
|
|
public static final String GEO_DE = "de";
|
|
|
|
|
public static final String GEO = "geo";
|
|
|
|
|
public static final String GEO_DV = "dv";
|
|
|
|
|
public static final String GEO_DE = "de"; //data-entry
|
|
|
|
|
public static final String GEO = "geo"; //geoportal
|
|
|
|
|
public static final String GEO_DV = "dv"; //data-viewer
|
|
|
|
|
|
|
|
|
|
private static final String QP_RESOLVE_AS = "res";
|
|
|
|
|
private static final String PATH_PROJECT_ID = "project_id";
|
|
|
|
@ -73,21 +73,6 @@ public class GeoportalResolver {
|
|
|
|
|
PUBLIC, PRIVATE
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Resolve geoportal.
|
|
|
|
|
*
|
|
|
|
|
* @param req the req
|
|
|
|
|
* @param targetAppId the target app id
|
|
|
|
|
* @param vreName the vre name
|
|
|
|
|
* @param ucdID the ucd ID
|
|
|
|
|
* @param projectID the project ID
|
|
|
|
|
* @param resolveAs the resolve as
|
|
|
|
|
* @return the response
|
|
|
|
|
* @throws WebApplicationException the web application
|
|
|
|
|
* exception @Path("/{targetAppId:" + GEO + "|"
|
|
|
|
|
* + GEO_DV + "|" + GEO_DE + "}" +
|
|
|
|
|
* "/{vre_name}/{usecase_id}/{project_id}")
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/{targetAppId}/{vre_name}/{usecase_id}/{project_id}")
|
|
|
|
|
public Response resolveGeoportal(@Context HttpServletRequest req, @PathParam(PATH_TARGET_APP) String targetAppId,
|
|
|
|
@ -102,24 +87,25 @@ public class GeoportalResolver {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Resolve geoportal DV.
|
|
|
|
|
* Create a Catalogue Link.
|
|
|
|
|
*
|
|
|
|
|
* @param req the req
|
|
|
|
|
* @param vreName the vre name
|
|
|
|
|
* @param ucdID the ucd ID
|
|
|
|
|
* @param projectID the project ID
|
|
|
|
|
* @param resolveAs the resolve as
|
|
|
|
|
* @param req the req
|
|
|
|
|
* @param targetAppId the target app id
|
|
|
|
|
* @param jsonRequest the json request
|
|
|
|
|
* @return the response
|
|
|
|
|
* @throws WebApplicationException the web application exception
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/" + GEO_DV + "/{vre_name}/{usecase_id}/{project_id}")
|
|
|
|
|
public Response resolveGeoportalDV(@Context HttpServletRequest req, @PathParam(PATH_VRE_NAME) String vreName,
|
|
|
|
|
@PathParam(PATH_USECASE_ID) String ucdID, @PathParam(PATH_PROJECT_ID) String projectID,
|
|
|
|
|
@QueryParam(QP_RESOLVE_AS) String resolveAs) throws WebApplicationException {
|
|
|
|
|
TargetAppGeoportalCodes targetAppGeoportalCodes = TargetAppGeoportalCodes.GEO_DV;
|
|
|
|
|
return genericGet(req, targetAppGeoportalCodes, vreName, ucdID, projectID, resolveAs);
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
@Path("")
|
|
|
|
|
@Consumes(MediaType.APPLICATION_JSON)
|
|
|
|
|
@Produces(MediaType.TEXT_PLAIN)
|
|
|
|
|
public Response postGeoportalNoAppDef(@Context HttpServletRequest req, GeoportalRequest jsonRequest)
|
|
|
|
|
throws WebApplicationException {
|
|
|
|
|
LOG.info(this.getClass().getSimpleName() + " POST starts...");
|
|
|
|
|
// String targetAppId = GEO;
|
|
|
|
|
TargetAppGeoportalCodes targetAppGeoportalCodes = checkTargetApplictionID(req, null);
|
|
|
|
|
LOG.info("The target app is: " + targetAppGeoportalCodes);
|
|
|
|
|
return genericPost(req, jsonRequest, targetAppGeoportalCodes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|