-// $Id$\r
-/**\r
-* Copyright (C) 2007 EDIT\r
-* European Distributed Institute of Taxonomy \r
-* http://www.e-taxonomy.eu\r
-* \r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-\r
-package eu.etaxonomy.taxeditor.bulkeditor;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.apache.log4j.Logger;\r
-\r
-import eu.etaxonomy.cdm.model.agent.Person;\r
-import eu.etaxonomy.cdm.model.agent.Team;\r
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
-import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 18.09.2009\r
- * @version 1.0\r
- */\r
-public class TeamOrPersonCreator implements IEntityCreator<TeamOrPersonBase> {\r
- private static final Logger logger = Logger\r
- .getLogger(TeamOrPersonCreator.class);\r
-\r
- /* (non-Javadoc)\r
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)\r
- */\r
- public TeamOrPersonBase createEntity(String text) {\r
- return createEntity(Person.class, text);\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Class, java.lang.String)\r
- */\r
- public TeamOrPersonBase createEntity(Object key, String text) {\r
- TeamOrPersonBase teamOrPerson = null;\r
- if (Team.class.equals(((Class) key))) {\r
- teamOrPerson = Team.NewInstance();\r
- }\r
- if (Person.class.equals(((Class) key))) {\r
- teamOrPerson = Person.NewInstance();\r
- } \r
- if (teamOrPerson != null) {\r
- teamOrPerson.setTitleCache(text);\r
- }\r
- return teamOrPerson;\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getClassLabelPairs()\r
- */\r
- public Map<Object, String> getKeyLabelPairs() {\r
- Map<Object, String> result = new HashMap<Object, String>();\r
- result.put(Team.class, "Author Team");\r
- result.put(Person.class, "Author");\r
- return result;\r
- }\r
-}\r
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.bulkeditor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
+
+/**
+ * <p>TeamOrPersonCreator class.</p>
+ *
+ * @author p.ciardelli
+ * @created 18.09.2009
+ * @version 1.0
+ */
+public class TeamOrPersonCreator implements IEntityCreator<TeamOrPersonBase> {
+ private static final Logger logger = Logger
+ .getLogger(TeamOrPersonCreator.class);
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
+ */
+ /** {@inheritDoc} */
+ public TeamOrPersonBase createEntity(String text) {
+ return createEntity(Person.class, text);
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Class, java.lang.String)
+ */
+ /** {@inheritDoc} */
+ public TeamOrPersonBase createEntity(Object key, String text) {
+ TeamOrPersonBase teamOrPerson = null;
+ if (Team.class.equals(((Class) key))) {
+ teamOrPerson = Team.NewInstance();
+ }
+ if (Person.class.equals(((Class) key))) {
+ teamOrPerson = Person.NewInstance();
+ }
+ if (teamOrPerson != null) {
+ teamOrPerson.setTitleCache(text);
+ }
+ return teamOrPerson;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getClassLabelPairs()
+ */
+ /**
+ * <p>getKeyLabelPairs</p>
+ *
+ * @return a {@link java.util.Map} object.
+ */
+ public Map<Object, String> getKeyLabelPairs() {
+ Map<Object, String> result = new HashMap<Object, String>();
+ result.put(Team.class, "Author Team");
+ result.put(Person.class, "Author");
+ return result;
+ }
+}