class DataRegionSourceResource extends AbstractDataResource {

  @GET
  @Path("regions/{regionId}")
  public Response get(
      @PathParam("regionId") String idStr,
      @QueryParam("version") String version,
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo) {
    final ObjectId objectId = ObjectId.parse(idStr);
    if (version != null) {
      final Region result = getRegionSource().get(objectId.atVersion(version));
      return responseOkObject(result);
    } else {
      final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
      Region result = getRegionSource().get(objectId, vc);
      return responseOkObject(result);
    }
  }

  public  DataRegionSourceResource(final RegionSource regionSource);

}