dbpedia-spotlight/dbpedia-spotlight — pull request #312 by dav009 (2014-08-27 00:00:06+00:00)
Title: Cleaning the rest endpoint

This is an attempt on cleaning the rest module:

- Tried to get rid of repeated code/methods follwing DRY as much as I could
- Got rid of `spotlightInterface`
- Server has a `SpotlightModel`
- Endpoints call methods of `spotlight model`
- `spot` calls `spot`
- `annotate` calls `firstBest`
- `candidates` calls `nBest`
- I couldnt see any difference between `disambiguate` and `annotate` so I merged both endpoints in the same jersey resource
- Resources only gather parameters and send them to spotlightModel and then to the output manager to get the correct output, this resulted in lots of logic being removed from server.java and the resources themselves.

ToDo:
- [ ] Properly test this branch.

Other nice things to do ( probably in another PR):
- [ ] bump to jersey 2.x
- [ ] replace @queryparams for @beanparam
- [ ] add swagger

- It would be nice to update to jersey 2.x in such way we could create a bean with all the params fields and avoid naming them over and over in every endpoint. The problem is when I tried to bump jersey version I found errors in other modules (uima) and this was already a big PR.