From: Sasha Sherstnev Date: Thu, 5 Sep 2013 09:48:54 +0000 (+0100) Subject: Add method for reporting JABAWS namespace X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bb916130b03c0172d23e5d1c875ac5d6e4b554e7;p=jabaws.git Add method for reporting JABAWS namespace --- diff --git a/webservices/compbio/ws/client/Services.java b/webservices/compbio/ws/client/Services.java index 28bb5dd..1554f64 100644 --- a/webservices/compbio/ws/client/Services.java +++ b/webservices/compbio/ws/client/Services.java @@ -71,7 +71,6 @@ public enum Services { Class getServiceType() { switch (this) { - // deliberate leaking case AAConWS : case JpredWS : case JronnWS : @@ -79,8 +78,6 @@ public enum Services { case GlobPlotWS : case IUPredWS : return SequenceAnnotation.class; - - // deliberate leaking case ClustalWS : case ClustalOWS : case MafftWS : @@ -88,12 +85,34 @@ public enum Services { case ProbconsWS : case TcoffeeWS : return MsaWS.class; - default : throw new RuntimeException("Unrecognised Web Service Type " + this + " - Should never happen!"); } } + + String getServiceNamespace() { + switch (this) { + case JpredWS : + return JABAService.V3_SERVICE_NAMESPACE; + case AAConWS : + case JronnWS : + case DisemblWS : + case GlobPlotWS : + case IUPredWS : + case ClustalOWS : + return JABAService.V2_SERVICE_NAMESPACE; + case ClustalWS : + case MafftWS : + case MuscleWS : + case ProbconsWS : + case TcoffeeWS : + return JABAService.SERVICE_NAMESPACE; + default : + throw new RuntimeException("Unrecognised JABAWS Namespace for service " + this +"!"); + } + } + JABAService getInterface(Service service) { assert service != null;