1 |
3be6ef3e
|
n.hoffmann
|
/**
|
2 |
|
|
* Copyright (C) 2007 EDIT
|
3 |
639ad834
|
Katja Luther
|
* European Distributed Institute of Taxonomy
|
4 |
3be6ef3e
|
n.hoffmann
|
* http://www.e-taxonomy.eu
|
5 |
639ad834
|
Katja Luther
|
*
|
6 |
3be6ef3e
|
n.hoffmann
|
* 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 |
db5e366d
|
n.hoffmann
|
public interface IEntityCreator<T> {
|
23 |
639ad834
|
Katja Luther
|
|
24 |
3be6ef3e
|
n.hoffmann
|
/**
|
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 |
639ad834
|
Katja Luther
|
|
33 |
3be6ef3e
|
n.hoffmann
|
/**
|
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 |
639ad834
|
Katja Luther
|
|
42 |
3be6ef3e
|
n.hoffmann
|
/**
|
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 |
639ad834
|
Katja Luther
|
Map<? extends Object, String> getKeyLabelPairs();
|
49 |
|
|
|
50 |
41513bae
|
Cherian Mathew
|
/**
|
51 |
|
|
* Return a flag indicating whether this creator also saves the entities
|
52 |
|
|
*
|
53 |
|
|
* @return true or false
|
54 |
|
|
*/
|
55 |
|
|
boolean savesEntity();
|
56 |
639ad834
|
Katja Luther
|
|
57 |
41513bae
|
Cherian Mathew
|
|
58 |
3be6ef3e
|
n.hoffmann
|
}
|