JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / datamodel / PDBEntry.java
index 0c28c95..06790d7 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -36,6 +36,7 @@ public class PDBEntry
   {
     PDB, FILE
   }
+
   Hashtable properties;
 
   /*
@@ -55,12 +56,8 @@ public class PDBEntry
       return true;
     }
     PDBEntry o = (PDBEntry) obj;
-    return /*
-            * (file == o.file || (file != null && o.file != null && o.file
-            * .equals(file))) &&
-            */
-    (type == o.type || (type != null && o.type != null && o.type
-                    .equals(type)))
+    return (type == o.type || (type != null && o.type != null && o.type
+            .equals(type)))
             && (id == o.id || (id != null && o.id != null && o.id
                     .equalsIgnoreCase(id)))
             && (chainCode == o.chainCode || (chainCode != null
@@ -69,6 +66,7 @@ public class PDBEntry
             && (properties == o.properties || (properties != null
                     && o.properties != null && properties
                       .equals(o.properties)));
+
   }
 
   /**
@@ -88,7 +86,7 @@ public class PDBEntry
   // this.file = filePath;
   // this.id = pdbId;
   // }
-  
+
   public PDBEntry(String pdbId, String chain, PDBEntry.Type type,
           String filePath)
   {
@@ -125,9 +123,14 @@ public class PDBEntry
     return file;
   }
 
+  public void setType(String t)
+  {
+    this.type = t;
+  }
+
   public void setType(PDBEntry.Type type)
   {
-    this.type = type.toString();
+    this.type = type == null ? null : type.toString();
   }
 
   public String getType()
@@ -165,4 +168,8 @@ public class PDBEntry
     this.chainCode = chainCode;
   }
 
+  public String toString()
+  {
+    return id;
+  }
 }