version 0.9910 beta
[jalview.git] / forester / java / src / org / forester / phylogeny / data / Taxonomy.java
index 26ed940..4a333a2 100644 (file)
@@ -253,7 +253,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
     }
 
     /**
-     * 
+     *
      * If this and taxonomy 'data' has an identifier, comparison will be based on that.
      * Otherwise,  if this and taxonomy 'data' has a code, comparison will be based on that.
      * Otherwise,  if Taxonomy 'data' has a scientific name, comparison will be
@@ -261,7 +261,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
      * Otherwise,  if Taxonomy 'data' has a common  name, comparison will be
      * based on that (case insensitive!).
      * (Note. This is important and should not be change without a very good reason.)
-     * 
+     *
      */
     @Override
     public boolean isEqual( final PhylogenyData data ) {
@@ -318,11 +318,21 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
         _synonyms = synonyms;
     }
 
-    public void setTaxonomyCode( final String taxonomy_code ) throws PhyloXmlDataFormatException {
+    public void setTaxonomyCode( String taxonomy_code ) throws PhyloXmlDataFormatException {
         if ( !ForesterUtil.isEmpty( taxonomy_code )
                 && !PhyloXmlUtil.TAXOMONY_CODE_PATTERN.matcher( taxonomy_code ).matches() ) {
             throw new PhyloXmlDataFormatException( "illegal taxonomy code: [" + taxonomy_code + "]" );
         }
+        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        //TODO FIXME (added on 13-11-18) remove me eventually
+        if ( taxonomy_code.equals( "ACIBL" ) ) {
+            taxonomy_code = "KORVE";
+        }
+        else if ( taxonomy_code.equals( "PYRKO" ) ) {
+            taxonomy_code = "THEKO";
+        }
+        //TODO FIXME (added on 13-11-18) remove me eventually
+        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         _taxonomy_code = taxonomy_code;
     }
 
@@ -382,7 +392,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
         }
         if ( !ForesterUtil.isEmpty( getCommonName() ) ) {
             PhylogenyDataUtil
-                    .appendElement( writer, PhyloXmlMapping.TAXONOMY_COMMON_NAME, getCommonName(), indentation );
+            .appendElement( writer, PhyloXmlMapping.TAXONOMY_COMMON_NAME, getCommonName(), indentation );
         }
         if ( _synonyms != null ) {
             for( final String syn : getSynonyms() ) {