code: public static Query getQuery(InputStream queryInputStream) throws JsonParseException,
              JsonMappingException, IOException {
          return JSON_MAPPER.readValue(queryInputStream, Query.class);
      }
docs: Converts the given query JSON into a Query object
  
  @param queryInputStream query JSON stream
  @return Query object containing the query
  @throws JsonParseException   Thrown if JSON parsing failed
  @throws JsonMappingException Thrown if there was a problem mapping the JSON
  @throws IOException          Thrown by the readValue method