Project

General

Profile

« Previous | Next » 

Revision 69d856ba

Added by Katja Luther almost 10 years ago

  • not running imports and exports deleted from menu
  • preferences for concept relations fixed
  • open taxon editor with one click in taxon navigator

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java
29 29
	private boolean inverse;
30 30
	private TaxonRelationshipType type;
31 31
	
32
	
32 33
	/**
33 34
	 * 
34 35
	 * @param sourceTaxon
......
73 74
		return inverse;
74 75
	}
75 76

  
77
	/**
78
	 * returns the representation for the given language, when there is no representation for this language available, the english version is returned.
79
	 * @param language
80
	 * @return representation
81
	 * 
82
	 */
76 83
	public Representation getRepresentation(Language language){
77
		return inverse ? type.getInverseRepresentation(language) : type.getRepresentation(language);
84
		Representation result;
85
		result = inverse ? type.getInverseRepresentation(language) : type.getRepresentation(language);
86
		if (result == null){
87
			result = inverse ? type.getInverseRepresentation(Language.ENGLISH()) : type.getRepresentation(Language.ENGLISH());
88
		}
89
		return result;
78 90
	}
79 91
	
92
	
93
	/**
94
	 * returns the label of the TaxonRelationshipType for a given language, if the representation of the language is not available the english representation is returned.
95
	 * @param language
96
	 * @return label
97
	 */
80 98
	public String getLabel(Language language){
99
		
81 100
		return getRepresentation(language).getLabel();
82 101
	}
83 102
	

Also available in: Unified diff