performed javacscript:fix and worked on documentation
[taxeditor.git] / taxeditor-bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / BulkEditorEntityCreatorService.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.bulkeditor;
12
13 import org.apache.log4j.Logger;
14
15 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
16 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreatorService;
17 import eu.etaxonomy.taxeditor.bulkeditor.input.AgentEditorInput;
18 import eu.etaxonomy.taxeditor.bulkeditor.input.NameEditorInput;
19 import eu.etaxonomy.taxeditor.bulkeditor.input.OccurrenceEditorInput;
20 import eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput;
21
22 /**
23 * <p>BulkEditorEntityCreatorService class.</p>
24 *
25 * @author p.ciardelli
26 * @created 25.08.2009
27 * @version 1.0
28 */
29 public class BulkEditorEntityCreatorService implements IEntityCreatorService {
30 private static final Logger logger = Logger
31 .getLogger(BulkEditorEntityCreatorService.class);
32
33 /* (non-Javadoc)
34 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreatorService#getEntityCreator(java.lang.Object)
35 */
36 /** {@inheritDoc} */
37 public IEntityCreator getEntityCreator(Object element) {
38 if (element instanceof ReferenceEditorInput) {
39 return new ReferenceCreator();
40 }
41 if (element instanceof NameEditorInput) {
42 return new NameCreator();
43 }
44 if (element instanceof AgentEditorInput) {
45 return new TeamOrPersonCreator();
46 }
47 if (element instanceof OccurrenceEditorInput) {
48 return new OccurrenceCreator();
49 }
50 return null;
51 }
52
53 /* (non-Javadoc)
54 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreatorService#setEntityCreator(eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator, java.lang.Object)
55 */
56 /** {@inheritDoc} */
57 public void setEntityCreator(IEntityCreator entityCreator, Object element) {}
58 }