TaxonNameEditor taxonNameEditor) {
List<HomotypicalSynonymGroup> retainedGroups = new ArrayList<HomotypicalSynonymGroup>();
- for(HomotypicalSynonymGroup group : taxonNameEditor.getHeterotypicSynonymGroups()){
- retainedGroups.add(group);
+ List<HomotypicalSynonymGroup> heterotypicSynonymGroups = taxonNameEditor.getHeterotypicSynonymGroups();
+
+ if (heterotypicSynonymGroups != null) {
+
+ for(HomotypicalSynonymGroup group : heterotypicSynonymGroups){
+ retainedGroups.add(group);
+ }
}
for(HomotypicalGroup homotypicalGroup : taxonNameEditor.getTaxon().getHeterotypicSynonymyGroups()){
}
- /**
- * @param taxonNameEditor
- */
- public static void createOrUpdateConceptGroup(
- TaxonNameEditor taxonNameEditor) {
- Set<TaxonRelationship> filteredTaxonRelations = new HashSet<TaxonRelationship>();
-
- for (TaxonRelationship relationship : taxonNameEditor.getTaxon().getTaxonRelations()) {
- if (! relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
- relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
- filteredTaxonRelations.add(relationship);
- }
- }
-
- if(! filteredTaxonRelations.isEmpty()){
- taxonNameEditor.setConceptGroup(new ConceptGroup(taxonNameEditor));
- }
- }
-
}