Project

General

Profile

Revision 7af2531f

ID7af2531ffce3a81de2548221f8676a14094e007b
Parent 34eced4d
Child 6d5513e4

Added by Andreas Müller about 7 years ago

minor

View differences:

cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/geo/EditGeoServiceTest.java
28 28
import java.util.Set;
29 29
import java.util.UUID;
30 30

  
31
import org.apache.commons.lang.StringUtils;
31 32
import org.apache.http.client.ClientProtocolException;
32 33
import org.apache.log4j.Logger;
33 34
import org.junit.Before;
......
35 36
import org.unitils.spring.annotation.SpringBeanByType;
36 37

  
37 38
import eu.etaxonomy.cdm.api.service.ITermService;
38
import eu.etaxonomy.cdm.common.CdmUtils;
39 39
import eu.etaxonomy.cdm.common.StreamUtils;
40 40
import eu.etaxonomy.cdm.common.UriUtils;
41 41
import eu.etaxonomy.cdm.model.common.Language;
......
56 56
 * @created 08.10.2008
57 57
 */
58 58
public class EditGeoServiceTest extends CdmIntegrationTest {
59
    @SuppressWarnings("unused")
60 59
    private static final Logger logger = Logger.getLogger(EditGeoServiceTest.class);
61 60

  
62 61
    private static final String EDIT_MAPSERVICE_URI_STING = "http://edit.africamuseum.be/edit_wp5/v1.2/rest_gen.php";
......
200 199
        NamedAreaType areaType = NamedAreaType.NATURAL_AREA();
201 200
        NamedAreaLevel areaLevel = NamedAreaLevel.NewInstance("Cyprus Division", "Cyprus Division", null);
202 201

  
203
        TermVocabulary areaVocabulary = TermVocabulary.NewInstance(TermType.NamedArea, "Cyprus devisions", "Cyprus divisions", null, null);
202
        TermVocabulary<NamedArea> areaVocabulary = TermVocabulary.NewInstance(TermType.NamedArea, "Cyprus devisions", "Cyprus divisions", null, null);
204 203
        areaVocabulary.setUuid(uuidCyprusDivisionsVocabulary);
205 204

  
206 205
        for(int i = 1; i <= 8; i++){
......
231 230

  
232 231

  
233 232
    public UUID getNamedAreaUuid(String key) {
234
        if (CdmUtils.isEmpty(key)){return null;
233
        if (StringUtils.isBlank(key)){return null;
235 234
        }else if (key.equalsIgnoreCase("1")){return uuidDivision1;
236 235
        }else if (key.equalsIgnoreCase("2")){return uuidDivision2;
237 236
        }else if (key.equalsIgnoreCase("3")){return uuidDivision3;
......
245 244
        }
246 245
    }
247 246

  
248
    protected NamedArea newNamedArea(UUID uuid, String label, String text, String IdInVocabulary, NamedAreaType areaType, NamedAreaLevel level, TermVocabulary voc){
247
    protected NamedArea newNamedArea(UUID uuid, String label, String text, String IdInVocabulary, NamedAreaType areaType, NamedAreaLevel level, TermVocabulary<NamedArea> voc){
249 248
        NamedArea namedArea = NamedArea.NewInstance(text, label, null);
250 249
        voc.addTerm(namedArea);
251 250
        namedArea.setType(areaType);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)