2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.io
.common
;
12 import java
.util
.ArrayList
;
13 import java
.util
.HashSet
;
14 import java
.util
.List
;
17 import org
.apache
.log4j
.Logger
;
24 public abstract class CdmSingleAttributeMapperBase
extends CdmAttributeMapperBase
{
25 @SuppressWarnings("unused")
26 private static final Logger logger
= Logger
.getLogger(CdmSingleAttributeMapperBase
.class);
28 private String sourceValue
;
29 private String destinationValue
;
30 protected Object defaultValue
;
32 protected CdmSingleAttributeMapperBase(String sourceAttributString
, String destinationAttributeString
){
33 this(sourceAttributString
,destinationAttributeString
, null);
36 protected CdmSingleAttributeMapperBase(String sourceAttributString
, String destinationAttributeString
, Object defaultValue
){
37 this.sourceValue
= sourceAttributString
;
38 this.destinationValue
= destinationAttributeString
;
39 this.defaultValue
= defaultValue
;
43 public String
getSourceAttribute(){
47 public String
getDestinationAttribute(){
48 return destinationValue
;
52 public Set
<String
> getSourceAttributes(){
53 Set
<String
> result
= new HashSet
<String
>();
54 result
.add(sourceValue
);
59 public Set
<String
> getDestinationAttributes(){
60 Set
<String
> result
= new HashSet
<String
>();
61 result
.add(destinationValue
);
67 public List
<String
> getSourceAttributeList(){
68 List
<String
> result
= new ArrayList
<String
>();
69 result
.add(sourceValue
);
74 public List
<String
> getDestinationAttributeList(){
75 List
<String
> result
= new ArrayList
<String
>();
76 result
.add(destinationValue
);
80 public abstract Class
getTypeClass();