Simplified parser API and deleted undesired methods
authorn.hoffmann <n.hoffmann@localhost>
Tue, 1 Sep 2009 14:35:32 +0000 (14:35 +0000)
committern.hoffmann <n.hoffmann@localhost>
Tue, 1 Sep 2009 14:35:32 +0000 (14:35 +0000)
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/parser/CdmParserUtil.java

index c8edf73fd6105e47559b459ba4577594931a83a8..0b8accae37feabcde9f6c2795d4454c564cc8457 100644 (file)
@@ -40,39 +40,9 @@ public class CdmParserUtil {
        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
@@ -90,28 +60,13 @@ public class CdmParserUtil {
                \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