Project

General

Profile

Download (1.21 KB) Statistics
| Branch: | Tag: | Revision:
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.annotatedlineeditor;
11

    
12
import java.util.Map;
13

    
14

    
15
/**
16
 * <p>IEntityCreator interface.</p>
17
 *
18
 * @author p.ciardelli
19
 * @created 03.07.2009
20
 * @version 1.0
21
 */
22
public interface IEntityCreator<T> {
23

    
24
	/**
25
	 * <p>createEntity</p>
26
	 *
27
	 * @param text a {@link java.lang.String} object.
28
	 * @param <T> a T object.
29
	 * @return a T object.
30
	 */
31
	T createEntity(String text);
32

    
33
	/**
34
	 * <p>createEntity</p>
35
	 *
36
	 * @param key a {@link java.lang.Object} object.
37
	 * @param text a {@link java.lang.String} object.
38
	 * @return a T object.
39
	 */
40
	T createEntity(Object key, String text);
41

    
42
	/**
43
	 * Get a map of keys for all objects that can be created by this entity creator
44
	 * along with their string representations.
45
	 *
46
	 * @return a {@link java.util.Map} object.
47
	 */
48
	Map<? extends Object, String> getKeyLabelPairs();
49

    
50
	/**
51
	 * Return a flag indicating whether this creator also saves the entities
52
	 *
53
	 * @return true or false
54
	 */
55
	boolean savesEntity();
56

    
57

    
58
}
(8-8/16)