2 * Copyright (C) 2017 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.io
.identifier
;
11 import java
.io
.InputStreamReader
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
15 import eu
.etaxonomy
.cdm
.io
.common
.SimpleImportConfiguratorBase
;
16 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
17 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
20 * Configurator for importing Identifier via csv for a given class.
25 public class IdentifierImportConfigurator
26 extends SimpleImportConfiguratorBase
<InputStreamReader
>{
28 private static final long serialVersionUID
= 2399625330102810465L;
30 private Class
<?
extends IdentifiableEntity
> cdmClass
;
31 private UUID uuidIdentifierType
;
36 * @param cdmDestination
39 public static IdentifierImportConfigurator
NewInstance(InputStreamReader file
,
40 ICdmDataSource cdmDestination
) {
41 return new IdentifierImportConfigurator(file
, cdmDestination
);
44 // ****************** CONSTRUCTOR *****************************/
46 private IdentifierImportConfigurator(InputStreamReader file
,
47 ICdmDataSource cdmDestination
){
48 super(file
, cdmDestination
, null);
51 // *************************************
55 @SuppressWarnings("unchecked")
56 protected void makeIoClassList(){
57 ioClassList
= new Class
[]{
58 IdentifierImport
.class,
62 public Class
<?
extends IdentifiableEntity
> getCdmClass() {
65 public void setCdmClass(Class
<?
extends IdentifiableEntity
> cdmClass
) {
66 this.cdmClass
= cdmClass
;
70 public UUID
getIdentifierTypeUuid() {
71 return uuidIdentifierType
;
74 public void setIdentifierTypeUuid(UUID uuidIdentifierType
) {
75 this.uuidIdentifierType
= uuidIdentifierType
;
83 public Reference
getSourceReference() {
84 // TODO Auto-generated method stub