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.common.mapping.out;
|
11
|
|
12
|
import org.apache.commons.lang.StringUtils;
|
13
|
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
|
14
|
|
15
|
/**
|
16
|
* This mapper does not change any import object, but keeps the information that a database
|
17
|
* attribute needs to be mapped but is not yet mapped.
|
18
|
*
|
19
|
* @see DbExportIgnoreMapper
|
20
|
* @see DbNullMapper
|
21
|
*
|
22
|
* @author a.mueller
|
23
|
* @since 25.02.2010
|
24
|
*/
|
25
|
public class DbExportNotYetImplementedMapper
|
26
|
extends DbExportIgnoreMapper {
|
27
|
|
28
|
private static final Logger logger = LogManager.getLogger(DbExportNotYetImplementedMapper.class);
|
29
|
|
30
|
public static DbExportNotYetImplementedMapper NewInstance(String dbAttributeToIgnore){
|
31
|
return new DbExportNotYetImplementedMapper(null, dbAttributeToIgnore, null, null);
|
32
|
}
|
33
|
|
34
|
public static DbExportNotYetImplementedMapper NewInstance(String dbAttributeToIgnore, String reason){
|
35
|
return new DbExportNotYetImplementedMapper(null, dbAttributeToIgnore, null, reason);
|
36
|
}
|
37
|
|
38
|
//*************************** CONSTRUCTOR ***************************************************************//
|
39
|
|
40
|
protected DbExportNotYetImplementedMapper(String cdmAttributeString, String dbAttributString, Object defaultValue, String unimplementedReason) {
|
41
|
super(cdmAttributeString, dbAttributString, defaultValue, unimplementedReason);
|
42
|
}
|
43
|
|
44
|
@Override
|
45
|
protected void initializeLogging() {
|
46
|
String attributeName = this.dbAttributeString;
|
47
|
String localReason = "";
|
48
|
if (StringUtils.isNotBlank(ignoreReason)){
|
49
|
localReason = " (" + ignoreReason +")";
|
50
|
}
|
51
|
logger.warn(attributeName + " not yet implemented." + localReason);
|
52
|
}
|
53
|
}
|