@Test public void parseQuietly() throws Exception { ParsedName pn = parser.parseQuietly("Navicula var. fasciata", Rank.VARIETY); assertNull(pn.getSpecificEpithet()); assertEquals(NameType.INFORMAL, pn.getType()); assertEquals("Abies alba", parser.parseQuietly("Abies alba Mill.").canonicalName()); pn = parser.parseQuietly("Abies alba x Pinus graecus L."); assertEquals("Abies alba x Pinus graecus L.", pn.getScientificName()); assertEquals(NameType.HYBRID, pn.getType()); assertNull(pn.getGenusOrAbove()); assertFalse(parser.parseQuietly("Protoscenium simplex (Cleve, 1899), Jørgensen, 1905 ", Rank.SPECIES).isParsedPartially()); assertFalse(parser.parseQuietly("Plagiacanthidae", Rank.SPECIES).isParsedPartially()); pn = parser.parseQuietly("Plagiacanthidae WhatTheHeck @%&/ (please dont parse me[ he?5789])", Rank.SPECIES); assertTrue(pn.isParsed()); assertTrue(pn.isParsedPartially()); assertEquals("Plagiacanthidae", pn.getGenusOrAbove()); }
@Override public ParsedName parseQuietly(String scientificName, @Nullable Rank rank) { ParsedName p; try { p = parse(scientificName, rank); } catch (UnparsableException e) { p = new ParsedName(); p.setScientificName(scientificName); p.setRank(rank); p.setType(e.type); p.setParsed(false); p.setParsedPartially(false); } return p; }
NameParserGbifV1 implements NameParser { @Override public ParsedName parseQuietly(String scientificName, @Nullable Rank rank) { ParsedName p; try { p = parse(scientificName, rank); } catch (UnparsableException e) { p = new ParsedName(); p.setScientificName(scientificName); p.setRank(rank); p.setType(e.type); p.setParsed(false); p.setParsedPartially(false); } return p; } }
NameParserGbifV1 implements NameParser { @Override public ParsedName parseQuietly(String scientificName, @Nullable Rank rank) { ParsedName p; try { p = parse(scientificName, rank); } catch (UnparsableException e) { p = new ParsedName(); p.setScientificName(scientificName); p.setRank(rank); p.setType(e.type); p.setParsed(false); p.setParsedPartially(false); } return p; } NameParserGbifV1();  NameParserGbifV1(long timeout);  NameParserGbifV1(org.gbif.nameparser.api.NameParser parser); }
NameParserGbifV1 implements NameParser { @Override public ParsedName parseQuietly(String scientificName, @Nullable Rank rank) { ParsedName p; try { p = parse(scientificName, rank); } catch (UnparsableException e) { p = new ParsedName(); p.setScientificName(scientificName); p.setRank(rank); p.setType(e.type); p.setParsed(false); p.setParsedPartially(false); } return p; } NameParserGbifV1();  NameParserGbifV1(long timeout);  NameParserGbifV1(org.gbif.nameparser.api.NameParser parser); @Override ParsedName parse(String s, @Nullable Rank rank); @Override ParsedName parse(String scientificName); @Override ParsedName parseQuietly(String scientificName, @Nullable Rank rank); @Override ParsedName parseQuietly(String scientificName); @Override // parses the name without authorship and returns the ParsedName.canonicalName() string String parseToCanonical(String scientificName, @Nullable Rank rank); @Override String parseToCanonical(String scientificName); String parseToCanonicalOrScientificName(String scientificName); String parseToCanonicalOrScientificName(String scientificName, @Nullable Rank rank); }
NameParserGbifV1 implements NameParser { @Override public ParsedName parseQuietly(String scientificName, @Nullable Rank rank) { ParsedName p; try { p = parse(scientificName, rank); } catch (UnparsableException e) { p = new ParsedName(); p.setScientificName(scientificName); p.setRank(rank); p.setType(e.type); p.setParsed(false); p.setParsedPartially(false); } return p; } NameParserGbifV1();  NameParserGbifV1(long timeout);  NameParserGbifV1(org.gbif.nameparser.api.NameParser parser); @Override ParsedName parse(String s, @Nullable Rank rank); @Override ParsedName parse(String scientificName); @Override ParsedName parseQuietly(String scientificName, @Nullable Rank rank); @Override ParsedName parseQuietly(String scientificName); @Override // parses the name without authorship and returns the ParsedName.canonicalName() string String parseToCanonical(String scientificName, @Nullable Rank rank); @Override String parseToCanonical(String scientificName); String parseToCanonicalOrScientificName(String scientificName); String parseToCanonicalOrScientificName(String scientificName, @Nullable Rank rank);  }