- * LATER: MUCH LATER! - not needed for simple case and this routine shouldn't live in this class anymore
- * isValidUpdate : Ideally. we efficiently walk down, comparing hashes, to deal with merging and verifying provenance for objects
-
- // extract root objects
- if (newroots != null) {
- // check newroots for objects that were present in the old document
- // check to see if the 'old' objects have been modified
- // if they have ? we overwrite them with their new version, ensuring that
- // provenance is updated.
- // if they haven't ? do nothing ?
-
- for (int i = 0, k = newroots.length; i < k; i++) {
- if (newroots[i].isRegistered()) {
- // easy - just check if anything has changed and do provenance
- Vobject oldversion = getObject(newroots[i].getVorbaId());
- if (oldversion instanceof VAMSAS) {
- // LATER: appropriate merging behaviour when two clients have improperly modified the same Vobject independently.
- if (newroots[i].get__last_hash() != newroots[i].hashCode()) {
- // client has modified this Vobject since last retrieval.
- if (newroots[i].get__last_hash() != oldversion.get__last_hash()) {
- // Vobject has been modified by another client since this
- // client's
- // last access to document.
- }
- }
- } else {
- throw new Error(
- "SimpleClient error when using setVamsasRoots : The vorbaId for Vobject "
- + i
- + " does not refer to an Vobject of type VAMSAS in the current document!");
- }
- } else {
- if (!newroots[i].is__stored_in_document()) {
- // check if Vobject is modified
- if (newroots[i].get__last_hash() != newroots[i].hashCode()) {
- // it is - so we add newroots[i] as a new Vobject, with updated
- // provenance.
- } else {
- // do nothing
- newroots[i] = null;
- }
- } else {
- // just add newroots[i] as a new Vobject in the document
- // - with appropriate provenance.
- }
- }
- }*/
+ * LATER: MUCH LATER! - not needed for simple case and this routine
+ * shouldn't live in this class anymore isValidUpdate : Ideally. we
+ * efficiently walk down, comparing hashes, to deal with merging and
+ * verifying provenance for objects
+ *
+ * // extract root objects if (newroots != null) { // check newroots for
+ * objects that were present in the old document // check to see if the
+ * 'old' objects have been modified // if they have ? we overwrite them with
+ * their new version, ensuring that // provenance is updated. // if they
+ * haven't ? do nothing ?
+ *
+ * for (int i = 0, k = newroots.length; i < k; i++) { if
+ * (newroots[i].isRegistered()) { // easy - just check if anything has
+ * changed and do provenance Vobject oldversion =
+ * getObject(newroots[i].getVorbaId()); if (oldversion instanceof VAMSAS) {
+ * // LATER: appropriate merging behaviour when two clients have improperly
+ * modified the same Vobject independently. if (newroots[i].get__last_hash()
+ * != newroots[i].hashCode()) { // client has modified this Vobject since
+ * last retrieval. if (newroots[i].get__last_hash() !=
+ * oldversion.get__last_hash()) { // Vobject has been modified by another
+ * client since this // client's // last access to document. } } } else {
+ * throw new Error(
+ * "SimpleClient error when using setVamsasRoots : The vorbaId for Vobject "
+ * + i +
+ * " does not refer to an Vobject of type VAMSAS in the current document!");
+ * } } else { if (!newroots[i].is__stored_in_document()) { // check if
+ * Vobject is modified if (newroots[i].get__last_hash() !=
+ * newroots[i].hashCode()) { // it is - so we add newroots[i] as a new
+ * Vobject, with updated // provenance. } else { // do nothing newroots[i] =
+ * null; } } else { // just add newroots[i] as a new Vobject in the document
+ * // - with appropriate provenance. } } }
+ */