Revision f905a388
Added by Andreas Müller almost 2 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/mapping/CdmAttributeMapperBase.java | ||
---|---|---|
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 |
|
|
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 |
|
|
44 | 46 |
} |
Also available in: Unified diff
cleanup