public static void clearNonViralNameParser() {\r
nonViralNameParser = null;\r
}\r
-\r
\r
/**\r
- * Takes a raw string, returns a brand spanking new name object.\r
- * \r
- * Will take the nomenclatural code, that is currently set in preferences\r
- * \r
- * @param fullReference\r
- * @return\r
- */\r
- @Deprecated\r
- public static TaxonNameBase parseFullReference(String fullReference) {\r
- \r
- NomenclaturalCode nomCode = PreferencesUtil.getPreferredNomenclaturalCode();\r
- \r
- \r
- TaxonNameBase name = getNonViralNameParser().parseReferencedName(fullReference,\r
- nomCode, null);\r
-\r
- if (name.hasProblem()) {\r
- name.setFullTitleCache(fullReference);\r
- }\r
- \r
- return name;\r
- }\r
- \r
- public static TaxonNameBase createEmptyName(){\r
- return getNonViralNameParser().parseReferencedName("",\r
- PreferencesUtil.getPreferredNomenclaturalCode(), null);\r
- }\r
- \r
- /**\r
- * Desired method\r
+ * Tries to create a taxonomic name from a given string\r
* \r
* @param unparsedNameString\r
* @param rank\r
\r
return name;\r
}\r
-\r
- /**\r
- * Takes an existing name object and a string, returns the same name\r
- * object with the fields parsed from the string.\r
- * \r
- * @param nameToBeFilled \r
- * an existing name object\r
- * @param fullReference \r
- * the string containing the scientific name with authorship, year, reference etc. \r
- * @return\r
- * the parsed name\r
- */\r
- @Deprecated\r
- public static void parseFullReference(NonViralName nameToBeFilled, String fullReference) {\r
- \r
-\r
- getNonViralNameParser().parseReferencedName(nameToBeFilled, fullReference, nameToBeFilled.getRank(), true);\r
- \r
- if (nameToBeFilled.hasProblem()) {\r
- nameToBeFilled.setFullTitleCache(fullReference);\r
- }\r
-\r
+ \r
+ public static TaxonNameBase parseReferencedName(String unparsedNameString){\r
+ return parseReferencedName(unparsedNameString, null);\r
+ }\r
+ \r
+ public static TaxonNameBase createEmptyName(){\r
+ return parseReferencedName(null);\r
}\r
\r
}\r