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