file format enum wip changes
[jalview.git] / src / jalview / ws / dbsources / Pdb.java
index c87a111..6f266dd 100644 (file)
@@ -30,6 +30,7 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
 import jalview.io.FormatAdapter;
 import jalview.io.PDBFeatureSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 
@@ -54,8 +55,6 @@ public class Pdb extends EbiFileRetrievedProxy
 
   public static final String FEATURE_RES_NUM = "RESNUM";
 
-  private static String currentDefaultFormat = DBRefSource.PDB;
-
   /*
    * (non-Javadoc)
    * 
@@ -133,11 +132,13 @@ public class Pdb extends EbiFileRetrievedProxy
       stopQuery();
       return null;
     }
-    String ext = getCurrentDefaultFormat().equalsIgnoreCase("mmcif") ? ".cif"
+    String ext = StructureImportSettings.getCurrentDefaultFormat()
+            .equalsIgnoreCase("mmcif") ? ".cif"
             : ".xml";
     EBIFetchClient ebi = new EBIFetchClient();
     file = ebi.fetchDataAsFile("pdb:" + id,
-            getCurrentDefaultFormat().toLowerCase(), ext)
+            StructureImportSettings.getCurrentDefaultFormat().toLowerCase(),
+            ext)
             .getAbsolutePath();
     stopQuery();
     if (file == null)
@@ -148,8 +149,8 @@ public class Pdb extends EbiFileRetrievedProxy
     {
 
       pdbAlignment = new FormatAdapter().readFile(file,
-              jalview.io.AppletFormatAdapter.FILE,
-              getCurrentDefaultFormat());
+              jalview.io.DataSourceType.FILE,
+              StructureImportSettings.getCurrentDefaultFormat());
       if (pdbAlignment != null)
       {
         List<SequenceI> toremove = new ArrayList<SequenceI>();
@@ -244,12 +245,12 @@ public class Pdb extends EbiFileRetrievedProxy
   }
 
   /**
-   * obtain human glyoxalase chain A sequence
+   * human glyoxalase
    */
   @Override
   public String getTestQuery()
   {
-    return "1QIPA";
+    return "1QIP";
   }
 
   @Override
@@ -264,15 +265,6 @@ public class Pdb extends EbiFileRetrievedProxy
     return 0;
   }
 
-  public static String getCurrentDefaultFormat()
-  {
-    return currentDefaultFormat;
-  }
-
-  public static void setCurrentDefaultFormat(String currentDefaultFomart)
-  {
-    Pdb.currentDefaultFormat = currentDefaultFomart;
-  }
 
   /**
    * Returns a descriptor for suitable feature display settings with