本文整理汇总了Java中org.gbif.api.model.checklistbank.ParsedName.setParsed方法的典型用法代码示例。如果您正苦于以下问题:Java ParsedName.setParsed方法的具体用法?Java ParsedName.setParsed怎么用?Java ParsedName.setParsed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gbif.api.model.checklistbank.ParsedName
的用法示例。
在下文中一共展示了ParsedName.setParsed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCompareUnparsedAuthor
import org.gbif.api.model.checklistbank.ParsedName; //导入方法依赖的package包/类
@Test
public void testCompareUnparsedAuthor() throws Exception {
ParsedName p1 = new ParsedName();
p1.setScientificName("Platanus x hispanica Mill. ex Münch., 1770");
p1.setGenusOrAbove("Platanus");
p1.setSpecificEpithet("hispanica");
p1.setNotho(NamePart.SPECIFIC);
p1.setParsed(false);
ParsedName p2 = new ParsedName();
p2.setScientificName("Platanus hispanica Mill. ex Münch.");
p2.setGenusOrAbove("Platanus");
p2.setSpecificEpithet("hispanica");
p2.setNotho(NamePart.SPECIFIC);
p2.setAuthorship("Mill. ex Münch.");
p2.setParsed(true);
assertEquals(Equality.EQUAL, comp.compare(p1, p2));
}
示例2: testUnparsedAuthors
import org.gbif.api.model.checklistbank.ParsedName; //导入方法依赖的package包/类
@Test
public void testUnparsedAuthors() throws Exception {
ParsedName p3 = new ParsedName();
p3.setParsed(false);
p3.setScientificName("Blattaria Voet, ?, 1806");
p3.setGenusOrAbove("Blattaria");
ParsedName p4 = new ParsedName();
p4.setScientificName("Blattaria Weyenbergh, 1874");
p4.setAuthorship("Weyenbergh");
p4.setYear("1874");
assertEquals(Equality.DIFFERENT, comp.compare(p3, p4));
p4.setYear("1806");
assertEquals(Equality.EQUAL, comp.compare(p3, p4));
}
示例3: scientificName
import org.gbif.api.model.checklistbank.ParsedName; //导入方法依赖的package包/类
@Test
public void scientificName() throws Exception {
final String UNPARSED_NAME = "A real unparsed name X73a";
ParsedName n = new ParsedName();
n.setType(NameType.SCIENTIFIC);
n.setScientificName(UNPARSED_NAME);
n.setGenusOrAbove("Abies");
n.setAuthorship("L.");
n.setYear("1888");
n.setBracketAuthorship("Carl.");
n.setRank(Rank.GENUS);
assertAllButVirus("Abies (Carl.) L., 1888", n);
n.setRank(Rank.SPECIES);
assertAllButVirus("Abies spec.", n);
n.setSpecificEpithet("alba");
assertAllButVirus("Abies alba (Carl.) L., 1888", n);
n.setRank(Rank.SUBSPECIES);
assertAllButVirus("Abies alba subsp.", n);
n.setInfraSpecificEpithet("alpina");
final String expectedWithRank = "Abies alba subsp. alpina (Carl.) L., 1888";
assertAllAndZoo("Abies alba alpina (Carl.) L., 1888", expectedWithRank, n);
assertEquals("Abies alba alpina (Carl.) L., 1888", NameFormatter.scientificName(n, Kingdom.ANIMALIA));
assertEquals(expectedWithRank, NameFormatter.scientificName(n, Kingdom.PLANTAE));
n.setType(NameType.HYBRID);
assertEquals(expectedWithRank, NameFormatter.scientificName(n, NomenclaturalCode.BOTANICAL));
n.setType(NameType.VIRUS);
assertEquals(expectedWithRank, NameFormatter.scientificName(n, NomenclaturalCode.BOTANICAL));
n.setParsed(false);
assertEquals(UNPARSED_NAME, NameFormatter.scientificName(n, NomenclaturalCode.BOTANICAL));
n.setParsed(true);
n.setRank(Rank.INFRASPECIFIC_NAME);
assertAllButVirus("Abies alba alpina (Carl.) L., 1888", n);
assertEquals(UNPARSED_NAME, NameFormatter.scientificName(n, Kingdom.VIRUSES));
}