Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / ws / DasSequenceFeatureFetcher.java
index 4d3dd2f..0a61dff 100644 (file)
@@ -202,15 +202,12 @@ public class DasSequenceFeatureFetcher
       int reply = JvOptionPane.YES_OPTION;
       if (promptFetchDbrefs)
       {
-        reply = JvOptionPane
-                .showInternalConfirmDialog(
-                        Desktop.desktop,
-                        MessageManager
-                                .getString("info.you_want_jalview_to_find_uniprot_accessions"),
-                        MessageManager
-                                .getString("label.find_uniprot_accession_ids"),
-                        JvOptionPane.YES_NO_OPTION,
-                        JvOptionPane.QUESTION_MESSAGE);
+        reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+                MessageManager.getString(
+                        "info.you_want_jalview_to_find_uniprot_accessions"),
+                MessageManager
+                        .getString("label.find_uniprot_accession_ids"),
+                JvOptionPane.YES_NO_OPTION, JvOptionPane.QUESTION_MESSAGE);
       }
 
       if (reply == JvOptionPane.YES_OPTION)
@@ -271,9 +268,8 @@ public class DasSequenceFeatureFetcher
     startTime = System.currentTimeMillis();
     if (af != null)
     {
-      af.setProgressBar(MessageManager
-              .getString("status.fetching_das_sequence_features"),
-              startTime);
+      af.setProgressBar(MessageManager.getString(
+              "status.fetching_das_sequence_features"), startTime);
     }
     if (sourceRegistry == null)
     {
@@ -283,8 +279,8 @@ public class DasSequenceFeatureFetcher
     {
       try
       {
-        jalviewSourceI[] sources = sourceRegistry.getSources().toArray(
-                new jalviewSourceI[0]);
+        jalviewSourceI[] sources = sourceRegistry.getSources()
+                .toArray(new jalviewSourceI[0]);
         String active = Cache.getDefault("DAS_ACTIVE_SOURCE", "uniprot");
         StringTokenizer st = new StringTokenizer(active, "\t");
         selectedSources = new Vector();
@@ -381,9 +377,9 @@ public class DasSequenceFeatureFetcher
       for (List<String> idl : ids)
       {
         String source = sources.next();
-        FeaturesClient featuresc = new FeaturesClient(sourceRegistry
-                .getSessionHandler().getConnectionPropertyProviderFor(
-                        source));
+        FeaturesClient featuresc = new FeaturesClient(
+                sourceRegistry.getSessionHandler()
+                        .getConnectionPropertyProviderFor(source));
         for (String id : idl)
         {
           List<String> qid = Arrays.asList(new String[] { id });
@@ -438,8 +434,8 @@ public class DasSequenceFeatureFetcher
   }
 
   private void processResponse(Map<String, SequenceI> sequencemap,
-          jalviewSourceI jvsource, List<String> ids,
-          List<DBRefEntry> idobj, Map<List<String>, DasGFFAdapter> results,
+          jalviewSourceI jvsource, List<String> ids, List<DBRefEntry> idobj,
+          Map<List<String>, DasGFFAdapter> results,
           Map<List<String>, Exception> errors)
   {
     Set<SequenceI> sequences = new HashSet<SequenceI>();
@@ -502,8 +498,8 @@ public class DasSequenceFeatureFetcher
                   vf = dbref.getMap().locateFeature(f);
                 } catch (Exception ex)
                 {
-                  Cache.log
-                          .warn("Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
+                  Cache.log.warn(
+                          "Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
                   Cache.log.warn("Mapping feature from " + f.getBegin()
                           + " to " + f.getEnd() + " in dbref "
                           + dbref.getAccessionId() + " in "
@@ -576,9 +572,8 @@ public class DasSequenceFeatureFetcher
   {
     if (af != null)
     {
-      af.setProgressBar(MessageManager
-              .getString("status.das_feature_fetching_cancelled"),
-              startTime);
+      af.setProgressBar(MessageManager.getString(
+              "status.das_feature_fetching_cancelled"), startTime);
     }
     cancelled = true;
   }
@@ -593,8 +588,8 @@ public class DasSequenceFeatureFetcher
     if (!cancelled && af != null)
     {
       // only update the progress bar if we've completed the fetch normally
-      af.setProgressBar(MessageManager
-              .getString("status.das_feature_fetching_complete"), startTime);
+      af.setProgressBar(MessageManager.getString(
+              "status.das_feature_fetching_complete"), startTime);
     }
 
     if (af != null && af.featureSettings != null)
@@ -642,9 +637,10 @@ public class DasSequenceFeatureFetcher
       return null;
     }
     DBRefEntry[] uprefs = DBRefUtils.selectRefs(seq.getDBRefs(),
-            new String[] {
-            // jalview.datamodel.DBRefSource.PDB,
-            DBRefSource.UNIPROT,
+            new String[]
+            {
+                // jalview.datamodel.DBRefSource.PDB,
+                DBRefSource.UNIPROT,
             // jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord
             // sys sources
             });
@@ -672,9 +668,9 @@ public class DasSequenceFeatureFetcher
             // - the start/end for the DBRefEntry may not be the same as the
             // sequence's start/end
 
-            System.out.println(seq.getName() + " "
-                    + (seq.getDatasetSequence() == null) + " "
-                    + csys.getUri());
+            System.out.println(
+                    seq.getName() + " " + (seq.getDatasetSequence() == null)
+                            + " " + csys.getUri());
 
             dasCoordSysFound = true; // break's out of the loop
             ids.add(uprefs[j]);
@@ -884,9 +880,8 @@ public class DasSequenceFeatureFetcher
       {
       }
 
-      SequenceFeature f = new SequenceFeature(
-              getTypeString(feat.getTYPE()), desc, start, end, score,
-              nickname);
+      SequenceFeature f = new SequenceFeature(getTypeString(feat.getTYPE()),
+              desc, start, end, score, nickname);
 
       if (feat.getLINK() != null)
       {