JAL-629 refactoring TFType. Remove i18n identification of annotation.
[jalview.git] / src / jalview / io / StructureFile.java
index c816f6d..7ecbc2d 100644 (file)
@@ -30,7 +30,6 @@ import jalview.analysis.AlignSeq;
 import jalview.api.FeatureSettingsModelI;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.AlignmentAnnotation.TFType;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
@@ -38,6 +37,7 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.PDBEntry.Type;
 import jalview.datamodel.SequenceI;
 import jalview.structure.StructureImportSettings;
+import jalview.structure.StructureImportSettings.TFType;
 import mc_view.PDBChain;
 
 public abstract class StructureFile extends AlignFile
@@ -68,6 +68,18 @@ public abstract class StructureFile extends AlignFile
 
   private boolean pdbIdAvailable;
 
+  private StructureImportSettings.TFType temperatureFactorType = TFType.DEFAULT;
+
+  public void setTemperatureFactorType(StructureImportSettings.TFType t)
+  {
+    this.temperatureFactorType = t;
+  }
+
+  public StructureImportSettings.TFType getTemperatureFactorType()
+  {
+    return temperatureFactorType;
+  }
+
   public StructureFile(Object inFile, DataSourceType sourceType)
           throws IOException
   {
@@ -75,9 +87,10 @@ public abstract class StructureFile extends AlignFile
   }
 
   public StructureFile(Object inFile, DataSourceType sourceType,
-          AlignmentAnnotation.TFType tempfacType) throws IOException
+          StructureImportSettings.TFType tempfacType) throws IOException
   {
-    super(inFile, sourceType, tempfacType);
+    super(inFile, sourceType);
+    this.setTemperatureFactorType(tempfacType);
   }
 
   public StructureFile(FileParse fp) throws IOException
@@ -101,7 +114,8 @@ public abstract class StructureFile extends AlignFile
             .isProcessSecondaryStructure();
     this.externalSecondaryStructure = StructureImportSettings
             .isExternalSecondaryStructure();
-
+    this.temperatureFactorType = StructureImportSettings
+            .getTemperatureFactorType();
   }
 
   public StructureFile(boolean parseImmediately, Object dataObject,