class RestController {

	@RequestMapping(value = "/rest/{layerId}/{featureId}.{format}", method = RequestMethod.GET)
	public String readOneFeature(@PathVariable String layerId, @PathVariable String featureId,
			@PathVariable String format,
			@RequestParam(value = "no_geom", required = false) boolean noGeom,
			@RequestParam(value = "attrs", required = false) String attrs, Model model) throws RestException {
		List<InternalFeature> features;
		try {
			features = vectorLayerService.getFeatures(layerId, null, filterService
					.createFidFilter(new String[] { featureId }), null, getIncludes(noGeom));
		} catch (GeomajasException e) {
			throw new RestException(e, RestException.PROBLEM_READING_LAYERSERVICE, layerId);
		}
		if (features.size() != 1) {
			throw new RestException(RestException.FEATURE_NOT_FOUND, featureId, layerId);
		}
		List<String> attributes = null;
		if (attrs != null) {
			attributes = Arrays.asList(attrs.split(","));
		}

		model.addAttribute(FEATURE_COLLECTION, features.get(0));
		model.addAttribute(VECTOR_LAYER_INFO, features.get(0).getLayer().getLayerInfo());
		model.addAttribute(ATTRIBUTES, attributes);
		model.addAttribute(VECTOR_LAYER_ID, layerId);
		return getView(format);
	}

}