@Test public void testCollectingReferencesFromSynonyms() { Reference nameReference = new Reference(); Reference descriptionReference = new Reference(); Description description = new Description(); Taxon synonym = new Taxon(); description.setReferences(ImmutableSet.<Reference>of(descriptionReference)); synonym.setTaxonomicStatus(TaxonomicStatus.Synonym); synonym.setReferences(ImmutableSet.<Reference>of(nameReference)); synonym.setDescriptions(ImmutableSet.<Description>of(description)); taxon.setSynonymNameUsages(ImmutableSet.<Taxon>of(synonym)); Bibliography bib = new Bibliography(taxon); assertEquals("accepted name should have description reference from synonym", 1, bib.getLiturature().size()); assertEquals(descriptionReference, Iterators.getOnlyElement(bib.getLiturature().get("Literature").iterator())); }
public Map<String, SortedSet<Reference>> getLiturature() { return liturature; }
Bibliography { public Map<String, SortedSet<Reference>> getLiturature() { return liturature; } }
Bibliography { public Map<String, SortedSet<Reference>> getLiturature() { return liturature; } Bibliography(Taxon taxon); }
Bibliography { public Map<String, SortedSet<Reference>> getLiturature() { return liturature; } Bibliography(Taxon taxon); Map<String, SortedSet<Reference>> getLiturature(); String getLituratureJSON(); Set<Reference> getAccepted(); String getAcceptedJSON(); Set<Reference> getNotAccepted(); String getNotAcceptedJSON(); String toString(); String serializeToJSON(Object obj); boolean isEmpty(); boolean hasReferences(); }
Bibliography { public Map<String, SortedSet<Reference>> getLiturature() { return liturature; } Bibliography(Taxon taxon); Map<String, SortedSet<Reference>> getLiturature(); String getLituratureJSON(); Set<Reference> getAccepted(); String getAcceptedJSON(); Set<Reference> getNotAccepted(); String getNotAcceptedJSON(); String toString(); String serializeToJSON(Object obj); boolean isEmpty(); boolean hasReferences();  }