1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.Map;
|
14
|
|
15
|
import eu.etaxonomy.cdm.model.common.Group;
|
16
|
import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
|
17
|
|
18
|
/**
|
19
|
* @author n.hoffmann
|
20
|
* @created Mar 9, 2011
|
21
|
* @version 1.0
|
22
|
*/
|
23
|
public class GroupCreator implements IEntityCreator<Group> {
|
24
|
|
25
|
public static final String GROUP = "Group";
|
26
|
|
27
|
/* (non-Javadoc)
|
28
|
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
|
29
|
*/
|
30
|
@Override
|
31
|
public Group createEntity(String text) {
|
32
|
return createEntity(null, text);
|
33
|
}
|
34
|
|
35
|
/* (non-Javadoc)
|
36
|
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Object, java.lang.String)
|
37
|
*/
|
38
|
@Override
|
39
|
public Group createEntity(Object key, String text) {
|
40
|
return Group.NewInstance(text);
|
41
|
}
|
42
|
|
43
|
/* (non-Javadoc)
|
44
|
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getKeyLabelPairs()
|
45
|
*/
|
46
|
@Override
|
47
|
public Map<Object, String> getKeyLabelPairs() {
|
48
|
Map<Object, String> result = new HashMap<Object, String>();
|
49
|
result.put(Group.class, GROUP);
|
50
|
return result;
|
51
|
}
|
52
|
|
53
|
@Override
|
54
|
public boolean savesEntity() {
|
55
|
// TODO Auto-generated method stub
|
56
|
return false;
|
57
|
}
|
58
|
|
59
|
}
|