View Javadoc

1   /**
2    * Copyright (C) 2007 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   
10  package eu.etaxonomy.cdm.io.excel.taxa;
11  
12  import org.apache.log4j.Logger;
13  
14  import java.util.HashMap;
15  import java.util.HashSet;
16  import java.util.UUID;
17  
18  import eu.etaxonomy.cdm.io.excel.common.ExcelImporterBase;
19  
20  /**
21   * @author a.babadshanjan
22   * @created 09.01.2009
23   * @version 1.0
24   */
25  public abstract class TaxonExcelImporterBase extends ExcelImporterBase<TaxonExcelImportState> {
26  	@SuppressWarnings("unused")
27  	private static final Logger logger = Logger.getLogger(TaxonExcelImporterBase.class);
28  
29  	/*
30  	 * Supported Columns:
31  	 * ------------------
32  	 * Id           
33  	 * ParentId
34  	 * Rank
35  	 * ScientificName
36  	 * Author
37  	 * NameStatus
38  	 * VernacularName
39  	 * Language
40  	 */
41  	/*
42  	 * Not yet supported columns:
43  	 * --------------------------
44  	 * Reference
45  	 */
46  
47  	protected static final String ID_COLUMN = "Id";
48  	protected static final String PARENT_ID_COLUMN = "ParentId";
49  	protected static final String RANK_COLUMN = "Rank";
50  	protected static final String AUTHOR_COLUMN = "Author";
51  	protected static final String NAME_STATUS_COLUMN = "NameStatus";
52  	protected static final String VERNACULAR_NAME_COLUMN = "VernacularName";
53  	protected static final String LANGUAGE_COLUMN = "Language";
54  	protected static final String REFERENCE_COLUMN = "Reference";
55  	
56  	
57  	// TODO: This enum is for future use (perhaps).
58  	protected enum Columns { 
59  		Id("Id"), 
60  		ParentId("ParentId"), 
61  		Rank("Rank"),
62  		ScientificName("ScientificName"),
63  		Author("Author"),
64  		NameStatus("NameStatus"),
65  		VernacularName("VernacularName"),
66  		Language("Language");
67  		
68  		private String head;
69  		private String value;
70  	
71  		Columns(String head) {
72  			this.head = head;
73  		}
74  		
75  		public String head() {
76  			return this.head;
77  		}
78  	
79  		public String value() {
80  			return this.value;
81  		}
82  	}
83  	
84  
85  }
86