/** * Returns a model for the given {@code descriptor}. * @param descriptor the descriptor * @return the model */ protected Map<String, Object> createModelForDescriptor(LinkDescriptor descriptor) { Map<String, Object> model = new HashMap<>(); model.put("rel", descriptor.getRel()); model.put("description", descriptor.getDescription()); model.put("optional", descriptor.isOptional()); model.putAll(descriptor.getAttributes()); return model; }