2 * Copyright (C) 2007 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.
10 package eu
.etaxonomy
.cdm
.io
.common
;
12 import org
.apache
.log4j
.Logger
;
14 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
15 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.out
.IExportTransformer
;
16 import eu
.etaxonomy
.cdm
.model
.reference
.IDatabase
;
17 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceFactory
;
25 public abstract class DbExportConfiguratorBase
<STATE
extends ExportStateBase
, TRANSFORM
extends IExportTransformer
> extends ExportConfiguratorBase
<Source
, STATE
, TRANSFORM
> implements IExportConfigurator
<STATE
, TRANSFORM
>{
26 @SuppressWarnings("unused")
27 private static Logger logger
= Logger
.getLogger(DbExportConfiguratorBase
.class);
32 CDM_ID_WITH_EXCEPTIONS
,
37 private IdType idType
= IdType
.CDM_ID
;
39 public DbExportConfiguratorBase(TRANSFORM transformer
) {
47 public IdType
getIdType() {
52 * @param idType the idType to set
54 public void setIdType(IdType idType
) {
60 * @see eu.etaxonomy.cdm.io.common.IIoConfigurator#getDestinationNameString()
62 public String
getDestinationNameString() {
63 if (getDestination() != null){
64 return getDestination().getDatabase();
71 public ICdmDataSource
getSource() {
72 return (ICdmDataSource
)super.getSource();
74 public void setSource(ICdmDataSource cdmSource
) {
75 super.setSource(cdmSource
);
79 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getSourceNameString()
81 public String
getSourceNameString() {
82 if (this.getSource() == null){
85 return this.getSource().getDatabase();
91 * @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#getSourceReference()
93 public IDatabase
getSourceReference() {
95 if (sourceReference
== null){
96 sourceReference
= ReferenceFactory
.newDatabase();
97 if (getSource() != null){
98 sourceReference
.setTitleCache(getSource().getDatabase(), true);
101 return sourceReference
;