JAL-1919 Fixed failing tests, enabled HETATM processing from structure file to be...
[jalview.git] / src / jalview / structure / StructureImportSettings.java
1 package jalview.structure;
2
3 import jalview.datamodel.DBRefSource;
4
5 public class StructureImportSettings
6 {
7   /**
8    * set to true to add derived sequence annotations (temp factor read from
9    * file, or computed secondary structure) to the alignment
10    */
11   private static boolean visibleChainAnnotation = false;
12
13   /**
14    * Set true to predict secondary structure (using JMol for protein, Annotate3D
15    * for RNA)
16    */
17   private static boolean predictSecStr = false;
18
19   /**
20    * Set true (with predictSecondaryStructure=true) to predict secondary
21    * structure using an external service (currently Annotate3D for RNA only)
22    */
23   private static boolean externalSecondaryStructure = false;
24
25   private static boolean showSeqFeatures = true;
26
27   private static boolean processHETATMs = false;
28
29   private static String currentDefaultFormat = DBRefSource.PDB;
30
31   public static void addSettings(boolean addAlignmentAnnotations,
32           boolean predictSecStr, boolean externalSecStr)
33   {
34     StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
35     StructureImportSettings.predictSecStr = predictSecStr;
36     StructureImportSettings.externalSecondaryStructure = externalSecStr;
37     StructureImportSettings.showSeqFeatures = true;
38   }
39
40   public static boolean isVisibleChainAnnotation()
41   {
42     return visibleChainAnnotation;
43   }
44
45   public static void setVisibleChainAnnotation(
46           boolean visibleChainAnnotation)
47   {
48     StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
49   }
50
51   public static boolean isPredictSecondaryStructure()
52   {
53     return predictSecStr;
54   }
55
56   public static void setPredictSecondaryStructure(
57           boolean predictSecondaryStructure)
58   {
59     StructureImportSettings.predictSecStr = predictSecondaryStructure;
60   }
61
62   public static boolean isExternalSecondaryStructure()
63   {
64     return externalSecondaryStructure;
65   }
66
67   public static void setExternalSecondaryStructure(
68           boolean externalSecondaryStructure)
69   {
70     StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
71   }
72
73   public static boolean isShowSeqFeatures()
74   {
75     return showSeqFeatures;
76   }
77
78   public static void setShowSeqFeatures(boolean showSeqFeatures)
79   {
80     StructureImportSettings.showSeqFeatures = showSeqFeatures;
81   }
82
83   public static String getCurrentDefaultFormat()
84   {
85     return currentDefaultFormat;
86   }
87
88   public static void setCurrentDefaultFormat(String currentDefaultFormat)
89   {
90     StructureImportSettings.currentDefaultFormat = currentDefaultFormat;
91   }
92
93   public static boolean isProcessHETATMs()
94   {
95     return processHETATMs;
96   }
97
98   public static void setProcessHETATMs(boolean processHETATMs)
99   {
100     StructureImportSettings.processHETATMs = processHETATMs;
101   }
102
103 }