JAL-3746 apply copyright to source
[jalview.git] / src / jalview / gui / structurechooser / ThreeDBStructureChooserQuerySource.java
index 2890a01..9e4ee21 100644 (file)
@@ -1,9 +1,30 @@
+/*
+ * 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.gui.structurechooser;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Comparator;
+import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
@@ -11,7 +32,7 @@ import java.util.Set;
 
 import javax.swing.JTable;
 
-import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.PDBEntry;
@@ -414,12 +435,13 @@ public class ThreeDBStructureChooserQuerySource
       {
         pdbEntry = new PDBEntry();
         pdbEntry.setId(pdbIdStr);
+        pdbEntry.setAuthoritative(true);
         try
         {
           pdbEntry.setType(PDBEntry.Type.valueOf(strucFormat));
         } catch (Exception q)
         {
-          Cache.log.warn("Unknown filetype for 3D Beacons Model from: "
+          Console.warn("Unknown filetype for 3D Beacons Model from: "
                   + strucFormat + " - " + pdbIdStr + " - " + modelPage);
         }
 
@@ -452,7 +474,7 @@ public class ThreeDBStructureChooserQuerySource
 
   public String buildPDBFTSQueryFor(FTSRestResponse upResponse)
   {
-    List<String> pdbIds = new ArrayList<String>();
+    Set<String> pdbIds = new HashSet<String>();
     int idx_modelId = getLastFTSRequest().getFieldIndex("Model id");
     int idx_provider = getLastFTSRequest().getFieldIndex("Provider");
     for (FTSData row : upResponse.getSearchSummary())