{
this(source, version, accessionId, null);
}
+ /**
+ *
+ * @param source canonical source (uppercase only)
+ * @param version (source dependent version string)
+ * @param accessionId (source dependent accession number string)
+ * @param map (mapping from local sequence numbering to source accession numbering)
+ */
public DBRefEntry(String source, String version, String accessionId, Mapping map) {
- this.source = source;
+ this.source = source.toUpperCase();
this.version = version;
this.accessionId = accessionId;
this.map = map;
}
if (entry==this)
return true;
- if ((source!=null && entry.source!=null && source.equals(entry.source))
+ if ((source!=null && entry.source!=null && source.equalsIgnoreCase(entry.source))
&&
(accessionId!=null && entry.accessionId!=null && accessionId.equalsIgnoreCase(entry.accessionId))
&&
String id;
Hashtable properties;
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj)
+ {
+ if (obj==null || !(obj instanceof PDBEntry))
+ {
+ return false;
+ }
+ if (obj==this)
+ 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)))
+ && (id==o.id || (id!=null && o.id!=null && o.id.equalsIgnoreCase(id)))
+ && (properties==o.properties || (properties!=null && o.properties!=null && properties.equals(o.properties)));
+ }
public PDBEntry()
{}
public PDBEntry(PDBEntry entry) {