X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fws%2Fclient%2FServices.java;h=a0c1f56ae3f61ad4feef1369b009e0b11ae64eb9;hb=3644426ec0e9e9ceb798bd426085d8d9dd8dbb56;hp=f18eadf6c9c709120d669762362b64c4b728dbf2;hpb=a17f3c38045ca4509dc891722ea98143005119f6;p=jabaws.git diff --git a/webservices/compbio/ws/client/Services.java b/webservices/compbio/ws/client/Services.java index f18eadf..a0c1f56 100644 --- a/webservices/compbio/ws/client/Services.java +++ b/webservices/compbio/ws/client/Services.java @@ -32,7 +32,7 @@ import compbio.data.msa.SequenceAnnotation; * */ public enum Services { - MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, AAConWS; + MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS; public static Services getService(String servName) { servName = servName.trim().toLowerCase(); @@ -54,6 +54,15 @@ public enum Services { if (servName.equalsIgnoreCase(AAConWS.toString())) { return AAConWS; } + if (servName.equalsIgnoreCase(JronnWS.toString())) { + return JronnWS; + } + if (servName.equalsIgnoreCase(DisemblWS.toString())) { + return DisemblWS; + } + if (servName.equalsIgnoreCase(GlobPlotWS.toString())) { + return GlobPlotWS; + } return null; } @@ -62,15 +71,15 @@ public enum Services { return Service.create(url, qname); } - JABAService getInterface(Service service) { - assert service != null; - - QName portName = new QName(service.getServiceName().getNamespaceURI(), - this.toString() + "Port"); - + Class getServiceType() { switch (this) { + // deliberate leaking case AAConWS : - return service.getPort(portName, SequenceAnnotation.class); + case JronnWS : + case DisemblWS : + case GlobPlotWS : + + return SequenceAnnotation.class; // deliberate leaking case ClustalWS : @@ -78,13 +87,19 @@ public enum Services { case MuscleWS : case ProbconsWS : case TcoffeeWS : - // TODO remove - System.out.println("Qname from serv: " + portName); - - return service.getPort(portName, MsaWS.class); + return MsaWS.class; default : - throw new RuntimeException("Should never happened!"); + throw new RuntimeException("Unrecognised Web Service Type " + + this + " - Should never happened!"); } } + + JABAService getInterface(Service service) { + assert service != null; + + QName portName = new QName(service.getServiceName().getNamespaceURI(), + this.toString() + "Port"); + return service.getPort(portName, this.getServiceType()); + } } \ No newline at end of file