X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FPDBEntry.java;h=95043cc31786cedd15f65ecbdec80ba941362074;hb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;hp=0c28c9553517b0f5e0007ecd71b309b7c8a17997;hpb=fe72160257543fca39f7959fc1347665e95764a2;p=jalview.git diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 0c28c95..95043cc 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -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.0b1) + * 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; + } }