2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.remote
.controller
.oaipmh
;
11 import java
.util
.ArrayList
;
12 import java
.util
.HashSet
;
13 import java
.util
.List
;
16 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
17 import org
.springframework
.stereotype
.Controller
;
18 import org
.springframework
.web
.bind
.annotation
.RequestMapping
;
19 import org
.springframework
.web
.servlet
.ModelAndView
;
21 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
22 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
23 import eu
.etaxonomy
.cdm
.remote
.dto
.oaipmh
.SetSpec
;
24 import io
.swagger
.annotations
.Api
;
28 @RequestMapping(value
= "/taxon/oai", params
= "verb")
29 public class TaxonOaiPmhController
extends AbstractOaiPmhController
<TaxonBase
, ITaxonService
> {
32 protected List
<String
> getPropertyPaths() {
33 List
<String
> propertyPaths
= new ArrayList
<String
>();
34 propertyPaths
.add("createdBy");
35 propertyPaths
.add("updatedBy");
36 propertyPaths
.add("name.titleCache");
37 propertyPaths
.add("secSource.citation");
38 propertyPaths
.add("relationsToThisTaxon");
39 propertyPaths
.add("relationsToThisTaxon.fromTaxon");
40 propertyPaths
.add("relationsToThisTaxon.toTaxon");
41 propertyPaths
.add("relationsToThisTaxon.type");
42 propertyPaths
.add("synonyms");
43 propertyPaths
.add("descriptions");
48 protected void addSets(ModelAndView modelAndView
) {
49 Set
<SetSpec
> sets
= new HashSet
<SetSpec
>();
50 sets
.add(SetSpec
.TAXON
);
51 sets
.add(SetSpec
.SYNONYM
);
52 modelAndView
.addObject("sets",sets
);
57 public void setService(ITaxonService service
) {
58 this.service
= service
;