X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FPDBEntry.java;h=589bc7baf80f9151cd7780e747f1fd5347154b61;hb=8872ca6bcf761214bb3b4f428adec48bba95d80e;hp=98c78fcb5bfb42f05be1cf8b4c693bcc194d0884;hpb=db60896e1fa3a55367b6af0f01dbdc22738e6802;p=jalview.git diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 98c78fc..589bc7b 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -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) { @@ -129,9 +127,10 @@ public class PDBEntry { this.type = t; } + public void setType(PDBEntry.Type type) { - this.type = type.toString(); + this.type = type == null ? null : type.toString(); } public String getType() @@ -169,4 +168,8 @@ public class PDBEntry this.chainCode = chainCode; } + public String toString() + { + return id; + } }