1 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.entitycreator
;
3 import java
.util
.HashMap
;
6 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
7 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
8 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
9 import eu
.etaxonomy
.taxeditor
.annotatedlineeditor
.IEntityCreator
;
11 public class TaxonCreator
implements IEntityCreator
<TaxonBase
>{
13 NameCreator nameCreator
;
15 public TaxonBase
createEntity(String text
) {
16 // TODO Auto-generated method stub
21 public TaxonBase
createEntity(Object key
, String text
) {
22 TaxonBase taxonBase
= null;
23 if (nameCreator
== null){
24 nameCreator
= new NameCreator();
26 if (Synonym
.class.equals(key
)){
27 taxonBase
= Synonym
.NewInstance(nameCreator
.createEntity(null, text
), null);
29 taxonBase
= Taxon
.NewInstance(nameCreator
.createEntity(null, text
), null);
36 public Map
<Object
, String
> getKeyLabelPairs() {
37 Map
<Object
, String
> result
= new HashMap
<>();
38 result
.put(Synonym
.class, "Synonym");
39 result
.put(Taxon
.class, "Taxon");
44 public boolean savesEntity() {
45 // TODO Auto-generated method stub