class DataPositionSourceResource extends AbstractDataResource {

  @GET
  @Path("positions/{positionId}")
  public Response getPosition(
      @PathParam("positionId") String idStr,
      @QueryParam("version") String version,
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo) {
    final ObjectId objectId = ObjectId.parse(idStr);
    final Position result;
    if (version != null) {
      result = getPositionSource().getPosition(objectId.atVersion(version));
    } else {
      result = getPositionSource().getPosition(objectId, VersionCorrection.parse(versionAsOf, correctedTo));
    }
    return responseOkObject(result);
  }

  public  DataPositionSourceResource(final PositionSource positionSource);

}