X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FPdb.java;h=61c5c0458fe4fa7090d3d2362e8659e3d7187ddf;hb=0f40a8334651302a74a223ecd3e583451302bb42;hp=c87a111a1f0ebda5dc2d6ea3be0b2b360b653601;hpb=18e78fa415a301cf4423037a713b2b088b9fc656;p=jalview.git diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index c87a111..61c5c04 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -27,9 +27,11 @@ import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefEntry; import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; +import jalview.datamodel.PDBEntry.Type; 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 +56,6 @@ public class Pdb extends EbiFileRetrievedProxy public static final String FEATURE_RES_NUM = "RESNUM"; - private static String currentDefaultFormat = DBRefSource.PDB; - /* * (non-Javadoc) * @@ -133,11 +133,12 @@ public class Pdb extends EbiFileRetrievedProxy stopQuery(); return null; } - String ext = getCurrentDefaultFormat().equalsIgnoreCase("mmcif") ? ".cif" - : ".xml"; + String ext = StructureImportSettings.getDefaultStructureFileFormat() + .equalsIgnoreCase(Type.MMCIF.toString()) ? ".cif" : ".xml"; EBIFetchClient ebi = new EBIFetchClient(); file = ebi.fetchDataAsFile("pdb:" + id, - getCurrentDefaultFormat().toLowerCase(), ext) + StructureImportSettings.getDefaultStructureFileFormat().toLowerCase(), + ext) .getAbsolutePath(); stopQuery(); if (file == null) @@ -149,7 +150,7 @@ public class Pdb extends EbiFileRetrievedProxy pdbAlignment = new FormatAdapter().readFile(file, jalview.io.AppletFormatAdapter.FILE, - getCurrentDefaultFormat()); + StructureImportSettings.getDefaultStructureFileFormat()); if (pdbAlignment != null) { List toremove = new ArrayList(); @@ -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