@@ -0,0 +1,2393 @@
+/*%0A *                    BioJava development code%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  If you do not have a copy,%0A * see:%0A *%0A *      http://www.gnu.org/copyleft/lesser.html%0A *%0A * Copyright for this code is held jointly by the individual%0A * authors.  These should be listed in @author doc comments.%0A *%0A * For more information on the BioJava project and its aims,%0A * or to join the biojava-l mailing list, visit the home page%0A * at:%0A *%0A *      http://www.biojava.org/%0A *%0A * Created on 21.09.2004%0A * @author Andreas Prlic%0A *%0A */%0A%0Apackage org.biojava.spice ;%0A%0Aimport java.util.logging.*             ;%0Aimport java.util.Map                   ;%0Aimport java.util.HashMap               ;%0Aimport java.util.List                  ;%0Aimport java.util.ArrayList             ;%0Aimport java.net.URL                    ;%0A%0A/** a thread that connects to a DAS - Feature service%0A * and sets results in %22parent thread%22 FeatureFetcher.%0A *@author Andreas Prlic%0A */%0A%0Apublic class SingleFeatureThread%0A    extends Thread %0A%0A%7B%0A    URL dascommand ;%0A    FeatureFetcher parentfetcher ;%0A    int myId ;%0A    Logger logger        ;%0A%0A%0A    /** contact a single DAS feature server and retreive features %0A%09@param parent a link to the parent class%0A%09@param urlstring string of server%0A%09@param threadid id for this thread, if job is finished parent%0A%09is told that threadid has finised%0A     */%0A    public SingleFeatureThread(FeatureFetcher parent, URL dascmd,int threadid) %7B%0A%09logger = Logger.getLogger(%22org.biojava.spice%22);%0A%09logger.finest(%22init new thread %22 + threadid + %22 %22 + dascmd);%0A%09dascommand = dascmd ;%0A%09parentfetcher = parent ;%0A%09myId = threadid ;%0A    %7D%0A    /** start thread */%0A    public void run() %7B%0A%09doDasConnection();%0A    %7D%0A%0A    private synchronized void doDasConnection() %7B%0A%09logger.finer(%22opening %22 + dascommand);%0A%09DAS_FeatureRetreive ftmp = new DAS_FeatureRetreive(dascommand);%0A%09ArrayList features = ftmp.get_features();%0A%09//logger.finest(%22doDasConnection got %22 + features.size() + %22 features%22) ;%0A%09//new ArrayList();%0A%09//ArrayList tmp = %0A%09//for (int i=0; i%3Ctmp.size();i++)%7B%0A%09//   HashMap feat = (HashMap)tmp.get(i);%09%09%09%0A%09    //logger.finest(%22got feature: %22+feat);%0A%09//    features.add(feat) ;%09%09%0A%09//%7D %0A%09//logger.finest(%22done %22+ dascommand);%0A%09parentfetcher.setFinished(myId,features);%0A%09notifyAll();%0A    %7D%0A%0A%7D%0A

make new file out of pre-existing class, now feature threads are really run in parallel