X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Discoverer.java;h=0782d57dba94f575044570955770a7de87bcf303;hb=2f4f1d8fb6878271b64f327bc58c895f458137af;hp=119d37b682949878cbeede86a5ddd475203b3585;hpb=86838d2566aadd780bd460bdc1276eec77875e26;p=jalview.git
diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java
index 119d37b..0782d57 100644
--- a/src/jalview/ws/jws2/Jws2Discoverer.java
+++ b/src/jalview/ws/jws2/Jws2Discoverer.java
@@ -1,19 +1,20 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *
+ *
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.ws.jws2;
@@ -23,6 +24,7 @@ import jalview.gui.Desktop;
import jalview.gui.JvSwingUtils;
import jalview.ws.WSMenuEntryProviderI;
import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.ParamDatastoreI;
import java.awt.Color;
import java.awt.event.ActionEvent;
@@ -37,6 +39,7 @@ import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.StringTokenizer;
import java.util.Vector;
@@ -104,6 +107,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
public void run()
{
+
if (running && oldthread != null && oldthread.isAlive())
{
if (!aborted)
@@ -125,6 +129,15 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
Cache.log.debug("Old discovery thread has finished.");
}
running = true;
+
+ // first set up exclusion list if needed
+ final Set ignoredServices = new HashSet();
+ for (String ignored:jalview.bin.Cache.getDefault("IGNORED_JABAWS_SERVICETYPES", Services.JpredWS.toString()).split("\\|"))
+ {
+ ignoredServices.add(ignored);
+ }
+
+
changeSupport.firePropertyChange("services", services, new Vector());
oldthread = Thread.currentThread();
try
@@ -168,7 +181,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
// for all possible services
for (Services sv : squery.JABAWS2SERVERS)
{
- svctypes.add(sv.toString());
+ if (!ignoredServices.contains(sv.toString()))
+ {
+ svctypes.add(sv.toString());
+ }
}
}
@@ -188,7 +204,9 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
;
for (JabaWsServerQuery squery : qrys)
{
- finished = finished && !squery.isRunning();
+ if (squery.isRunning()){
+ finished=false;
+ }
}
if (aborted)
{
@@ -221,7 +239,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
services = new Vector();
for (Jws2Instance svc : svcs)
{
- services.add(svc);
+ if (!ignoredServices.contains(svc.serviceType))
+ {
+ services.add(svc);
+ }
}
}
}
@@ -250,7 +271,11 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
services.add(service);
// retrieve the presets and parameter set and cache now
- service.getParamStore().getPresets();
+ ParamDatastoreI pds = service.getParamStore();
+ if (pds != null)
+ {
+ pds.getPresets();
+ }
service.hasParameters();
if (validServiceUrls == null)
{