+
+ /**
+ * Getter provided for Castor binding only. Application code should call
+ * getProperty() or getProperties() instead.
+ *
+ * @deprecated
+ * @see #getProperty(String)
+ * @see #getProperties()
+ * @see jalview.ws.dbsources.Uniprot#getUniprotEntries
+ * @return
+ */
+ @Deprecated
+ public Hashtable<String, Object> getProps()
+ {
+ return properties;
+ }
+
+ /**
+ * Setter provided for Castor binding only. Application code should call
+ * setProperty() instead.
+ *
+ * @deprecated
+ * @return
+ */
+ @Deprecated
+ public void setProps(Hashtable<String, Object> props)
+ {
+ properties = props;
+ }
+
+ /**
+ * update entry with details from another entry concerning the same PDB
+ * ID/file spec.
+ *
+ * @param newEntry
+ * @return true if modifications were made
+ */
+ public boolean updateFrom(PDBEntry newEntry)
+ {
+ boolean modified = false;
+
+ if (getFile() == null)
+ {
+ // update file and type of file
+ modified = newEntry.getFile() != null;
+ setFile(newEntry.getFile());
+ }
+ if (newEntry.getType() != null && newEntry.getFile() != null
+ && newEntry.getFile().equals(getFile()))
+ {
+ setType(newEntry.getType());
+ }
+ if (getChainCode() == null
+ || (getChainCode() != null && getChainCode().length() == 0 && newEntry
+ .getChainCode() != null))
+ {
+ modified |= (getChainCode() == null || !newEntry.getChainCode()
+ .equals(getChainCode()));
+ setChainCode(newEntry.getChainCode());
+ }
+ if (newEntry.properties != null)
+ {
+ for (Entry<String, Object> entry : newEntry.properties.entrySet())
+ {
+ if (!entry.getValue().equals(getProperty(entry.getKey())))
+ {
+ modified = true;
+ }
+ setProperty(entry.getKey(), entry.getValue());
+ }
+ }
+ return modified;
+ }