Project

General

Profile

Download (1.3 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;
11

    
12
import java.util.List;
13
import java.util.Set;
14

    
15
import org.apache.logging.log4j.LogManager;
16
import org.apache.logging.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.common.CdmUtils;
19

    
20
/**
21
 * A mapper base class for all mappers mapping source attributes to destination attributes.
22
 *
23
 * @author a.mueller
24
 * @since 05.08.2008
25
 */
26
public abstract class CdmAttributeMapperBase extends CdmMapperBase{
27

    
28
	@SuppressWarnings("unused")
29
	private static final Logger logger = LogManager.getLogger();
30

    
31
	public abstract Set<String> getSourceAttributes();
32

    
33
	public abstract Set<String> getDestinationAttributes();
34

    
35
	public abstract List<String> getSourceAttributeList();
36

    
37
	public abstract List<String> getDestinationAttributeList();
38

    
39
	@Override
40
    public String toString(){
41
		String sourceAtt = CdmUtils.concat(",", getSourceAttributeList().toArray(new String[1]));
42
		String destAtt = CdmUtils.concat(",", getDestinationAttributeList().toArray(new String[1]));
43
		return this.getClass().getSimpleName() +"[" + sourceAtt + "->" + destAtt + "]";
44
	}
45

    
46
}
(1-1/53)