@GET
@Path("/patterns/{patternId}")
public Response getPattern (@PathParam("patternId") String patternIdString) {
TripPattern pattern = index.patternForId.get(patternIdString);
if (pattern != null) {
return Response.status(Status.OK).entity(new PatternDetail(pattern)).build();
} else {
return Response.status(Status.NOT_FOUND).entity(MSG_404).build();
}
}