Merge branch 'develop' into features/filetypeEnum
[jalview.git] / src / MCview / PDBfile.java
index ed694f2..060de45 100755 (executable)
@@ -21,7 +21,9 @@
 package MCview;
 
 import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.DBRefSource;
 import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
 import jalview.io.FileParse;
 import jalview.io.StructureFile;
 import jalview.util.MessageManager;
@@ -40,35 +42,31 @@ public class PDBfile extends StructureFile
           boolean predictSecondaryStructure, boolean externalSecStr)
   {
     super();
-    this.visibleChainAnnotation = addAlignmentAnnotations;
-    this.predictSecondaryStructure = predictSecondaryStructure;
-    this.externalSecondaryStructure = externalSecStr;
+    addSettings(addAlignmentAnnotations, predictSecondaryStructure,
+            externalSecStr);
   }
 
-  public PDBfile(boolean addAlignmentAnnotations,
-          boolean predictSecondaryStructure, boolean externalSecStr,
-          String file, String protocol) throws IOException
+  public PDBfile(boolean addAlignmentAnnotations, boolean predictSecStr,
+          boolean externalSecStr, String dataObject,
+          DataSourceType sourceType)
+          throws IOException
   {
-    super(false, file, protocol);
-    this.visibleChainAnnotation = addAlignmentAnnotations;
-    this.predictSecondaryStructure = predictSecondaryStructure;
-    this.externalSecondaryStructure = externalSecStr;
+    super(false, dataObject, sourceType);
+    addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr);
     doParse();
   }
 
-  public PDBfile(boolean addAlignmentAnnotations,
-          boolean predictSecondaryStructure, boolean externalSecStr,
+  public PDBfile(boolean addAlignmentAnnotations, boolean predictSecStr,
+          boolean externalSecStr,
           FileParse source) throws IOException
   {
     super(false, source);
-    this.visibleChainAnnotation = addAlignmentAnnotations;
-    this.predictSecondaryStructure = predictSecondaryStructure;
-    this.externalSecondaryStructure = externalSecStr;
+    addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr);
     doParse();
   }
 
   @Override
-  public String print()
+  public String print(SequenceI[] seqs, boolean jvSuffix)
   {
     return null;
   }
@@ -76,6 +74,7 @@ public class PDBfile extends StructureFile
   @Override
   public void parse() throws IOException
   {
+    setDbRefType(DBRefSource.PDB);
     // TODO set the filename sensibly - try using data source name.
     setId(safeName(getDataName()));