\r
import org.springframework.beans.factory.annotation.Autowired;\r
import org.springframework.stereotype.Controller;\r
-import org.springframework.web.bind.WebDataBinder;\r
-import org.springframework.web.bind.annotation.InitBinder;\r
import org.springframework.web.bind.annotation.PathVariable;\r
import org.springframework.web.bind.annotation.RequestMapping;\r
import org.springframework.web.bind.annotation.RequestMethod;\r
import eu.etaxonomy.cdm.api.service.IReferenceService;\r
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;\r
import eu.etaxonomy.cdm.model.reference.Reference;\r
-import eu.etaxonomy.cdm.remote.editor.UUIDPropertyEditor;\r
+import io.swagger.annotations.Api;\r
\r
/**\r
* TODO write controller documentation\r
*/\r
\r
@Controller\r
+@Api("reference")\r
@RequestMapping(value = {"/reference/{uuid}"})\r
-public class ReferenceController extends BaseController<Reference, IReferenceService>\r
+public class ReferenceController extends AbstractIdentifiableController<Reference, IReferenceService>\r
{\r
\r
private static final List<String> NOMENCLATURAL_CITATION_INIT_STRATEGY = Arrays.asList(new String []{\r
"$",\r
- "authorTeam",\r
+ "authorship",\r
"inReference.inReference",\r
- "inReference.authorTeam"\r
+ "inReference.authorship"\r
});\r
\r
- private static final List<String> CITATION_WITH_AUTHORTEAM_INIT_STRATEGY = Arrays.asList(new String []{\r
- "authorTeam.$"\r
+ private static final List<String> CITATION_WITH_AUTHORSHIP_INIT_STRATEGY = Arrays.asList(new String []{\r
+ "authorship.$"\r
});\r
\r
public ReferenceController(){\r
setInitializationStrategy(Arrays.asList(new String[]{\r
"$",\r
- "authorTeam.$"\r
+ "authorship.$"\r
}));\r
}\r
\r
}\r
\r
@RequestMapping(\r
- value = {"authorTeam"},\r
+ value = {"authorship"},\r
method = RequestMethod.GET)\r
- public ModelAndView doGetAuthorTeam(\r
+ public ModelAndView doGetAuthorship(\r
@PathVariable("uuid") UUID uuid,\r
HttpServletRequest request,\r
HttpServletResponse response) {\r
ModelAndView mv = new ModelAndView();\r
- Reference rb = service.load(uuid, CITATION_WITH_AUTHORTEAM_INIT_STRATEGY);\r
+ Reference rb = service.load(uuid, CITATION_WITH_AUTHORSHIP_INIT_STRATEGY);\r
if(rb.getAuthorship() != null){\r
mv.addObject(rb.getAuthorship());\r
}\r