Project

General

Profile

Download (1.27 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
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.
8
*/
9
package eu.etaxonomy.taxeditor.view.webimport.termimport.requests;
10

    
11
import java.util.ArrayList;
12
import java.util.List;
13

    
14
/**
15
 * @author pplitzner
16
 * @since Apr 23, 2018
17
 *
18
 */
19
public class RequestSuggest extends AbstractTerminologyServiceRequest{
20

    
21
    private String suggestString;
22

    
23
    public RequestSuggest(String suggestString) {
24
        super();
25
        this.suggestString = suggestString;
26
    }
27

    
28
    @Override
29
    protected String getServiceUri() {
30
        return TerminologyServiceConstants.SUGGEST_SERVICE_URL;
31
    }
32

    
33
    /**
34
     * {@inheritDoc}
35
     */
36
    @Override
37
    protected String getTerminologyId() {
38
        return null;
39
    }
40

    
41
    /**
42
     * {@inheritDoc}
43
     */
44
    @Override
45
    protected List<RequestParameter> getServiceParameters() {
46
        List<RequestParameter> params = new ArrayList<>();
47
        params.add(new RequestParameter(TerminologyServiceConstants.ATTR_QUERY, suggestString));
48
        params.add(new RequestParameter(TerminologyServiceConstants.ATTR_LIMIT, "20"));
49
        return params;
50
    }
51

    
52
}
(5-5/7)