Project

General

Profile

Download (1.67 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.model.description;
11

    
12

    
13
import javax.persistence.Entity;
14
import javax.persistence.ManyToOne;
15

    
16
import org.apache.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.model.common.Language;
19
import eu.etaxonomy.cdm.model.common.LanguageString;
20
import eu.etaxonomy.cdm.model.common.MultilanguageSet;
21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22

    
23
/**
24
 * FIXME
25
 * @author m.doering
26
 * @version 1.0
27
 * @created 08-Nov-2007 13:06:57
28
 */
29
@Entity
30
public class TaxonInteraction extends DescriptionElementBase {
31
	private static final Logger logger = Logger.getLogger(TaxonInteraction.class);
32
	private MultilanguageSet description;
33
	private Taxon taxon2;
34

    
35
	/**
36
	 * Factory method
37
	 * @return
38
	 */
39
	public static TaxonInteraction NewInstance(){
40
		return new TaxonInteraction();
41
	}
42
	
43
	public TaxonInteraction() {
44
		super(null);
45
	}
46
	
47
	
48
	@ManyToOne
49
	public Taxon getTaxon2(){
50
		return this.taxon2;
51
	}
52
	public void setTaxon2(Taxon taxon2){
53
		this.taxon2 = taxon2;
54
	}
55

    
56
	public MultilanguageSet getDescription(){
57
		return this.description;
58
	}
59
	private void setDescription(MultilanguageSet description){
60
		this.description = description;
61
	}
62
	public void addDescription(LanguageString description){
63
		this.description.add(description);
64
	}
65
	public void addDescription(String text, Language language){
66
		this.description.put(language, LanguageString.NewInstance(text, language));
67
	}
68
	public void removeDescription(Language lang){
69
		this.description.remove(lang);
70
	}
71
}
(26-26/30)