Merge branch 'develop' into features/filetypeEnum
[jalview.git] / src / jalview / datamodel / PDBEntry.java
index 1c7df49..37dfdbf 100755 (executable)
@@ -34,10 +34,30 @@ public class PDBEntry
 
   public enum Type
   {
-    PDB, MMCIF, FILE
+    // TODO is FILE needed; if not is this needed or can we
+    // use FileFormatI for PDB, MMCIF?
+    PDB("pdb", "xml"), MMCIF("mmcif", "mmcif"), FILE("?", "?");
+    String ext;
+
+    String format;
+
+    private Type(String fmt, String ex)
+    {
+      format = fmt;
+      ext = ex;
+    }
+
+    public String getFormat()
+    {
+      return format;
+    }
+    public String getExtension()
+    {
+      return ext;
+    }
   }
 
-  Hashtable properties;
+  Hashtable<String, String> properties;
 
   /*
    * (non-Javadoc)
@@ -153,7 +173,7 @@ public class PDBEntry
     this.properties = property;
   }
 
-  public Hashtable getProperty()
+  public Hashtable<String, String> getProperty()
   {
     return properties;
   }