2 * Copyright (C) 2016 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.
9 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.entitycreator
;
11 import java
.util
.HashMap
;
14 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
15 import eu
.etaxonomy
.taxeditor
.annotatedlineeditor
.IEntityCreator
;
22 public class MediaCreator
implements IEntityCreator
<Media
> {
28 public Media
createEntity(String text
) {
29 Media result
= Media
.NewInstance();
30 result
.setTitleCache(text
);
38 public Media
createEntity(Object key
, String text
) {
39 if (key
.equals(Media
.class)){
40 Media result
= Media
.NewInstance();
41 result
.setTitleCache(text
);
51 public Map
<Object
, String
> getKeyLabelPairs() {
52 Map
<Object
, String
> result
= new HashMap
<Object
, String
>();
53 result
.put(Media
.class, "Media");
61 public boolean savesEntity() {
62 // TODO Auto-generated method stub