@Test public void testExtractNameFromClassification() { DefaultClassification classification = new DefaultClassification(); classification.setSubgenus("testSubGenus"); classification.setSpecificEpithet("argentatus"); classification.setInfraspecificEpithet("argentatus"); classification.setGenus("Larus"); ScientificName actual = TransformUtil.extractNameFromClassification(classification); assertNotNull(actual); assertEquals("01","testSubGenus", actual.getSubgenus()); assertEquals("02","argentatus", actual.getSpecificEpithet()); assertEquals("03","argentatus", actual.getInfraspecificEpithet()); assertEquals("04","Larus", actual.getGenusOrMonomial()); }
public static ScientificName extractNameFromClassification(DefaultClassification dc) { ScientificName sn = new ScientificName(); sn.setGenusOrMonomial(dc.getGenus()); sn.setSubgenus(dc.getSubgenus()); sn.setSpecificEpithet(dc.getSpecificEpithet()); sn.setInfraspecificEpithet(dc.getInfraspecificEpithet()); return sn; }
TransformUtil { public static ScientificName extractNameFromClassification(DefaultClassification dc) { ScientificName sn = new ScientificName(); sn.setGenusOrMonomial(dc.getGenus()); sn.setSubgenus(dc.getSubgenus()); sn.setSpecificEpithet(dc.getSpecificEpithet()); sn.setInfraspecificEpithet(dc.getInfraspecificEpithet()); return sn; } }
TransformUtil { public static ScientificName extractNameFromClassification(DefaultClassification dc) { ScientificName sn = new ScientificName(); sn.setGenusOrMonomial(dc.getGenus()); sn.setSubgenus(dc.getSubgenus()); sn.setSpecificEpithet(dc.getSpecificEpithet()); sn.setInfraspecificEpithet(dc.getInfraspecificEpithet()); return sn; }  }
TransformUtil { public static ScientificName extractNameFromClassification(DefaultClassification dc) { ScientificName sn = new ScientificName(); sn.setGenusOrMonomial(dc.getGenus()); sn.setSubgenus(dc.getSubgenus()); sn.setSpecificEpithet(dc.getSpecificEpithet()); sn.setInfraspecificEpithet(dc.getInfraspecificEpithet()); return sn; }  static void setScientificNameGroup(ScientificName sn); static DefaultClassification extractClassificiationFromName(ScientificName sn); static List<Monomial> getMonomialsInName(ScientificName sn); static ScientificName extractNameFromClassification(DefaultClassification dc); static void equalizeNameComponents(Taxon taxon); static void equalizeNameComponents(Specimen specimen); static void equalizeNameComponents(MultiMediaObject mmo); static void sortIdentificationsPreferredFirst(Specimen specimen); static List<Monomial> getSystemClassification(Element elem, ScientificName sn); static String guessMimeType(String imageUrl); }
TransformUtil { public static ScientificName extractNameFromClassification(DefaultClassification dc) { ScientificName sn = new ScientificName(); sn.setGenusOrMonomial(dc.getGenus()); sn.setSubgenus(dc.getSubgenus()); sn.setSpecificEpithet(dc.getSpecificEpithet()); sn.setInfraspecificEpithet(dc.getInfraspecificEpithet()); return sn; }  static void setScientificNameGroup(ScientificName sn); static DefaultClassification extractClassificiationFromName(ScientificName sn); static List<Monomial> getMonomialsInName(ScientificName sn); static ScientificName extractNameFromClassification(DefaultClassification dc); static void equalizeNameComponents(Taxon taxon); static void equalizeNameComponents(Specimen specimen); static void equalizeNameComponents(MultiMediaObject mmo); static void sortIdentificationsPreferredFirst(Specimen specimen); static List<Monomial> getSystemClassification(Element elem, ScientificName sn); static String guessMimeType(String imageUrl);  }