2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.annotatedlineeditor
;
14 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
18 * <p>IEntityCreator interface.</p>
24 public interface IEntityCreator
<T
> {
29 * @param text a {@link java.lang.String} object.
30 * @param <T> a T object.
33 T
createEntity(String text
);
38 * @param key a {@link java.lang.Object} object.
39 * @param text a {@link java.lang.String} object.
42 T
createEntity(Object key
, String text
);
45 * Get a map of keys for all objects that can be created by this entity creator
46 * along with their string representations.
48 * @return a {@link java.util.Map} object.
50 Map
<Object
, String
> getKeyLabelPairs();
53 * Return a flag indicating whether this creator also saves the entities
55 * @return true or false
57 boolean savesEntity();