Project

General

Profile

Download (1.37 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;import org.apache.logging.log4j.Logger;
16

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

    
19
/**
20
 * A mapper base class for all mappers mapping source attributes to destination attributes.
21
 *
22
 * @author a.mueller
23
 * @since 05.08.2008
24
 */
25
public abstract class CdmAttributeMapperBase extends CdmMapperBase{
26
	@SuppressWarnings("unused")
27
	private static final Logger logger = LogManager.getLogger(CdmAttributeMapperBase.class);
28

    
29
	public abstract Set<String> getSourceAttributes();
30

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

    
33
	public abstract List<String> getSourceAttributeList();
34

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

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

    
44
}
(1-1/53)