Project

General

Profile

Revision 4aa98446

ID4aa98446a858d27b11eae57fd7cd44ec1711127e
Parent 1990fe50
Child 10b839e4

Added by Andreas Kohlbecker over 2 years ago

fix #4497 solving problem with status parameter in taxon search

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
2029 2029
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
2030 2030
        assertEquals( "30(Vorabdr.)", ((Reference)name.getNomenclaturalReference()).getVolume());
2031 2031

  
2032
        // Sempervivum globiferum subsp. allionii (Jord. & Fourr.) ´t Hart & Bleij
2033
        name = parser.parseReferencedName("Ophrys hystera  Kreutz & Ruedi Peter in J. Eur. Orchideen 30(Vorabdr.): 128. 1997");
2034
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
2035
        assertEquals( "30(Vorabdr.)", ((Reference)name.getNomenclaturalReference()).getVolume());
2036

  
2032 2037
    }
2033 2038

  
2034 2039
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/TaxonListController.java
9 9

  
10 10
package eu.etaxonomy.cdm.remote.controller;
11 11

  
12
import io.swagger.annotations.Api;
13

  
12 14
import java.io.IOException;
13 15
import java.util.ArrayList;
14 16
import java.util.Arrays;
......
65 67
import eu.etaxonomy.cdm.remote.editor.MatchModePropertyEditor;
66 68
import eu.etaxonomy.cdm.remote.editor.RankPropertyEditor;
67 69
import eu.etaxonomy.cdm.remote.editor.TermBaseListPropertyEditor;
70
import eu.etaxonomy.cdm.remote.editor.TermBasePropertyEditor;
68 71
import eu.etaxonomy.cdm.remote.editor.UuidList;
69
import io.swagger.annotations.Api;
70 72

  
71 73
/**
72 74
 * TODO write controller documentation
......
117 119
        binder.registerCustomEditor(DefinedTermBaseList.class, new TermBaseListPropertyEditor<NamedArea>(termService));
118 120
        binder.registerCustomEditor(MatchMode.class, new MatchModePropertyEditor());
119 121
        binder.registerCustomEditor(Rank.class, new RankPropertyEditor());
122
        binder.registerCustomEditor(PresenceAbsenceTerm.class, new TermBasePropertyEditor<PresenceAbsenceTerm>(termService));
120 123

  
121 124
    }
122 125

  
......
160 163
            @RequestParam(value = "query", required = true) String query,
161 164
            @RequestParam(value = "classificationUuid", required = false) UUID classificationUuid,
162 165
            @RequestParam(value = "area", required = false) DefinedTermBaseList<NamedArea> areaList,
163
            @RequestParam(value = "status", required = false) Set<PresenceAbsenceTerm> status,
166
            @RequestParam(value = "status", required = false) PresenceAbsenceTerm[] status,
164 167
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
165 168
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
166 169
            @RequestParam(value = "doTaxa", required = false) Boolean doTaxa,
......
202 205

  
203 206
        Classification classification = classificationService.load(classificationUuid);
204 207

  
208
        Set<PresenceAbsenceTerm> statusSet = null;
209
        if(status != null) {
210
                statusSet = new HashSet<PresenceAbsenceTerm>(Arrays.asList(status));
211
        }
212

  
205 213
        return service.findTaxaAndNamesByFullText(searchModes, query,
206
                classification, areaSet, status, null,
214
                classification, areaSet, statusSet, null,
207 215
                false, pagerParams.getPageSize(), pagerParams.getPageIndex(),
208 216
                OrderHint.NOMENCLATURAL_SORT_ORDER.asList(), getSimpleTaxonInitStrategy());
209 217
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)