From d7fb99d4bd919ff8489433bcf143e192a4067beb Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Wed, 2 Nov 2011 11:39:06 +0000 Subject: [PATCH] Fix bug in category class and use Jim's test as a test case git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4703 e3abac25-378b-4346-85de-24260fe3988d --- testsrc/compbio/data/msa/CategoryTester.java | 64 +++++++++++++ webservices/compbio/data/msa/Category.java | 10 +- .../compbio/ws/server/resource/AAConWS.wsdl | 100 ++++++++++---------- .../compbio/ws/server/resource/AAConWS_schema1.xsd | 34 +++---- .../compbio/ws/server/resource/ClustalWS.wsdl | 96 +++++++++---------- .../ws/server/resource/ClustalWS_schema1.xsd | 52 +++++----- .../compbio/ws/server/resource/DisemblWS.wsdl | 100 ++++++++++---------- .../ws/server/resource/DisemblWS_schema1.xsd | 34 +++---- .../compbio/ws/server/resource/GlobPlotWS.wsdl | 100 ++++++++++---------- .../ws/server/resource/GlobPlotWS_schema1.xsd | 34 +++---- .../compbio/ws/server/resource/IUPredWS.wsdl | 100 ++++++++++---------- .../ws/server/resource/IUPredWS_schema1.xsd | 52 +++++----- .../compbio/ws/server/resource/JronnWS.wsdl | 100 ++++++++++---------- .../compbio/ws/server/resource/JronnWS_schema1.xsd | 34 +++---- .../compbio/ws/server/resource/MafftWS.wsdl | 96 +++++++++---------- .../compbio/ws/server/resource/MafftWS_schema1.xsd | 52 +++++----- .../compbio/ws/server/resource/MuscleWS.wsdl | 96 +++++++++---------- .../ws/server/resource/MuscleWS_schema1.xsd | 52 +++++----- .../compbio/ws/server/resource/TcoffeeWS.wsdl | 96 +++++++++---------- .../ws/server/resource/TcoffeeWS_schema1.xsd | 52 +++++----- 20 files changed, 709 insertions(+), 645 deletions(-) create mode 100644 testsrc/compbio/data/msa/CategoryTester.java diff --git a/testsrc/compbio/data/msa/CategoryTester.java b/testsrc/compbio/data/msa/CategoryTester.java new file mode 100644 index 0000000..24abf13 --- /dev/null +++ b/testsrc/compbio/data/msa/CategoryTester.java @@ -0,0 +1,64 @@ +package compbio.data.msa; + +import java.net.ConnectException; +import java.util.Set; + +import javax.xml.ws.WebServiceException; + +import org.testng.Assert; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import compbio.ws.client.Jws2Client; +import compbio.ws.client.Services; + +public class CategoryTester { + + // test category membership from string constants + compbio.data.msa.RegistryWS registry = null; + + @BeforeTest + public void setupTest() { + try { + /* + * registry = Jws2Client .connectToRegistry( + * "http://webserv1.cluster.lifesci.dundee.ac.uk:8089/jaba"); + */ + registry = Jws2Client + .connectToRegistry("http://localhost:8080/jabaws"); + } catch (ConnectException e) { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } catch (WebServiceException e) { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } + + } + @Test + public void categoryTest() { + Set servicecategories = registry.getServiceCategories(); + + boolean found = false; + for (Category svccategory : servicecategories) { + + Set catservices; + + for (String category : new String[]{Category.CATEGORY_ALIGNMENT, + Category.CATEGORY_CONSERVATION, Category.CATEGORY_DISORDER}) { + if (category.equals(svccategory.name)) { + found = true; + catservices = svccategory.getServices(); + System.out.println("Found " + catservices.size() + + " services in category " + category + + "(service category string " + svccategory + ")"); + } + } + } + if (!found) { + throw new Error( + "Could not match any category to one of the given category constants"); + } + } + +} diff --git a/webservices/compbio/data/msa/Category.java b/webservices/compbio/data/msa/Category.java index db9bbfd..05e6873 100644 --- a/webservices/compbio/data/msa/Category.java +++ b/webservices/compbio/data/msa/Category.java @@ -66,14 +66,14 @@ public class Category { Category alignment = new Category(CATEGORY_ALIGNMENT, align_services); Set disorder_services = new HashSet(); - align_services.add(Services.DisemblWS); - align_services.add(Services.GlobPlotWS); - align_services.add(Services.IUPredWS); - align_services.add(Services.JronnWS); + disorder_services.add(Services.DisemblWS); + disorder_services.add(Services.GlobPlotWS); + disorder_services.add(Services.IUPredWS); + disorder_services.add(Services.JronnWS); Category disorder = new Category(CATEGORY_DISORDER, disorder_services); Set conservation_services = new HashSet(); - align_services.add(Services.AAConWS); + conservation_services.add(Services.AAConWS); Category conservation = new Category(CATEGORY_CONSERVATION, conservation_services); diff --git a/webservices/compbio/ws/server/resource/AAConWS.wsdl b/webservices/compbio/ws/server/resource/AAConWS.wsdl index b02eaf9..8ff9829 100644 --- a/webservices/compbio/ws/server/resource/AAConWS.wsdl +++ b/webservices/compbio/ws/server/resource/AAConWS.wsdl @@ -6,15 +6,6 @@ - - - - - - - - - @@ -45,11 +36,14 @@ - - + + - - + + + + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,18 +81,13 @@ - - + + - - + + - - - - - @@ -116,14 +111,19 @@ - - - + + + + + + + + @@ -132,33 +132,21 @@ - - - + + + - - - + + + - - - - - - - - - - - - @@ -219,7 +207,7 @@ - + @@ -227,6 +215,9 @@ + + + @@ -237,6 +228,15 @@ + + + + + + + + + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/AAConWS_schema1.xsd b/webservices/compbio/ws/server/resource/AAConWS_schema1.xsd index 6f34ece..99b9b4d 100644 --- a/webservices/compbio/ws/server/resource/AAConWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/AAConWS_schema1.xsd @@ -255,23 +255,6 @@ - - - - - - - - - - - - - - - - - @@ -298,6 +281,23 @@ + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/ClustalWS.wsdl b/webservices/compbio/ws/server/resource/ClustalWS.wsdl index 61508ac..d317bac 100644 --- a/webservices/compbio/ws/server/resource/ClustalWS.wsdl +++ b/webservices/compbio/ws/server/resource/ClustalWS.wsdl @@ -15,11 +15,11 @@ - - + + - - + + @@ -30,12 +30,6 @@ - - - - - - @@ -45,11 +39,11 @@ - - + + - - + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,11 +81,11 @@ - - + + - - + + @@ -93,13 +93,6 @@ - - - - - - - @@ -116,14 +109,21 @@ - - - + + + + + + + + + + @@ -132,17 +132,17 @@ - - - + + + - - - + + + @@ -159,7 +159,7 @@ - + @@ -176,8 +176,11 @@ + + + - + @@ -198,7 +201,7 @@ - + @@ -215,11 +218,8 @@ - - - - + @@ -228,7 +228,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/ClustalWS_schema1.xsd b/webservices/compbio/ws/server/resource/ClustalWS_schema1.xsd index c432550..05f2a89 100644 --- a/webservices/compbio/ws/server/resource/ClustalWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/ClustalWS_schema1.xsd @@ -161,6 +161,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -192,32 +218,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices/compbio/ws/server/resource/DisemblWS.wsdl b/webservices/compbio/ws/server/resource/DisemblWS.wsdl index 0938649..b104a79 100644 --- a/webservices/compbio/ws/server/resource/DisemblWS.wsdl +++ b/webservices/compbio/ws/server/resource/DisemblWS.wsdl @@ -6,15 +6,6 @@ - - - - - - - - - @@ -45,11 +36,14 @@ - - + + - - + + + + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,18 +81,13 @@ - - + + - - + + - - - - - @@ -116,14 +111,19 @@ - - - + + + + + + + + @@ -132,33 +132,21 @@ - - - + + + - - - + + + - - - - - - - - - - - - @@ -219,7 +207,7 @@ - + @@ -227,6 +215,9 @@ + + + @@ -237,6 +228,15 @@ + + + + + + + + + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd b/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd index a03987f..84505eb 100644 --- a/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd @@ -262,23 +262,6 @@ - - - - - - - - - - - - - - - - - @@ -305,6 +288,23 @@ + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl b/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl index c85f5ae..dcdb4c3 100644 --- a/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl +++ b/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl @@ -6,15 +6,6 @@ - - - - - - - - - @@ -45,11 +36,14 @@ - - + + - - + + + + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,18 +81,13 @@ - - + + - - + + - - - - - @@ -116,14 +111,19 @@ - - - + + + + + + + + @@ -132,33 +132,21 @@ - - - + + + - - - + + + - - - - - - - - - - - - @@ -219,7 +207,7 @@ - + @@ -227,6 +215,9 @@ + + + @@ -237,6 +228,15 @@ + + + + + + + + + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd b/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd index d44ec86..4d1dc27 100644 --- a/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd @@ -275,23 +275,6 @@ - - - - - - - - - - - - - - - - - @@ -318,6 +301,23 @@ + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/IUPredWS.wsdl b/webservices/compbio/ws/server/resource/IUPredWS.wsdl index ddfde64..6e4b788 100644 --- a/webservices/compbio/ws/server/resource/IUPredWS.wsdl +++ b/webservices/compbio/ws/server/resource/IUPredWS.wsdl @@ -6,15 +6,6 @@ - - - - - - - - - @@ -45,11 +36,14 @@ - - + + - - + + + + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,18 +81,13 @@ - - + + - - + + - - - - - @@ -116,14 +111,19 @@ - - - + + + + + + + + @@ -132,33 +132,21 @@ - - - + + + - - - + + + - - - - - - - - - - - - @@ -219,7 +207,7 @@ - + @@ -227,6 +215,9 @@ + + + @@ -237,6 +228,15 @@ + + + + + + + + + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd b/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd index 73e9d98..9acf0a6 100644 --- a/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd @@ -248,6 +248,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -279,32 +305,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices/compbio/ws/server/resource/JronnWS.wsdl b/webservices/compbio/ws/server/resource/JronnWS.wsdl index b56cf06..19b70e5 100644 --- a/webservices/compbio/ws/server/resource/JronnWS.wsdl +++ b/webservices/compbio/ws/server/resource/JronnWS.wsdl @@ -6,15 +6,6 @@ - - - - - - - - - @@ -45,11 +36,14 @@ - - + + - - + + + + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,18 +81,13 @@ - - + + - - + + - - - - - @@ -116,14 +111,19 @@ - - - + + + + + + + + @@ -132,33 +132,21 @@ - - - + + + - - - + + + - - - - - - - - - - - - @@ -219,7 +207,7 @@ - + @@ -227,6 +215,9 @@ + + + @@ -237,6 +228,15 @@ + + + + + + + + + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/JronnWS_schema1.xsd b/webservices/compbio/ws/server/resource/JronnWS_schema1.xsd index 6f34ece..99b9b4d 100644 --- a/webservices/compbio/ws/server/resource/JronnWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/JronnWS_schema1.xsd @@ -255,23 +255,6 @@ - - - - - - - - - - - - - - - - - @@ -298,6 +281,23 @@ + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/MafftWS.wsdl b/webservices/compbio/ws/server/resource/MafftWS.wsdl index bebc64b..c7bfe2e 100644 --- a/webservices/compbio/ws/server/resource/MafftWS.wsdl +++ b/webservices/compbio/ws/server/resource/MafftWS.wsdl @@ -15,11 +15,11 @@ - - + + - - + + @@ -30,12 +30,6 @@ - - - - - - @@ -45,11 +39,11 @@ - - + + - - + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,11 +81,11 @@ - - + + - - + + @@ -93,13 +93,6 @@ - - - - - - - @@ -116,14 +109,21 @@ - - - + + + + + + + + + + @@ -132,17 +132,17 @@ - - - + + + - - - + + + @@ -159,7 +159,7 @@ - + @@ -176,8 +176,11 @@ + + + - + @@ -198,7 +201,7 @@ - + @@ -215,11 +218,8 @@ - - - - + @@ -228,7 +228,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/MafftWS_schema1.xsd b/webservices/compbio/ws/server/resource/MafftWS_schema1.xsd index c432550..05f2a89 100644 --- a/webservices/compbio/ws/server/resource/MafftWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/MafftWS_schema1.xsd @@ -161,6 +161,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -192,32 +218,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices/compbio/ws/server/resource/MuscleWS.wsdl b/webservices/compbio/ws/server/resource/MuscleWS.wsdl index 4f2af4f..867020c 100644 --- a/webservices/compbio/ws/server/resource/MuscleWS.wsdl +++ b/webservices/compbio/ws/server/resource/MuscleWS.wsdl @@ -15,11 +15,11 @@ - - + + - - + + @@ -30,12 +30,6 @@ - - - - - - @@ -45,11 +39,11 @@ - - + + - - + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,11 +81,11 @@ - - + + - - + + @@ -93,13 +93,6 @@ - - - - - - - @@ -116,14 +109,21 @@ - - - + + + + + + + + + + @@ -132,17 +132,17 @@ - - - + + + - - - + + + @@ -159,7 +159,7 @@ - + @@ -176,8 +176,11 @@ + + + - + @@ -198,7 +201,7 @@ - + @@ -215,11 +218,8 @@ - - - - + @@ -228,7 +228,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/MuscleWS_schema1.xsd b/webservices/compbio/ws/server/resource/MuscleWS_schema1.xsd index 0895916..e6c3574 100644 --- a/webservices/compbio/ws/server/resource/MuscleWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/MuscleWS_schema1.xsd @@ -152,6 +152,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,32 +209,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl b/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl index 5129abb..415612b 100644 --- a/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl +++ b/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl @@ -15,11 +15,11 @@ - - + + - - + + @@ -30,12 +30,6 @@ - - - - - - @@ -45,11 +39,11 @@ - - + + - - + + @@ -57,6 +51,12 @@ + + + + + + @@ -69,11 +69,11 @@ - - + + - - + + @@ -81,11 +81,11 @@ - - + + - - + + @@ -93,13 +93,6 @@ - - - - - - - @@ -116,14 +109,21 @@ - - - + + + + + + + + + + @@ -132,17 +132,17 @@ - - - + + + - - - + + + @@ -159,7 +159,7 @@ - + @@ -176,8 +176,11 @@ + + + - + @@ -198,7 +201,7 @@ - + @@ -215,11 +218,8 @@ - - - - + @@ -228,7 +228,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -273,7 +273,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/TcoffeeWS_schema1.xsd b/webservices/compbio/ws/server/resource/TcoffeeWS_schema1.xsd index 18262c9..9f5bbee 100644 --- a/webservices/compbio/ws/server/resource/TcoffeeWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/TcoffeeWS_schema1.xsd @@ -152,6 +152,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,32 +209,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -- 1.7.10.2