From: cmzmasek@gmail.com Date: Tue, 26 Nov 2013 01:08:38 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=92efbf3f36c205c03cdb7a542f0d2ab1ea7fdc2a;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java index 1bcbc60..619e8f6 100644 --- a/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java @@ -35,8 +35,9 @@ public class AdjactantDirectedBinaryDomainCombination extends BasicBinaryDomainC if ( ( n_terminal == null ) || ( c_terminal == null ) ) { throw new IllegalArgumentException( "attempt to create binary domain combination using null" ); } - _id0 = n_terminal; - _id1 = c_terminal; + // _id0 = n_terminal; + // _id1 = c_terminal; + _data = n_terminal + SEPARATOR + c_terminal; } public static AdjactantDirectedBinaryDomainCombination createInstance( final String ids ) { diff --git a/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java index 518c32e..350c2e9 100644 --- a/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java @@ -31,27 +31,30 @@ import org.forester.util.ForesterUtil; public class BasicBinaryDomainCombination implements BinaryDomainCombination { - String _id0; - String _id1; - String _str; + // String _id0; + // String _id1; + String _data; public BasicBinaryDomainCombination( final String id0, final String id1 ) { if ( ( id0 == null ) || ( id1 == null ) ) { throw new IllegalArgumentException( "attempt to create binary domain combination using null" ); } if ( id0.toLowerCase().compareTo( id1.toLowerCase() ) < 0 ) { - _id0 = id0; - _id1 = id1; + // _id0 = id0; + // _id1 = id1; + _data = id0 + SEPARATOR + id1; } else { - _id0 = id1; - _id1 = id0; + // _id0 = id1; + // _id1 = id0; + _data = id1 + SEPARATOR + id0; } } BasicBinaryDomainCombination() { - _id0 = null; - _id1 = null; + //_id0 = null; + // _id1 = null; + _data = null; } @Override @@ -92,12 +95,14 @@ public class BasicBinaryDomainCombination implements BinaryDomainCombination { @Override public String getId0() { - return _id0; + return _data.substring( 0, _data.indexOf( SEPARATOR ) ); + // return _id0; } @Override public String getId1() { - return _id1; + return _data.substring( _data.indexOf( SEPARATOR ) + 1 ); + //return _id1; } @Override @@ -155,7 +160,8 @@ public class BasicBinaryDomainCombination implements BinaryDomainCombination { } private String getAsStr() { - return _id0 + SEPARATOR + _id1; + // return _id0 + SEPARATOR + _id1; + return _data; } public static BinaryDomainCombination createInstance( final String ids ) { diff --git a/forester/java/src/org/forester/surfacing/DirectedBinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/DirectedBinaryDomainCombination.java index 4716be8..dac4464 100644 --- a/forester/java/src/org/forester/surfacing/DirectedBinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/DirectedBinaryDomainCombination.java @@ -35,8 +35,9 @@ public class DirectedBinaryDomainCombination extends BasicBinaryDomainCombinatio if ( ( n_terminal == null ) || ( c_terminal == null ) ) { throw new IllegalArgumentException( "attempt to create binary domain combination using null" ); } - _id0 = n_terminal; - _id1 = c_terminal; + //_id0 = n_terminal; + //_id1 = c_terminal; + _data = n_terminal + SEPARATOR + c_terminal; } public static BinaryDomainCombination createInstance( final String ids ) { diff --git a/forester/java/src/org/forester/test/Test.java b/forester/java/src/org/forester/test/Test.java index fc210a5..b1a9cd1 100644 --- a/forester/java/src/org/forester/test/Test.java +++ b/forester/java/src/org/forester/test/Test.java @@ -127,7 +127,7 @@ import org.forester.ws.wabi.TxSearch.TAX_RANK; @SuppressWarnings( "unused") public final class Test { - private final static boolean PERFORM_DB_TESTS = true; + private final static boolean PERFORM_DB_TESTS = false; private final static double ZERO_DIFF = 1.0E-9; private final static String PATH_TO_TEST_DATA = System.getProperty( "user.dir" ) + ForesterUtil.getFileSeparator() + "test_data"