\r
import org.apache.log4j.Logger;\r
import eu.etaxonomy.cdm.database.ICdmDataSource;\r
-import eu.etaxonomy.cdm.io.berlinModel.BerlinModelImportConfigurator;\r
+import eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportConfigurator;\r
import eu.etaxonomy.cdm.io.common.IImportConfigurator;\r
import eu.etaxonomy.cdm.io.common.ImportConfiguratorBase;\r
+import eu.etaxonomy.cdm.io.common.ImportStateBase;\r
import eu.etaxonomy.cdm.io.common.Source;\r
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;\r
import eu.etaxonomy.cdm.model.reference.Database;\r
* @created 08.05.2009\r
* @version 1.0\r
*/\r
-public class FaunaEuropaeaImportConfigurator extends ImportConfiguratorBase implements IImportConfigurator {\r
+public class FaunaEuropaeaImportConfigurator extends ImportConfiguratorBase<FaunaEuropaeaImportState> implements IImportConfigurator {\r
\r
private static final Logger logger = Logger.getLogger(FaunaEuropaeaImportConfigurator.class);\r
\r
+ private boolean doBasionyms = true;\r
+ private boolean doTaxonomicallyIncluded = true;\r
+ private boolean doMisappliedNames = true;\r
+ private boolean doHeterotypicSynonyms = true;\r
+ \r
+ /* Max number of taxa to be saved with one service call */\r
+ private int limitSave = 1000;\r
+ private int maxTaxon = 306000;\r
+ private ReferenceBase<?> auctReference;\r
+ \r
+// @SuppressWarnings("unchecked")\r
+// protected void makeIoClassList() {\r
+// ioClassList = new Class[] {\r
+// FaunaEuropaeaAuthorImport.class,\r
+// FaunaEuropaeaTaxonNameImport.class,\r
+// FaunaEuropaeaRelTaxonIncludeImport.class,\r
+// FaunaEuropaeaRelMisappNamesImport.class,\r
+// FaunaEuropaeaRefImport.class,\r
+// FaunaEuropaeaDistributionImport.class\r
+// };\r
+// };\r
+ \r
@SuppressWarnings("unchecked")\r
protected void makeIoClassList() {\r
ioClassList = new Class[] {\r
-// FaunaEuropaeaAuthorImport.class,\r
-// FaunaEuropaeaReferenceImport.class,\r
-// FaunaEuropaeaTaxonNameImport.class\r
- FaunaEuropaeaTaxonImport.class\r
+ FaunaEuropaeaAuthorImport.class,\r
+ FaunaEuropaeaTaxonNameImport.class,\r
+// FaunaEuropaeaRelTaxonIncludeImport.class\r
+// FaunaEuropaeaRefImport.class,\r
// FaunaEuropaeaDistributionImport.class\r
};\r
};\r
* @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()\r
*/\r
@Override\r
- public ReferenceBase getSourceReference() {\r
+ public ReferenceBase<?> getSourceReference() {\r
//TODO\r
if (this.sourceReference == null){\r
logger.warn("getSource Reference not yet fully implemented");\r
sourceReference = Database.NewInstance();\r
- sourceReference.setTitleCache("Fauna Europaea data import");\r
+ sourceReference.setTitleCache("Fauna Europaea database");\r
}\r
return sourceReference;\r
}\r
\r
\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()\r
+ */\r
+ public ReferenceBase<?> getAuctReference() {\r
+ //TODO\r
+ if (auctReference == null){\r
+ auctReference = Database.NewInstance();\r
+ auctReference.setTitleCache("auct.");\r
+ }\r
+ return auctReference;\r
+ }\r
+\r
/* (non-Javadoc)\r
* @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getSourceNameString()\r
*/\r
return this.getSource().toString();\r
}\r
}\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getNewState()\r
+ */\r
+ public FaunaEuropaeaImportState getNewState() {\r
+ return new FaunaEuropaeaImportState(this);\r
+ }\r
+\r
+ /**\r
+ * @return the doBasionyms\r
+ */\r
+ public boolean isDoBasionyms() {\r
+ return doBasionyms;\r
+ }\r
+\r
+ /**\r
+ * @param doBasionyms the doBasionyms to set\r
+ */\r
+ public void setDoBasionyms(boolean doBasionyms) {\r
+ this.doBasionyms = doBasionyms;\r
+ }\r
+\r
+ /**\r
+ * @return the doTaxonomicallyIncluded\r
+ */\r
+ public boolean isDoTaxonomicallyIncluded() {\r
+ return doTaxonomicallyIncluded;\r
+ }\r
+\r
+ /**\r
+ * @param doTaxonomicallyIncluded the doTaxonomicallyIncluded to set\r
+ */\r
+ public void setDoTaxonomicallyIncluded(boolean doTaxonomicallyIncluded) {\r
+ this.doTaxonomicallyIncluded = doTaxonomicallyIncluded;\r
+ }\r
+\r
+ /**\r
+ * @return the doMisappliedNames\r
+ */\r
+ public boolean isDoMisappliedNames() {\r
+ return doMisappliedNames;\r
+ }\r
+\r
+ /**\r
+ * @param doMisappliedNames the doMisappliedNames to set\r
+ */\r
+ public void setDoMisappliedNames(boolean doMisappliedNames) {\r
+ this.doMisappliedNames = doMisappliedNames;\r
+ }\r
+\r
+ /**\r
+ * @return the doHeterotypicSynonyms\r
+ */\r
+ public boolean isDoHeterotypicSynonyms() {\r
+ return doHeterotypicSynonyms;\r
+ }\r
+\r
+ /**\r
+ * @param doHeterotypicSynonyms the doHeterotypicSynonyms to set\r
+ */\r
+ public void setDoHeterotypicSynonyms(boolean doHeterotypicSynonyms) {\r
+ this.doHeterotypicSynonyms = doHeterotypicSynonyms;\r
+ }\r
+\r
+ /**\r
+ * @param auctReference the auctReference to set\r
+ */\r
+ public void setAuctReference(ReferenceBase<?> auctReference) {\r
+ this.auctReference = auctReference;\r
+ }\r
+\r
+ /**\r
+ * @return the limitSave\r
+ */\r
+ public int getLimitSave() {\r
+ return limitSave;\r
+ }\r
+\r
+ /**\r
+ * @param limitSave the limitSave to set\r
+ */\r
+ public void setLimitSave(int limitSave) {\r
+ this.limitSave = limitSave;\r
+ }\r
+\r
+ /**\r
+ * @return the maxTaxon\r
+ */\r
+ public int getMaxTaxon() {\r
+ return maxTaxon;\r
+ }\r
+\r
+ /**\r
+ * @param maxTaxon the maxTaxon to set\r
+ */\r
+ public void setMaxTaxon(int maxTaxon) {\r
+ this.maxTaxon = maxTaxon;\r
+ }\r
+ \r
+ \r
\r
}\r