Project

General

Profile

« Previous | Next » 

Revision 6ab31377

Added by Andreas Müller over 13 years ago

Added new rank "unranked" (#2141) and updated language labels and titleCaches with full language name (#2144)

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/NonViralName.java
33 33
import javax.xml.bind.annotation.XmlSchemaType;
34 34
import javax.xml.bind.annotation.XmlType;
35 35

  
36
import org.apache.commons.lang.StringUtils;
36 37
import org.apache.log4j.Logger;
37 38
import org.hibernate.annotations.Cascade;
38 39
import org.hibernate.annotations.CascadeType;
......
1147 1148
	 * @deprecated to be used by RelationshipBase only
1148 1149
	 */
1149 1150
	@Override
1150
	@Deprecated
1151
	@Deprecated //to be used by RelationshipBase only
1151 1152
	public void addRelationship(RelationshipBase relation) {
1152 1153
		if (relation instanceof HybridRelationship){
1153 1154
			addHybridRelationship((HybridRelationship)relation);
......
1259 1260
	/**
1260 1261
	  * Needs to be implemented by those classes that handle autonyms (e.g. botanical names).
1261 1262
	  **/
1263
	@Transient
1262 1264
	public boolean isAutonym(){
1263 1265
		return false;
1264 1266
	}
1267
	
1268
	
1269
	/**
1270
	 * Returns the boolean value indicating whether <i>this</i> names rank is Rank "unranked"
1271
	 * (uuid = 'a965befb-70a9-4747-a18f-624456c65223') but most likely it is an infrageneric rank
1272
	 * due to existing atomized data for the genus epithet and the infrageneric epithet but missing
1273
	 * specific epithet.
1274
	 * Returns false if <i>this</i> names rank is null.
1275
	 *
1276
	 * @see  #isSupraGeneric()
1277
	 * @see  #isGenus()
1278
	 * @see  #isSpeciesAggregate()
1279
	 * @see  #isSpecies()
1280
	 * @see  #isInfraSpecific()
1281
	 */
1282
	@Transient
1283
	public boolean isInfragenericUnranked() {
1284
		Rank rank = this.getRank();
1285
		if (rank == null || ! rank.equals(Rank.UNRANKED())){
1286
			return false;
1287
		}
1288
		if (StringUtils.isBlank(this.getSpecificEpithet()) && StringUtils.isBlank(this.getInfraSpecificEpithet()) ){
1289
			return true;
1290
		}else{
1291
			return false;
1292
		}
1293
	}
1265 1294
}

Also available in: Unified diff