// $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.
*/
package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
-import java.util.Comparator;
-import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
* <p>
* OccurrenceCreator class.
* </p>
- *
+ *
* @author n.hoffmann
* @created Jun 16, 2010
* @version 1.0
/** {@inheritDoc} */
@Override
public SpecimenOrObservationBase createEntity(Object key, String text) {
-
+
SpecimenOrObservationBase specimenOrObservation = null;
NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard((SpecimenOrObservationType)key);
wizard.init(null, null);
int status = dialog.open();
if (status == IStatus.OK) {
- specimenOrObservation = wizard.getEntity();
+ specimenOrObservation = wizard.getEntity();
}
- }
+ }
return specimenOrObservation;
}
* <p>
* getKeyLabelPairs
* </p>
- *
+ *
* @return a {@link java.util.Map} object.
*/
@Override
public Map<Object, String> getKeyLabelPairs() {
- Comparator<Object> comparator = new Comparator<Object>() {
- public int compare(Object o1, Object o2) {
- String key1 = ((SpecimenOrObservationType)o1).getKey();
- String key2 = ((SpecimenOrObservationType)o2).getKey();
- return key1.compareTo(key2);
- }
- };
- Map<Object, String> result = new TreeMap<Object, String>(comparator);
-
- for(SpecimenOrObservationType sooType : SpecimenOrObservationType.values()) {
- result.put(sooType, sooType.getMessage());
+// Comparator<Object> comparator = new Comparator<Object>() {
+// public int compare(Object o1, Object o2) {
+// String key1 = ((SpecimenOrObservationType)o1).getKey();
+// String key2 = ((SpecimenOrObservationType)o2).getKey();
+// return key1.compareTo(key2);
+// }
+// };
+// Map<Object, String> result = new TreeMap<Object, String>(comparator);
+// Map<Object, String> result = new HashMap<Object, String>();
+ Map<Object, String> result = new TreeMap<Object, String>();
+
+ for(SpecimenOrObservationType sooType : SpecimenOrObservationType.values()) {
+ result.put(sooType, sooType.getMessage());
}
return result;
// TODO Auto-generated method stub
return true;
}
-
+
}