Project

General

Profile

« Previous | Next » 

Revision e132faba

Added by Andreas Müller about 16 years ago

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java
29 29
@Entity
30 30
public class Synonym extends TaxonBase {
31 31
	static Logger logger = Logger.getLogger(Synonym.class);
32
	
32 33
	private Set<SynonymRelationship> synonymRelations = new HashSet();
33 34

  
34 35

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/SynonymRelationship.java
62 62
	
63 63
	@ManyToOne
64 64
	@Cascade({CascadeType.SAVE_UPDATE})
65
	public Synonym getSynoynm(){
65
	public Synonym getSynonym(){
66 66
		return this.synonym;
67 67
	}
68

  
69 68
	private void setSynonym(Synonym synoynm){
70 69
		this.synonym = synoynm;
71 70
	}
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
234 234
	public Set<Synonym> getSynonyms(){
235 235
		Set<Synonym> syns = new HashSet();
236 236
		for (SynonymRelationship rel: this.getSynonymRelations()){
237
			syns.add(rel.getSynoynm());
237
			syns.add(rel.getSynonym());
238 238
		}
239 239
		return syns;
240 240
	}
......
247 247
	public Set<TaxonNameBase> getSynonymNames(){
248 248
		Set<TaxonNameBase> names = new HashSet();
249 249
		for (SynonymRelationship rel: this.getSynonymRelations()){
250
			names.add(rel.getSynoynm().getName());
250
			names.add(rel.getSynonym().getName());
251 251
		}
252 252
		return names;
253 253
	}

Also available in: Unified diff