Project

General

Profile

Download (1.84 KB) Statistics
| Branch: | Tag: | Revision:
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;
14
import org.apache.logging.log4j.Logger;
15

    
16
/**
17
 * This mapper does not change any import object, but keeps the information that a database
18
 * attribute needs to be mapped but is not yet mapped.
19
 *
20
 * @see DbExportIgnoreMapper
21
 * @see DbNullMapper
22
 *
23
 * @author a.mueller
24
 * @since 25.02.2010
25
 */
26
public class DbExportNotYetImplementedMapper
27
        extends DbExportIgnoreMapper {
28

    
29
    private static final Logger logger = LogManager.getLogger();
30

    
31
	public static DbExportNotYetImplementedMapper NewInstance(String dbAttributeToIgnore){
32
		return new DbExportNotYetImplementedMapper(null, dbAttributeToIgnore, null, null);
33
	}
34

    
35
	public static DbExportNotYetImplementedMapper NewInstance(String dbAttributeToIgnore, String reason){
36
		return new DbExportNotYetImplementedMapper(null, dbAttributeToIgnore, null, reason);
37
	}
38

    
39
//*************************** CONSTRUCTOR ***************************************************************//
40

    
41
	protected DbExportNotYetImplementedMapper(String cdmAttributeString, String dbAttributString, Object defaultValue, String unimplementedReason) {
42
		super(cdmAttributeString, dbAttributString, defaultValue, unimplementedReason);
43
	}
44

    
45
	@Override
46
    protected void initializeLogging() {
47
	    String attributeName = this.dbAttributeString;
48
        String localReason = "";
49
        if (StringUtils.isNotBlank(ignoreReason)){
50
            localReason = " (" + ignoreReason +")";
51
        }
52
        logger.warn(attributeName + " not yet implemented." +  localReason);
53
	}
54
}
(15-15/44)