private static boolean processHETATMs = false;
private static String currentDefaultFormat = DBRefSource.PDB;
+ public enum StructureFormat
+ {
+ PDB, MMCIF
+ };
+
+ private static StructureFormat currentDefaultFormat = StructureFormat.PDB;
public static void addSettings(boolean addAlignmentAnnotations,
boolean predictSecStr, boolean externalSecStr)
public static String getCurrentDefaultFormat()
{
- return currentDefaultFormat;
+ return currentDefaultFormat.toString();
}
public static void setCurrentDefaultFormat(String currentDefaultFormat)
{
- StructureImportSettings.currentDefaultFormat = currentDefaultFormat;
+ StructureImportSettings.currentDefaultFormat = StructureFormat
+ .valueOf(currentDefaultFormat);
}
public static boolean isProcessHETATMs()
import jalview.io.FormatAdapter;
import jalview.io.PDBFeatureSettings;
import jalview.structure.StructureImportSettings;
+import jalview.structure.StructureImportSettings.StructureFormat;
import jalview.util.MessageManager;
import jalview.ws.ebi.EBIFetchClient;
stopQuery();
return null;
}
- String ext = StructureImportSettings.getCurrentDefaultFormat()
- .equalsIgnoreCase("mmcif") ? ".cif"
- : ".xml";
+ String ext = StructureImportSettings.getCurrentDefaultFormat().equals(
+ StructureFormat.MMCIF) ? ".cif" : ".xml";
EBIFetchClient ebi = new EBIFetchClient();
file = ebi.fetchDataAsFile("pdb:" + id,
StructureImportSettings.getCurrentDefaultFormat().toLowerCase(),