Project

General

Profile

Revision 4dda23ea

ID4dda23ea016633bd5b7282e9598aa3aa0eb47564
Parent 5c0f124f
Child b06d238e

Added by Andreas Müller over 2 years ago

fix #7445 make empty term uris null

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
393 393

  
394 394
    protected static <TERM extends DefinedTermBase> TERM readCsvLine(TERM newInstance, List<String> csvLine, Language lang, boolean abbrevAsId) {
395 395
        newInstance.setUuid(UUID.fromString(csvLine.get(0)));
396
        newInstance.setUri( URI.create(csvLine.get(1)));
396
        String uriStr = CdmUtils.Ne(csvLine.get(1));
397
        newInstance.setUri(uriStr == null? null: URI.create(uriStr));
397 398
        String label = csvLine.get(2).trim();
398 399
        String description = CdmUtils.Ne(csvLine.get(3).trim());
399 400
        String abbreviatedLabel = CdmUtils.Ne(csvLine.get(4).trim());
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermVocabulary.java
197 197
	}
198 198

  
199 199

  
200
	/* (non-Javadoc)
201
	 * @see eu.etaxonomy.cdm.model.common.ILoadableTerm#readCsvLine(java.util.List)
202
	 */
203 200
	public TermVocabulary<T> readCsvLine(List<String> csvLine) {
204 201
		return readCsvLine(csvLine, Language.CSV_LANGUAGE());
205 202
	}
206 203

  
207 204
	public TermVocabulary<T> readCsvLine(List<String> csvLine, Language lang) {
208 205
		this.setUuid(UUID.fromString(csvLine.get(0)));
209
		this.setUri(URI.create(csvLine.get(1)));
206
        String uriStr = CdmUtils.Ne(csvLine.get(1));
207
        this.setUri(uriStr == null? null: URI.create(uriStr));
210 208
		String label = csvLine.get(2).trim();
211 209
		String description = csvLine.get(3);
212 210

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)