Project

General

Profile

Download (1.54 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2009 EDIT European Distributed Institute of Taxonomy
3
 * http://www.e-taxonomy.eu
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 See LICENSE.TXT at the top of this package for the full license terms.
7
 */
8
package eu.etaxonomy.cdm.remote.controller;
9

    
10
import java.util.Arrays;
11
import java.util.List;
12

    
13
import org.springframework.stereotype.Controller;
14
import org.springframework.web.bind.annotation.RequestMapping;
15

    
16
import eu.etaxonomy.cdm.persistence.dao.initializer.EntityInitStrategy;
17
import io.swagger.annotations.Api;
18

    
19
/**
20
 *
21
 * @author a.kohlbecker
22
 * @since 26.08.2014
23
 */
24
@Controller
25
@Api("portal_taxon")
26
@RequestMapping(value = {"/portal/taxon"})
27
public class TaxonPortalListController extends TaxonListController {
28

    
29
    private static final EntityInitStrategy SIMPLE_TAXON_INIT_STRATEGY = TaxonPortalController.SIMPLE_TAXON_INIT_STRATEGY.clone().extend(
30
            null,
31
            Arrays.asList(
32
            "synonym.name.nomenclaturalSource.citation.authorship",
33
            "synonym.name.nomenclaturalSource.citation.inReference.authorship",
34
            "relationsFromThisTaxon.toTaxon.taxonNodes" // needed for misapplications, see Taxon.isMisapplicationOnly()
35
            ),
36
            false
37
            );
38

    
39

    
40
    public TaxonPortalListController() {
41
        super();
42
        setInitializationStrategy(SIMPLE_TAXON_INIT_STRATEGY.getPropertyPaths());
43
    }
44

    
45
    @Override
46
    protected List<String> getSimpleTaxonInitStrategy() {
47
        return SIMPLE_TAXON_INIT_STRATEGY.getPropertyPaths();
48
    }
49

    
50

    
51

    
52
}
(63-63/76)