Merge branch 'patch/JAL-4036_uniprot_fts_legacy_endpoint' into develop
[jalview.git] / src / jalview / fts / service / threedbeacons / TDBeaconsFTSPanel.java
index c12b7e4..253de42 100644 (file)
@@ -1,33 +1,42 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ 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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
 package jalview.fts.service.threedbeacons;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 
 import javax.swing.SwingUtilities;
 
-import org.json.JSONArray;
-import org.json.JSONObject;
-
-import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.datamodel.AlignmentI;
 import jalview.fts.api.FTSDataColumnI;
 import jalview.fts.api.FTSRestClientI;
 import jalview.fts.core.FTSRestRequest;
 import jalview.fts.core.FTSRestResponse;
 import jalview.fts.core.GFTSPanel;
-import jalview.fts.service.pdb.PDBFTSRestClient;
 import jalview.gui.SequenceFetcher;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
-import jalview.io.FileFormatI;
-import jalview.io.FileLoader;
 import jalview.io.FormatAdapter;
 import jalview.util.MessageManager;
 
@@ -199,8 +208,10 @@ public class TDBeaconsFTSPanel extends GFTSPanel
             AlignmentI tdbAl = fl.readFile(tdbURL, DataSourceType.URL,
                     FileFormat.MMCif);
 
-            // TODO: pad structure according to its Uniprot Start so all line up w.r.t. the Uniprot reference sequence
-            // TODO: give the structure a sensible name (not the giant URL *:o) )
+            // TODO: pad structure according to its Uniprot Start so all line up
+            // w.r.t. the Uniprot reference sequence
+            // TODO: give the structure a sensible name (not the giant URL *:o)
+            // )
             if (tdbAl != null)
             {
               if (allSeqs != null)
@@ -214,10 +225,8 @@ public class TDBeaconsFTSPanel extends GFTSPanel
             }
           } catch (Exception x)
           {
-            Cache.warn(
-                    "Couldn't retrieve 3d-beacons model for uniprot id"
-                            + searchTerm + " : " + tdbURL,
-                    x);
+            Console.warn("Couldn't retrieve 3d-beacons model for uniprot id"
+                    + searchTerm + " : " + tdbURL, x);
           }
         }
         seqFetcher.parseResult(allSeqs,
@@ -277,4 +286,9 @@ public class TDBeaconsFTSPanel extends GFTSPanel
     // no multiple query support yet
     return enteredText;
   }
+
+  public String getDbName()
+  {
+    return "3D-Beacons";
+  }
 }