Project

General

Profile

« Previous | Next » 

Revision 379eb203

Added by Andreas Müller over 3 years ago

cleanup

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/namecatalogue/NameSearch.java
1
/**
2
* Copyright (C) 2007 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
*/
1 9
package eu.etaxonomy.cdm.remote.dto.namecatalogue;
10

  
2 11
import java.util.ArrayList;
3 12
import java.util.HashSet;
4 13
import java.util.List;
5 14
import java.util.Set;
6 15

  
7

  
8 16
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
9 17
import eu.etaxonomy.cdm.remote.dto.common.RemoteResponse;
10 18

  
......
12 20
 * The class representing the response from the CDM Remote Web Service API to a single name search query.
13 21
 * All information contained in this class originates from a call to {@link TaxonName taxon names}
14 22
 * <P>
15
 * 
23
 *
16 24
 * @author c.mathew
17
 * @version 1.0
18 25
 * @since 17-Apr-2012 13:00:43
19 26
 */
20

  
21

  
22 27
public class NameSearch implements RemoteResponse {
23 28

  
24 29
    private NameSearch.NameSearchRequest request;
25 30
    private List<NameSearch.NameSearchResponse> response;
26 31

  
27

  
28
    public NameSearch() {		
29
        this.response = new ArrayList<NameSearch.NameSearchResponse>();
32
    public NameSearch() {
33
        this.response = new ArrayList<>();
30 34
    }
31 35

  
32 36
    public void setRequest(String q) {
......
56 60
            res.addToAcceptedTaxontUuids(acctb.getUuid().toString());
57 61
        }
58 62
    }
59
    
60
    public void addToResponseList(String title, 
61
    		String name, 
62
    		float score, 
63
    		String nameUuid, 
63

  
64
    public void addToResponseList(String title,
65
    		String name,
66
    		float score,
67
    		String nameUuid,
64 68
    		String[] taxonBaseUuids,
65 69
    		String[] accTaxonUuids) {
66 70

  
......
121 125
            title = "";
122 126
            name = "";
123 127
            score = 0;
124
            nameUuids = new HashSet<String>();
125
            taxonConceptUuids = new HashSet<String>();
126
            acceptedTaxontUuids = new HashSet<String>();
128
            nameUuids = new HashSet<>();
129
            taxonConceptUuids = new HashSet<>();
130
            acceptedTaxontUuids = new HashSet<>();
127 131
        }
128 132

  
129 133
        public void setTitle(String title) {
......
149 153
		public void setScore(float score) {
150 154
			this.score = score;
151 155
		}
152
		
156

  
153 157
        public void addToNameUuids(String nameUuid) {
154 158
            nameUuids.add(nameUuid);
155 159
        }
......
165 169
        public Set<String> getTaxonConceptUuids() {
166 170
            return this.taxonConceptUuids;
167 171
        }
168
        
172

  
169 173
        public void addToAcceptedTaxontUuids(String taxonUuid) {
170 174
            acceptedTaxontUuids.add(taxonUuid);
171 175
        }
......
174 178
            return this.acceptedTaxontUuids;
175 179
        }
176 180
    }
177

  
178
}
179

  
180

  
181

  
181
}

Also available in: Unified diff