DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
name = df.format(new Date());
}
// Create the WFS check return value is not null (error if so)
WFSSnapshot snapshot = manager.createWFSSnapshot(name);
if (snapshot == null) {
logger.warning("[WFS] Unable to create snapshot " + name);
ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
return rb.build();
}
// Form the root path of the wfs: "snapshots/<date>/world-wfs"
WorldRoot worldRoot = new WorldRoot(snapshot.getRootPath());
// Formulate the response and return the world root object
ResponseBuilder rb = Response.ok(worldRoot);
return rb.build();
}