in progress...
authorcmzmasek <cmzmasek@yahoo.com>
Fri, 10 Feb 2017 19:32:12 +0000 (11:32 -0800)
committercmzmasek <cmzmasek@yahoo.com>
Fri, 10 Feb 2017 19:32:12 +0000 (11:32 -0800)
forester/java/src/org/forester/archaeopteryx/AptxConstants.java
forester/java/src/org/forester/archaeopteryx/MainFrame.java
forester/java/src/org/forester/io/parsers/util/ParserUtils.java
forester/java/src/org/forester/phylogeny/data/Taxonomy.java

index 2a9a3e0..f1547ac 100644 (file)
@@ -68,6 +68,7 @@ public final class AptxConstants {
     static final int            MAX_TREES_TO_LOAD                                             = 100;
     final static float          PDF_LINE_WIDTH_DEFAULT                                        = 0.5f;
     final static String         APTX_WEB_SITE                                                 = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx";
+    final static String         APTX_JS_WEB_SITE                                              = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx-js";
     final static String         APTX_MAILING_LIST                                             = "https://groups.google.com/forum/?fromgroups#!forum/archaeopteryx";
     final static String         APTX_DOC_SITE                                                 = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/documentation";
     final static String         PHYLOXML_WEB_SITE                                             = ForesterConstants.PHYLO_XML_LOCATION;
index d0a8d90..6a2f4a1 100644 (file)
@@ -273,6 +273,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     JMenuItem                        _about_item;
     JMenuItem                        _help_item;
     JMenuItem                        _website_item;
+    JMenuItem                        _aptxjs_website_item;
     JMenuItem                        _mailing_list_item;
     JMenuItem                        _phyloxml_website_item;
     JMenuItem                        _phyloxml_ref_item;
@@ -613,6 +614,14 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );
             }
         }
+        else if ( o == _aptxjs_website_item ) {
+            try {
+                AptxUtil.openWebsite( AptxConstants.APTX_JS_WEB_SITE);;
+            }
+            catch ( final IOException e1 ) {
+                ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );
+            }
+        }
         else if ( o == _mailing_list_item ) {
             try {
                 AptxUtil.openWebsite( AptxConstants.APTX_MAILING_LIST );
@@ -1180,6 +1189,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         _help_jmenu.add( _help_item = new JMenuItem( "Documentation" ) );
         _help_jmenu.addSeparator();
         _help_jmenu.add( _website_item = new JMenuItem( "Archaeopteryx Home" ) );
+        _help_jmenu.add( _aptxjs_website_item = new JMenuItem( "NEW! Archaeopteryx online version: Archaeopteryx.js" ) );
         _help_jmenu.add( _mailing_list_item = new JMenuItem( "Mailing List" ) );
         _aptx_ref_item = new JMenuItem( "Archaeopteryx Reference" ); //TODO need to add this...
         _help_jmenu.add( _phyloxml_website_item = new JMenuItem( "phyloXML Home" ) );
@@ -1188,6 +1198,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         _help_jmenu.add( _about_item = new JMenuItem( "About" ) );
         customizeJMenuItem( _help_item );
         customizeJMenuItem( _website_item );
+        customizeJMenuItem( _aptxjs_website_item );
         customizeJMenuItem( _mailing_list_item );
         customizeJMenuItem( _phyloxml_website_item );
         customizeJMenuItem( _aptx_ref_item );
index 0e16d86..b278cb9 100644 (file)
@@ -56,8 +56,8 @@ import org.forester.util.ForesterUtil;
 public final class ParserUtils {
 
     final private static String  SN_BN                                = "[A-Z][a-z]{2,30}[_ ][a-z]{3,30}";
-    final public static String   TAX_CODE                             = "(?:[A-Z9][A-Z]{2}[A-Z0-9]{2})|RAT|PIG|PEA";
-    final public static String   TAX_CODE_LO                          = "(?:[A-Z]{5})|RAT|PIG|PEA";
+    final public static String   TAX_CODE                             = "(?:[A-Z9][A-Z]{2}[A-Z0-9]{2})|RAT|PIG|PEA|(?:[A-Z1-9]{4})";
+    final public static String   TAX_CODE_LO                          = "(?:[A-Z]{5})|RAT|PIG|PEA|(?:[A-Z1-9]{4})";
     final public static Pattern  TAXOMONY_CODE_PATTERN_A              = Pattern.compile( "(?:\\b|_)(" + TAX_CODE
                                                                                          + ")(?:\\b|_)" );
     final public static Pattern  TAXOMONY_CODE_PATTERN_A_LO           = Pattern.compile( "_(" + TAX_CODE_LO
index 117f831..24846e4 100644 (file)
@@ -324,16 +324,6 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
                 && !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;
     }