kproj6/featureserver — pull request #5 by hujon (2014-10-18 21:01:54+00:00)
Title: Temperature resource added

I added temperature resource, which now handles user requests, validates it and returns either PNG or JSON (or internal error if JSON generation fails, which should never occure).

Main things to discuss:
* URI - I changed the pattern from /feature/${feature_name}?${parameters} to /${feature_name}/${output_type}?${parameters}
* User input validation - I googled for quite a while, @NotNull annotations are useless - 1. float is never null, 2. it is used by object validators. After a little bit looking around I created package com.sintef.featureserver.datatype with wrapper classes validating user input, but still presence of the parameters have to be checked in every resource
* JSON message flow - in com.sintef.featureserver.util I have created JSONMsg object that can be easily used for JSON communication. I was not able to use package com.sintef.featureserver.providers.ObjectMapperProvider, so I use com.fasterxml.jackson.databind.ObjectMapper instead.