ref #6190 removing svn property place holder in first line of code - java files
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / input / entitycreator / MediaCreator.java
1 /**
2 * Copyright (C) 2016 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 package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
10
11 import java.util.HashMap;
12 import java.util.Map;
13
14 import eu.etaxonomy.cdm.model.media.Media;
15 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
16
17 /**
18 * @author k.luther
19 * @date 10.03.2016
20 *
21 */
22 public class MediaCreator implements IEntityCreator<Media> {
23
24 /**
25 * {@inheritDoc}
26 */
27 @Override
28 public Media createEntity(String text) {
29 Media result = Media.NewInstance();
30 result.setTitleCache(text);
31 return result;
32 }
33
34 /**
35 * {@inheritDoc}
36 */
37 @Override
38 public Media createEntity(Object key, String text) {
39 if (key.equals(Media.class)){
40 Media result = Media.NewInstance();
41 result.setTitleCache(text);
42 return result;
43 }
44 return null;
45 }
46
47 /**
48 * {@inheritDoc}
49 */
50 @Override
51 public Map<Object, String> getKeyLabelPairs() {
52 Map<Object, String> result = new HashMap<Object, String>();
53 result.put(Media.class, "Media");
54 return result;
55 }
56
57 /**
58 * {@inheritDoc}
59 */
60 @Override
61 public boolean savesEntity() {
62 // TODO Auto-generated method stub
63 return false;
64 }
65
66 }