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