Logger logger = Logger.getLogger(CreateWFSRecordingResource.class.getName());
WFSManager manager = WFSManager.getWFSManager();
// Create the WFS check return value is not null (error if so)
WFSRecording recording = manager.createWFSRecording(name);
if (recording == null) {
logger.warning("[WFS] Unable to create recording " + name);
ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
return rb.build();
}
// Form the root path of the wfs: "recordings/<name>/world-wfs"
WorldRoot worldRoot = new WorldRoot(recording.getRootPath());
// Formulate the response and return the world root object
ResponseBuilder rb = Response.ok(worldRoot);
return rb.build();
}