From: cmzmasek@gmail.com Date: Thu, 8 Dec 2011 16:03:53 +0000 (+0000) Subject: in progress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2ae595537adc997e493ff35f5ab5d2e80709bac2;p=jalview.git in progress --- diff --git a/forester/java/src/org/forester/application/surfacing.java b/forester/java/src/org/forester/application/surfacing.java index fee80e0..0e6ad5f 100644 --- a/forester/java/src/org/forester/application/surfacing.java +++ b/forester/java/src/org/forester/application/surfacing.java @@ -233,7 +233,7 @@ public class surfacing { final static private String SEQ_EXTRACT_OPTION = "prot_extract"; final static private char SEPARATOR_FOR_INPUT_VALUES = '#'; final static private String PRG_VERSION = "2.210"; - final static private String PRG_DATE = "2011.11.25"; + final static private String PRG_DATE = "2011.11.30"; final static private String E_MAIL = "czmasek@burnham.org"; final static private String WWW = "www.phylosoft.org/forester/applications/surfacing"; final static private boolean IGNORE_DUFS_DEFAULT = true; diff --git a/forester/java/src/org/forester/phylogeny/data/Accession.java b/forester/java/src/org/forester/phylogeny/data/Accession.java index c2b4435..3a565ab 100644 --- a/forester/java/src/org/forester/phylogeny/data/Accession.java +++ b/forester/java/src/org/forester/phylogeny/data/Accession.java @@ -32,14 +32,21 @@ import org.forester.io.parsers.nhx.NHXtags; import org.forester.io.parsers.phyloxml.PhyloXmlMapping; import org.forester.util.ForesterUtil; -public class Accession implements PhylogenyData { +public final class Accession implements PhylogenyData { - final String _value; - final String _source; + final private String _value; + final private String _source; + final private String _value_source; public Accession( final String value, final String source ) { _value = value; _source = source; + if ( source != null ) { + _value_source = value + source; + } + else { + _value_source = value; + } } @Override @@ -91,10 +98,10 @@ public class Accession implements PhylogenyData { @Override public int hashCode() { - if ( getSource() != null ) { - return ( getSource() + getValue() ).hashCode(); - } - return getValue().hashCode(); + //if ( getSource() != null ) { + // return ( getSource() + getValue() ).hashCode(); + // } + return _value_source.hashCode(); } @Override diff --git a/forester/java/src/org/forester/phylogeny/data/Identifier.java b/forester/java/src/org/forester/phylogeny/data/Identifier.java index 62dc722..cd58bad 100644 --- a/forester/java/src/org/forester/phylogeny/data/Identifier.java +++ b/forester/java/src/org/forester/phylogeny/data/Identifier.java @@ -32,24 +32,33 @@ import org.forester.io.parsers.nhx.NHXtags; import org.forester.io.parsers.phyloxml.PhyloXmlMapping; import org.forester.util.ForesterUtil; -public class Identifier implements PhylogenyData { +public final class Identifier implements PhylogenyData { - final String _value; - final String _provider; + final private String _value; + final private String _provider; + final private String _value_provider; public Identifier() { _value = ""; _provider = ""; + _value_provider = ""; } public Identifier( final String value ) { _value = value; _provider = ""; + _value_provider = value; } public Identifier( final String value, final String provider ) { _value = value; _provider = provider; + if ( provider != null ) { + _value_provider = value + provider; + } + else { + _value_provider = value; + } } @Override @@ -101,10 +110,7 @@ public class Identifier implements PhylogenyData { @Override public int hashCode() { - if ( getProvider() != null ) { - return ( getProvider() + getValue() ).hashCode(); - } - return getValue().hashCode(); + return _value_provider.hashCode(); } @Override diff --git a/forester/java/src/org/forester/surfacing/SurfacingUtil.java b/forester/java/src/org/forester/surfacing/SurfacingUtil.java index 862621a..d3e8c0a 100644 --- a/forester/java/src/org/forester/surfacing/SurfacingUtil.java +++ b/forester/java/src/org/forester/surfacing/SurfacingUtil.java @@ -241,7 +241,7 @@ public final class SurfacingUtil { final SortedMap lca_ancestor_species_counts = new TreeMap(); for( final String dc : more_than_once ) { final List nodes = new ArrayList(); - for( final PhylogenyNodeIterator it = local_phylogeny_l.iteratorPostorder(); it.hasNext(); ) { + for( final PhylogenyNodeIterator it = local_phylogeny_l.iteratorExternalForward(); it.hasNext(); ) { final PhylogenyNode n = it.next(); if ( n.getNodeData().getBinaryCharacters().getGainedCharacters().contains( dc ) ) { nodes.add( n );