Project

General

Profile

« Previous | Next » 

Revision 4917a5da

Added by Katja Luther almost 7 years ago

ref #6640: first implementation for integrate RIS Import in TaxEditor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/NomenclaturalCodeHelper.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
14 14
import java.util.List;
15 15

  
16 16
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
17
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
17 18

  
18 19
/**
19 20
 * <p>NomenclaturalCodeHelper class.</p>
......
23 24
 * @version 1.0
24 25
 */
25 26
public class NomenclaturalCodeHelper {
26
		
27

  
27 28
	/**
28 29
	 * <p>getAllCodes</p>
29 30
	 *
......
43 44
		List<NomenclaturalCode> supportedCodes = new ArrayList<NomenclaturalCode>();
44 45
		for (NomenclaturalCode code : getAllCodes()) {
45 46
			if (isSupported(code)) {
46
				supportedCodes.add(code);
47
			    if (PreferencesUtil.getPreferredNomenclaturalCode().equals(code)){
48
			        supportedCodes.add(0, code);
49
			    }else{
50
			        supportedCodes.add(code);
51
			    }
47 52
			}
48 53
		}
49 54
		return supportedCodes;
50 55
	}
51
	
56

  
52 57
	/**
53 58
	 * @param code
54 59
	 * @return
......
80 85
		}
81 86
		if (code.equals(NomenclaturalCode.ICZN)) {
82 87
			return "International Code of Zoological Nomenclature (ICZN)";
83
		} 		
88
		}
84 89
		if (code.equals(NomenclaturalCode.ICVCN)) {
85 90
			return "International Code for Virus Classification and Nomenclature (ICVCN)";
86
		} 
91
		}
87 92
		return code.name();
88 93
	}
89
	
94

  
90 95
	/**
91 96
	 * <p>getDefaultCode</p>
92 97
	 *

Also available in: Unified diff