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