From 6cae9642ef306b0b807ebf25e7a981283db38b36 Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Fri, 10 Feb 2017 11:32:12 -0800 Subject: [PATCH] in progress... --- .../java/src/org/forester/archaeopteryx/AptxConstants.java | 1 + forester/java/src/org/forester/archaeopteryx/MainFrame.java | 11 +++++++++++ .../java/src/org/forester/io/parsers/util/ParserUtils.java | 4 ++-- forester/java/src/org/forester/phylogeny/data/Taxonomy.java | 10 ---------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/forester/java/src/org/forester/archaeopteryx/AptxConstants.java b/forester/java/src/org/forester/archaeopteryx/AptxConstants.java index 2a9a3e0..f1547ac 100644 --- a/forester/java/src/org/forester/archaeopteryx/AptxConstants.java +++ b/forester/java/src/org/forester/archaeopteryx/AptxConstants.java @@ -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; diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index d0a8d90..6a2f4a1 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -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 ); diff --git a/forester/java/src/org/forester/io/parsers/util/ParserUtils.java b/forester/java/src/org/forester/io/parsers/util/ParserUtils.java index 0e16d86..b278cb9 100644 --- a/forester/java/src/org/forester/io/parsers/util/ParserUtils.java +++ b/forester/java/src/org/forester/io/parsers/util/ParserUtils.java @@ -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 diff --git a/forester/java/src/org/forester/phylogeny/data/Taxonomy.java b/forester/java/src/org/forester/phylogeny/data/Taxonomy.java index 117f831..24846e4 100644 --- a/forester/java/src/org/forester/phylogeny/data/Taxonomy.java +++ b/forester/java/src/org/forester/phylogeny/data/Taxonomy.java @@ -324,16 +324,6 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable