X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FPdb.java;h=6f266dd3aa6da9930a6053511b0c6d438bef80d3;hb=ee198b3ca3687f18a2ee186f4e7c7330f4ea30f0;hp=f41d86acf204418a4bf31fad6ddc19653d261186;hpb=5431cd565122d8baa2ca28e35500f2b5291e281f;p=jalview.git diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index f41d86a..6f266dd 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -1,3 +1,4 @@ + /* * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) * Copyright (C) $$Year-Rel$$ The Jalview Authors @@ -29,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; @@ -53,8 +55,6 @@ public class Pdb extends EbiFileRetrievedProxy public static final String FEATURE_RES_NUM = "RESNUM"; - private static String currentDefaultFomart = DBRefSource.PDB; - /* * (non-Javadoc) * @@ -132,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(), "raw", ext) + StructureImportSettings.getCurrentDefaultFormat().toLowerCase(), + ext) .getAbsolutePath(); stopQuery(); if (file == null) @@ -147,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 toremove = new ArrayList(); @@ -243,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 @@ -263,15 +265,6 @@ public class Pdb extends EbiFileRetrievedProxy return 0; } - public static String getCurrentDefaultFormat() - { - return currentDefaultFomart; - } - - public static void setCurrentDefaultFormat(String currentDefaultFomart) - { - Pdb.currentDefaultFomart = currentDefaultFomart; - } /** * Returns a descriptor for suitable feature display settings with