-// $Id$
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import java.util.List;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
/**
* <p>NomenclaturalCodeHelper class.</p>
* @version 1.0
*/
public class NomenclaturalCodeHelper {
-
+
/**
* <p>getAllCodes</p>
*
List<NomenclaturalCode> supportedCodes = new ArrayList<NomenclaturalCode>();
for (NomenclaturalCode code : getAllCodes()) {
if (isSupported(code)) {
- supportedCodes.add(code);
+ if (PreferencesUtil.getPreferredNomenclaturalCode(false).equals(code)){
+ supportedCodes.add(0, code);
+ }else{
+ supportedCodes.add(code);
+ }
}
}
return supportedCodes;
}
-
+
/**
* @param code
* @return
}
if (code.equals(NomenclaturalCode.ICZN)) {
return "International Code of Zoological Nomenclature (ICZN)";
- }
+ }
if (code.equals(NomenclaturalCode.ICVCN)) {
return "International Code for Virus Classification and Nomenclature (ICVCN)";
- }
+ }
return code.name();
}
-
+
/**
* <p>getDefaultCode</p>
*