Project

General

Profile

« Previous | Next » 

Revision 337563aa

Added by Andreas Müller over 6 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/dwca/in/MappedCdmBase.java
1 1
/**
2 2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
17 17
 *
18 18
 */
19 19
public class MappedCdmBase<CDMBASE extends CdmBase> {
20
	
21
	
20

  
21

  
22 22
	private String namespace;
23 23
	private String sourceId;
24
	
24

  
25 25
	private CDMBASE cdmBase;
26 26

  
27 27
	public MappedCdmBase(String namespace, String sourceId, CDMBASE cdmBase) {
......
30 30
		this.sourceId = sourceId;
31 31
		this.cdmBase = cdmBase;
32 32
	}
33
	
33

  
34 34
	public MappedCdmBase(TermUri termUri, String sourceId, CDMBASE cdmBase) {
35 35
		super();
36 36
		this.namespace = termUri.toString();
37 37
		this.sourceId = sourceId;
38 38
		this.cdmBase = cdmBase;
39 39
	}
40
	
40

  
41 41
	public MappedCdmBase(String sourceId, CDMBASE cdmBase) {
42 42
		super();
43 43
		this.namespace = null;
44 44
		this.sourceId = sourceId;
45 45
		this.cdmBase = cdmBase;
46 46
	}
47
	
47

  
48 48
	public MappedCdmBase(CDMBASE cdmBase) {
49 49
		super();
50 50
		this.namespace = null;
......
63 63
	public CDMBASE getCdmBase() {
64 64
		return cdmBase;
65 65
	}
66
	
66

  
67 67
	public boolean isMappable(){
68 68
		return (this.namespace != null && this.sourceId != null && this.cdmBase != null);
69 69
	}
70
	
71
	public String toString(){
70

  
71
	@Override
72
    public String toString(){
72 73
		String result = CdmUtils.concat("@", new String[]{namespace, sourceId, cdmBase.toString()});
73 74
		return result;
74 75
	}
75
	
76
	
76

  
77

  
77 78
}

Also available in: Unified diff